OS X "OSError: [Errno 3] No such process" in runtests.py::killAndGetStack()

RESOLVED FIXED in mozilla27

Status

Testing
Mochitest
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: emorley, Assigned: Jeff Hammel)

Tracking

Trunk
mozilla27
x86_64
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
eg:
https://tbpl.mozilla.org/php/getParsedLog.php?id=28459721&tree=Mozilla-Central
https://tbpl.mozilla.org/php/getParsedLog.php?id=28430118&tree=Mozilla-Inbound


15:10:33     INFO -  Traceback (most recent call last):
15:10:33     INFO -    File "/builds/slave/talos-slave/test/build/tests/mochitest/runtests.py", line 1041, in runTests
15:10:33     INFO -      onLaunch=onLaunch
15:10:33     INFO -    File "/builds/slave/talos-slave/test/build/tests/mochitest/runtests.py", line 935, in runApp
15:10:33     INFO -      self.handleTimeout(timeout, proc, utilityPath, debuggerInfo, browserProcessId)
15:10:33     INFO -    File "/builds/slave/talos-slave/test/build/tests/mochitest/runtests.py", line 1069, in handleTimeout
15:10:33     INFO -      self.killAndGetStack(browserProcessId, utilityPath, debuggerInfo, dump_screen=not debuggerInfo)
15:10:33     INFO -    File "/builds/slave/talos-slave/test/build/tests/mochitest/runtests.py", line 725, in killAndGetStack
15:10:33     INFO -      os.kill(processPID, signal.SIGABRT)
15:10:33     INFO -  OSError: [Errno 3] No such process
15:10:33     INFO -  Automation Error: Received unexpected exception while running application
The only thing I can think of here is that the process has died before we got to kill it, possibly just crashing slowly (on Mac this can take a long time while the OS X crashreporter generates a report). We should probably just wrap that in a try / except OSError and move on in life.
(Reporter)

Comment 2

4 years ago
This is happening pretty frequently on OS X.
(Assignee)

Comment 3

4 years ago
Created attachment 811822 [details] [diff] [review]
simple try: except OSError
Attachment #811822 - Flags: review?(ted)
(Assignee)

Comment 4

4 years ago
(In reply to Jeff Hammel [:jhammel] from comment #3)
> Created attachment 811822 [details] [diff] [review]
> simple try: except OSError

Doesn't break linux locally; will push to try if desired.
(Reporter)

Comment 5

4 years ago
Comment on attachment 811822 [details] [diff] [review]
simple try: except OSError

Could we log.info("Can't trigger Breakpad, process no longer exists") ?
Assignee: nobody → jhammel
Comment on attachment 811822 [details] [diff] [review]
simple try: except OSError

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

I have a feeling that if we land this we'll start seeing crash stacks out of these tests. My theory is that the process has already crashed, but hitting this exception means we skip the check_for_crashes call so we don't get to see the stack.

::: testing/mochitest/runtests.py
@@ +723,5 @@
>          # ABRT will get picked up by Breakpad's signal handler
> +        try:
> +          os.kill(processPID, signal.SIGABRT)
> +        except OSError:
> +          # https://bugzilla.mozilla.org/show_bug.cgi?id=921509

I'd drop the comment, this is what hg blame is for. Ed's suggestion to log.info something here (maybe even log.warn?) sounds reasonable as well. This is an odd situation to get to, it'd be good to note it.
Attachment #811822 - Flags: review?(ted) → review+
(Assignee)

Comment 7

4 years ago
pushed to inbound with recommendations: https://hg.mozilla.org/integration/mozilla-inbound/rev/48f4c5347dad
https://hg.mozilla.org/mozilla-central/rev/48f4c5347dad
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.