Closed Bug 1499902 Opened Last year Closed Last year

Intermittent AttributeError: 'NoneType' object has no attribute 'shell_output'

Categories

(Testing :: General, defect, P5)

Version 3
defect

Tracking

(firefox64 fixed)

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: gbrown)

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

18:05:45     INFO - [mozharness: 2018-10-17 18:05:45.808919Z] Finished verify-device step (failed)
18:05:45    FATAL - Uncaught exception: Traceback (most recent call last):
18:05:45    FATAL -   File "/builds/worker/workspace/mozharness/mozharness/base/script.py", line 2104, in run
18:05:45    FATAL -     self.run_action(action)
18:05:45    FATAL -   File "/builds/worker/workspace/mozharness/mozharness/base/script.py", line 2043, in run_action
18:05:45    FATAL -     self._possibly_run_method(method_name, error_if_missing=True)
18:05:45    FATAL -   File "/builds/worker/workspace/mozharness/mozharness/base/script.py", line 1983, in _possibly_run_method
18:05:45    FATAL -     return getattr(self, method_name)()
18:05:45    FATAL -   File "/builds/worker/workspace/mozharness/mozharness/mozilla/testing/android.py", line 492, in verify_device
18:05:45    FATAL -     self.dump_perf_info()
18:05:45    FATAL -   File "/builds/worker/workspace/mozharness/mozharness/mozilla/testing/android.py", line 257, in dump_perf_info
18:05:45    FATAL -     out = self.shell_output(cmd)
18:05:45    FATAL -   File "/builds/worker/workspace/mozharness/mozharness/mozilla/testing/android.py", line 336, in shell_output
18:05:45    FATAL -     return self.device.shell_output(cmd, timeout=30)
18:05:45    FATAL - AttributeError: 'NoneType' object has no attribute 'shell_output'
18:05:45    FATAL - Running post_fatal callback...

gbrown: Thoughts?
Flags: needinfo?(gbrown)
self.device is a property which includes a silent try/catch. I think there's something wrong with the physical device and ADBAndroid() is throwing.
That would explain why:

  INFO - New mozdevice with adb=..., device=...

is missing.
But for this to happen, shell.device is None. Ah, I see. In android.py

    @property
    def device(self):
        if not self._device:
            try:
                import mozdevice
                self._device = mozdevice.ADBAndroid(adb=self.adb_path,
                                                    device=self.device_serial,
                                                    verbose=True)
                self.info("New mozdevice with adb=%s, device=%s" %
                          (self.adb_path, self.device_serial))
            except Exception:
                # As in adb_path, above.
                pass
        return self._device

We should change that except to match adb_path's where it catches AttributeError if that is the error we want to ignore.
Flags: needinfo?(gbrown)
Assignee: nobody → gbrown
I think this is all that's needed to transform this bug into something more understandable.

Doesn't break normal stuff:

https://treeherder.mozilla.org/#/jobs?repo=try&tier=1%2C2%2C3&revision=50c249da9d1597330ac8079475ad4d44ed901310
Attachment #9018444 - Flags: review?(bob)
Comment on attachment 9018444 [details] [diff] [review]
ignore fewer exceptions in AndroidMixin device property

Review of attachment 9018444 [details] [diff] [review]:
-----------------------------------------------------------------

lgtm. r+
Attachment #9018444 - Flags: review?(bob) → review+
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ab5f788c2759
Improve device failure handling in AndroidMixin; r=bc
https://hg.mozilla.org/mozilla-central/rev/ab5f788c2759
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.