Closed Bug 991178 Opened 10 years ago Closed 3 years ago

Add support for more Python exceptions to Mozharness' errors.py

Categories

(Release Engineering :: Applications: MozharnessCore, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: emorley, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: sheriffing-untriaged, Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/2562] [good next bug])

Actual:
https://tbpl.mozilla.org/php/getParsedLog.php?id=37142962&tree=Mozilla-Inbound

08:49:20     INFO - Calling ['/builds/slave/test/build/venv/bin/python', 'runreftestb2g.py', '--adbpath=/builds/slave/test/build/emulator/b2g-distro/out/host/linux-x86/bin/adb', '--b2gpath=/builds/slave/test/build/emulator/b2g-distro', '--emulator=arm', '--emulator-res=800x1000', '--logcat-dir=/builds/slave/test/build', '--remote-webserver=10.0.2.2', '--ignore-window-size', '--xre-path=/builds/slave/test/build/xre/bin', '--symbols-path=http://pvtbuilds.pvt.build.mozilla.org/pub/mozilla.org/b2g/tinderbox-builds/mozilla-inbound-emulator/20140402074834/b2g-31.0a1.en-US.android-arm.crashreporter-symbols.zip', '--busybox=/builds/slave/test/build/busybox', '--total-chunks=15', '--this-chunk=3', 'tests/layout/reftests/reftest.list'] with output_timeout 1000
08:49:47     INFO -  Traceback (most recent call last):
08:49:47     INFO -    File "runreftestb2g.py", line 600, in <module>
08:49:47     INFO -      sys.exit(main())
08:49:47     INFO -    File "runreftestb2g.py", line 596, in main
08:49:47     INFO -      return run_remote_reftests(parser, options, args)
08:49:47     INFO -    File "runreftestb2g.py", line 505, in run_remote_reftests
08:49:47     INFO -      marionette = Marionette.getMarionetteOrExit(**kwargs)
08:49:47     INFO -    File "/builds/slave/test/build/venv/local/lib/python2.7/site-packages/marionette/marionette.py", line 556, in getMarionetteOrExit
08:49:47     INFO -      m = cls(*args, **kwargs)
08:49:47     INFO -    File "/builds/slave/test/build/venv/local/lib/python2.7/site-packages/marionette/marionette.py", line 504, in __init__
08:49:47     INFO -      self.port = self.emulator.setup_port_forwarding(self.port)
08:49:47     INFO -    File "/builds/slave/test/build/venv/local/lib/python2.7/site-packages/marionette/emulator.py", line 526, in setup_port_forwarding
08:49:47     INFO -      'tcp:%d' % remote_port])
08:49:47     INFO -    File "/builds/slave/test/build/venv/local/lib/python2.7/site-packages/marionette/emulator.py", line 206, in _run_adb
08:49:47     INFO -      % (retcode, adb.stdout.read()))
08:49:47     INFO -  Exception: adb terminated with exit code 1: error: cannot bind socket
08:49:48    ERROR - Return code: 1

Expected:
...
08:49:47     INFO -      % (retcode, adb.stdout.read()))
08:49:47    ERROR -  Exception: adb terminated with exit code 1: error: cannot bind socket
08:49:48    ERROR - Return code: 1

This would help us catch things like bug 972377 more easily in TBPL, since it would match against the mozharness line ERROR prefix.
By "Add support for more Python exceptions" I really mean "Try to add generalised way of catching python exceptions in mozharness, but failing that, add a few more of the common cases"
We could easily add an 'Exception:' regex to PythonErrorList, with or without the ^ (beginning of line).
I'm not sure if that will add false positives, though, and if a run_command() has PythonErrorList and halt_on_failure it might turn into a failed job...  If you and the other sheriffs are willing to watch for any fallout, we could do this pretty quick.
(In reply to Aki Sasaki [:aki] from comment #2)
> If you and the other sheriffs are willing to watch for any
> fallout, we could do this pretty quick.

(Sorry for the delay replying)

Yeah I'd be up for doing that at some point :-)
Blocks: 978920
Sorry meant to add I'm going to add some more generic regexes to TBPL first (since they won't affect the job result, only the log excerpt shown) and then can judge the state of false positives based on that.
Depends on: 991173
Component: General Automation → Mozharness
Whiteboard: [good next bug]
Whiteboard: [good next bug] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/2562] [good next bug]

7 year old bug that references tbpl; let's resolve and open new if needed.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.