Autophone - unprotected reboot in PhoneWorker.ping can kill worker if it fails

RESOLVED FIXED

Status

Testing
Autophone
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: bc, Assigned: bc)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(firefox44 affected)

Details

Attachments

(1 attachment)

autophone-nexus-5-kot49h-4.out:Process nexus-5-kot49h-4:
autophone-nexus-5-kot49h-4.out:Traceback (most recent call last):
autophone-nexus-5-kot49h-4.out:  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
autophone-nexus-5-kot49h-4.out:    self.run()
autophone-nexus-5-kot49h-4.out:  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 114, in run
autophone-nexus-5-kot49h-4.out:    self._target(*self._args, **self._kwargs)
autophone-nexus-5-kot49h-4.out:  File "/mozilla/projects/autophone/src/autophone/worker.py", line 1046, in run
autophone-nexus-5-kot49h-4.out:    self.ping()
autophone-nexus-5-kot49h-4.out:  File "/mozilla/projects/autophone/src/autophone/worker.py", line 465, in ping
autophone-nexus-5-kot49h-4.out:    self.dm.reboot()
autophone-nexus-5-kot49h-4.out:  File "/mozilla/projects/autophone/src/autophone/adb_android.py", line 157, in reboot
autophone-nexus-5-kot49h-4.out:    self.command_output(["reboot"], timeout=timeout)
autophone-nexus-5-kot49h-4.out:  File "/mozilla/projects/autophone/src/autophone/adb.py", line 836, in command_output
autophone-nexus-5-kot49h-4.out:    timeout=timeout)
autophone-nexus-5-kot49h-4.out:  File "/mozilla/projects/autophone/src/autophone/adb.py", line 277, in command_output
autophone-nexus-5-kot49h-4.out:    raise ADBTimeoutError("%s" % adb_process)
autophone-nexus-5-kot49h-4.out:ADBTimeoutError: args: adb -s 094045720b0daa77 wait-for-device reboot, exitcode: None, stdout: , stderr: 

The offending reboot is at

https://github.com/mozilla/autophone/blob/master/worker.py#L465
Created attachment 8675603 [details] [diff] [review]
bug-1216089-ping-reboot.patch
Attachment #8675603 - Flags: review?(jmaher)
Attachment #8675603 - Flags: review?(jmaher) → review+
https://github.com/mozilla/autophone/commit/cac2d130a9c91422bfa0b6e40a892453386bed1d

I'll pull this on the Autophone host and it will be picked up during the next reboot.
Blocks: 1157427
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.