Autophone - poweron failure during startup kills device process in infinite loop

NEW
Unassigned

Status

Testing
Autophone
7 months ago
7 months ago

People

(Reporter: bc, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 months ago
https://github.com/mozilla/autophone/blob/master/worker.py#L1459

Process nexus-4-7:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/mozilla/autophone/autophone/worker.py", line 1459, in run
    self.dm.power_on()
  File "/mozilla/autophone/autophone/adb_android.py", line 247, in power_on
    root=True)
  File "/mozilla/autophone/autophone/adb.py", line 1137, in shell_output
    raise ADBTimeoutError("%s" % adb_process)
ADBTimeoutError: args: adb -s 04be7132cc8bd199 wait-for-device shell svc power stayon true; echo rc=$?, exitcode: None, stdout: 

Since this is not caught in a try block it kills the process which if the error is persistent it will repeat the next time the process is started.

The case in this instance was due to the device hanging during the svc power stayon command. The problem went away in this case when I manually rebooted the device.

1. We should gracefully handle device errors during worker process startup.

2. We should attempt to recover at least once by rebooting the device if at all possible.
You need to log in before you can comment on or make changes to this bug.