Closed Bug 980579 Opened 6 years ago Closed 6 years ago

Gecko crashes whenever nsIAppStartup.quit() is called on b2g emulators


(Firefox OS Graveyard :: Emulator, defect)

Gonk (Firefox OS)
Not set


(Not tracked)



(Reporter: ahal, Unassigned)



Crash Data


(3 files, 2 obsolete files)

Attached patch Patch to reproduce (obsolete) — Splinter Review
Bug 969146 has a patch which made the mochitest harness check_for_crashes after each run, regardless of whether or not there was a timeout. It got backed out because it turns out that B2G emulators *do* crash at the end of every mochitest run:

This bug is preventing us from doing proper crash detection/reporting as it could be hiding other legitimate crashes. This crash isn't limited to the end of a mochitest run, it appears to happen anytime nsIAppStartup.quit() is called.

* Apply the attached patch to gecko (no need to rebuild)
* run ./mach mochitest-remote with an emulator build
* wait until crash happens
Attached file crash stack (obsolete) —
Oh, if you want to see the crash stack locally, you'll also need to apply the patch in bug 969146:
Vicamo, do you mind taking a quick look or directing me towards someone who can? This is preventing us from properly detecting child process crashes in our automation.
Flags: needinfo?(vyang)
Actually I think this might be a graphics bug.. please change component if this is the case.
Summary: B2G emulator crashes whenever nsIAppStartup.quit() is called → Gecko crashes whenever nsIAppStartup.quit() is called on b2g emulators
I think Benoit Jacob would be a better person to this :)
Flags: needinfo?(vyang) → needinfo?(bjacob)
I'm back from vacation, but I'll be off again for 3 days from Wednesday to Friday. See if you can wait that long --- otherwise, yes, I should be able to (try to) debug that.
Flags: needinfo?(bjacob)
The attached crash stack shows clearly that it's a bug in the emulator's implementation of EGL, not a bug in how we're using it. We could either try to work around it, or patch the emulator. The latter would probably be better, and we've done that before.
Does this fix the crash?
Flags: needinfo?(ahalberstadt)
Note: this applies to the 'development' git subdir of the B2G repo in 'emulator' config.
(In reply to Benoit Jacob [:bjacob] from comment #8)
> Created attachment 8392165 [details] [diff] [review]
> Add a missing null pointer check in eglDestroySurface
> Does this fix the crash?

this bug should be the same as Bug 930884, and Bug 776742.
but after apply patch in Bug 930884, it crashes at another point, please refer Bug 983489.
I mark this line and it does not crash
It seems b2g process being killed twice and timing issue and it becomes random crash.
Flags: needinfo?(bjacob)
Ah. Bug 983489 seems like a completely different issue, which I am looking into at the moment.

So the fact that the present patch changes the crash to a different one, suggests that it actually fixes the issue discussed here.

Vicamo or Andrew, maybe consider taking this patch against the emulator, or perhaps you may want to wait until bug 983489 is fixed too.
Flags: needinfo?(bjacob)
Attached file second crash stack
Actually, what Vincent described happens without this patch applied. It looks like bug 930884 fixed (or worked around) the EGL issue.

Here's the new stack. Since this bug is about getting gecko to not crash on shutdown, I'll keep using it for this new issue.
Attachment #8387133 - Attachment is obsolete: true
Flags: needinfo?(ahalberstadt)
Here's an updated patch to reproduce that includes the patch from bug 969146 for convenience. After applying just run |mach mochitest-remote|.
Attachment #8387131 - Attachment is obsolete: true
Crash Signature: [@ + 0x5f9496]
Bah sorry, forgot to re-build my symbols. It is indeed bug 983489 like Vincent said. Since the other bug already has someone assigned, let's resolve this as a duplicate of 930884.
Closed: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 930884
You need to log in before you can comment on or make changes to this bug.