New issue
Advanced search Search tips

Issue 877057 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

shared_page_state.DidRunStory is failed with "AttributeError: 'NoneType' object has no attribute 'name'"

Project Member Reported by nednguyen@chromium.org, Aug 23

Issue description

Stack: 

Exception raised when cleaning story run: 

Traceback (most recent call last):
  _RunStoryAndProcessErrorIfNeeded at /b/swarming/w/ir/third_party/catapult/telemetry/telemetry/internal/story_runner.py:157
    state.DidRunStory(results)
  traced_function at /b/swarming/w/ir/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py:52
    return func(*args, **kwargs)
  DidRunStory at /b/swarming/w/ir/third_party/catapult/telemetry/telemetry/page/shared_page_state.py:152
    self._current_page.name, self._current_page.file_safe_name, results)
AttributeError: 'NoneType' object has no attribute 'name'

Locals:
  results : <telemetry.internal.results.page_test_results.PageTestResults object at 0x7f8ba4ba5f50>
Actually the fatal error that interrupted the benchmark run is: WebSocketConnectionClosedException

(see the log:
story_runner.RunBenchmark:378  Benchmark execution interrupted by a fatal exception: <class 'websocket._exceptions.WebSocketConnectionClosedException'>(Connection is already closed.))

The stack in #1 is just a redherring. It's printed by https://cs.chromium.org/chromium/src/third_party/catapult/telemetry/telemetry/internal/story_runner.py?rcl=2229a8947448b1d4298817fda7ff264e9d1590b1&l=164
Labels: -Pri-1 Pri-2
Summary: state.DidRunStory is failed with "AttributeError: 'NoneType' object has no attribute 'name'" (was: Benchmark run is interrupted with "AttributeError: 'NoneType' object has no attribute 'name'")
So just in case why we wonder the error message was a bit confusing, the WebSocketConnectionClosedException was thrown in test.WillRunStory(), which happen before state.WillRunStory (see https://cs.chromium.org/chromium/src/third_party/catapult/telemetry/telemetry/internal/story_runner.py?rcl=2229a8947448b1d4298817fda7ff264e9d1590b1&l=117), hence we didn't have a chance to set up the _current_page yet, which caused the stack in #1.

I think the correct solution here should be only invoke X.DidRun if X.WillRun was invoked, whether X is test, or the shared_state

 Bug 876681  is to track the interrupted benchmark run. This bug is mostly about how to improve the error handling of state.DidRunStory in story_runner. Reduce the priority since this doesn't cause cascading failure
Summary: shared_page_state.DidRunStory is failed with "AttributeError: 'NoneType' object has no attribute 'name'" (was: state.DidRunStory is failed with "AttributeError: 'NoneType' object has no attribute 'name'")
crbug.com/877231 has more failures that seem related.

Comment 6 by benhenry@google.com, Jan 16 (6 days ago)

Components: Test>Telemetry

Comment 7 by benhenry@google.com, Jan 16 (6 days ago)

Components: -Speed>Telemetry

Sign in to add a comment