Closed
Bug 1493227
Opened 6 years ago
Closed 6 years ago
Gecko signal handlers conflict with the Oculus Mobile runtime
Categories
(GeckoView :: General, enhancement, P1)
GeckoView
General
Tracking
(geckoview62 wontfix, firefox63 wontfix, firefox64 fixed)
RESOLVED
FIXED
mozilla64
People
(Reporter: rbarker, Assigned: rbarker)
Details
(Whiteboard: [geckoview:fxr:p1])
Attachments
(1 file)
The signal handlers in both the Gecko crash reporter and the GeckoProfile code conflict with the Oculus Mobile runtime and cause crashes and freezes if not initialized before the Oculus Runtime[1]. It was possible to work around the GeckoProfile issue by calling putenv(strdup("MOZ_DISABLE_SIG_HANDLER=1"); before initializing Gecko. But there is no way to control when the crash reporter signal handler gets registered. It would good if Gecko's signal handlers could be made to work with the Oculus Mobile Runtime so the order does not matter. Oculus is using the SIGILL signal to trap certain button presses on the VR controller. This appears to be what is causing the conflict. [1] https://github.com/MozillaReality/FirefoxReality/issues/564
Assignee | ||
Updated•6 years ago
|
Whiteboard: [geckoview:fxr:p1]
Assignee | ||
Comment 1•6 years ago
|
||
Add env var MOZ_DISABLE_EXCEPTION_HANDLER_SIGILL so that the crash reporter will not register a handler for SIGILL when the env var is set. This is needed to work around a conflict with the Oculus Mobile runtime that uses the SIGILL signal to trap the back button on the controller.
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → rbarker
Comment 2•6 years ago
|
||
I was really curious about how this situation came to be, and this seems to be the answer: https://forums.oculusvr.com/developer/discussion/comment/608470/#Comment_608470 This doesn't exactly thrill me, but I guess you don't have many options here.
Assignee | ||
Comment 3•6 years ago
|
||
It doesn't thrill me either. This was the only solution I could find. If some one with more knowledge around signal handlers has a better idea they would like us to try, I would be more than happy to give it a shot. I'm also hampered by the fact that crash reporting can't be built on a Mac so I have to push to try to build an AAR to test with.
Comment 4•6 years ago
|
||
Huh... so what happens when rust code crashes through an illegal instruction (which afaik is what happens on panic), and a) the crash reporter signal handler is not there and b) oculus runtime's signal handler catches it. ?!?
Updated•6 years ago
|
status-geckoview62:
--- → wontfix
Priority: -- → P1
Assignee | ||
Comment 5•6 years ago
|
||
Here is the Firefox Reality issue for context: https://github.com/MozillaReality/FirefoxReality/issues/564 The tl;dr is that there is a race between Gecko and Oculus Mobile runtime. If Gecko registers first, SIGILL doesn't cause any problems, but if Gecko registers second, we get an application freeze when the controller back button is pressed.
Comment 6•6 years ago
|
||
When you say "doesn't cause any problems" though, it would be good to verify that, for example, a panic happening in Rust code still gets caught by our exception handler and not swallowed by the Oculus handler.
Assignee | ||
Comment 7•6 years ago
|
||
Correct. The bigger issue for Firefox Reality is it shipped with no crash reporting at all so we are totally blind right now. Oculus has been reluctant to engage on issues. So not freezing when the back button is pressed is what I meant by no issues. Even working around this issue there are still more with regards to crash reporting that need to be sorted out: https://bugzilla.mozilla.org/show_bug.cgi?id=1493232 I'm just trying to get something into the product so we have at least an inkling of what is going on, even if it is only partial coverage. I already had to set MOZ_DISABLE_SIG_HANDLER=1 to prevent the sig hanlder in the profile lock from crashing on Oculus. I would much prefer a solution that does not require me to turn anything off, but some coverage is better than none at this point.
Comment 8•6 years ago
|
||
Comment on attachment 9011573 [details] Bug 1493227 - Add environment variable to prevent crash reporter from handling SIGILL r=ted Gabriele Svelto [:gsvelto] has approved the revision.
Attachment #9011573 -
Flags: review+
Pushed by rbarker@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a835077cdb63 Add environment variable to prevent crash reporter from handling SIGILL r=gsvelto
Comment 10•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a835077cdb63
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
Comment 11•6 years ago
|
||
63=wontfix because FxR ships GV 64.
status-firefox63:
--- → wontfix
QA Contact: nchen
Updated•6 years ago
|
Assignee: rbarker → nobody
Updated•6 years ago
|
Assignee: nobody → rbarker
Updated•5 years ago
|
Product: Firefox for Android → GeckoView
Updated•5 years ago
|
Target Milestone: Firefox 64 → mozilla64
You need to log in
before you can comment on or make changes to this bug.
Description
•