Closed Bug 1093296 Opened 10 years ago Closed 7 years ago

B2G mochitests/mozrunner child process crash detection no longer working

Categories

(Testing :: Mochitest, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED WONTFIX
tracking-b2g backlog

People

(Reporter: ahal, Unassigned)

References

Details

Attachments

(1 file)

See discussion starting at https://bugzilla.mozilla.org/show_bug.cgi?id=965705#c351

It seems like child process crashes are no longer being handled properly in b2g emulator mochitests (and possibly other suites too).

To reproduce, run mochitests on an emulator (which I'm currently having other troubles with.. sigh), and do "adb shell kill -6 <content pid>".

Expected:
Test run aborts immediately and crash stack dumped to stdout

Actual:
Test run times out until killAndGetStack is triggered
Blocks: 965705
Hi John,
This blocks bug 965705 which happens frequently. Could you help dig this based on comment 0 first? Thank you.
Flags: needinfo?(jdai)
I can easily reproduce the issue based on STR in comment 0.
Sure, I'll take it.
Assignee: nobody → jdai
Flags: needinfo?(jdai)
blocking-b2g: --- → backlog
blocking-b2g: backlog → ---
When child process crashes, it sends "ipc:content-shutdown" message. Therefore, we should listen this message aborts test immediately.
Hi Andrew,

May I have your feedback about this patch? 

Thanks.
Flags: needinfo?(ahalberstadt)
Hmm, I'm not sure if specialpowers is the best place to fix this. Not all flavours of mochitest use specialpowers, and I think this issue might affect test harnesses other than mochitest as well. It would be nice to have a more generic solution.

There's code in shell.js [1] that is supposed to call nsIAppStartup.quit() if the MOZ_CRASHREPORTER_SHUTDOWN environment variable is set. Mozrunner sets that variable [2], but for some reason the if statement in [1] doesn't seem to be getting hit. It would nice to put a breakpoint at that location to see what is going on, though I don't remember how to do that with emulators.

[1] https://dxr.mozilla.org/mozilla-central/source/b2g/chrome/content/shell.js#137
[2] https://dxr.mozilla.org/mozilla-central/source/testing/mozbase/mozrunner/mozrunner/base/device.py#26
Flags: needinfo?(ahalberstadt)
No longer work on it.
Assignee: jdai → nobody
The b2g mochitest code has been removed from mozilla-central, so let's WONTFIX.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: