Closed Bug 876110 Opened 11 years ago Closed 11 years ago

Crashes before the crash reporter is available lack android traces in logcat

Categories

(Firefox for Android Graveyard :: General, defect)

24 Branch
All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 24

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

When our crash reporter is not yet in place (so, before libxul is loaded and XRE_main called), crashes end up in the bionic segfault handler. The bionic segfault handler displays a very brief summary of the crash, and requests a dump to debuggerd. Then, debuggerd attaches to the crashed with ptrace, gets a dump and displays it in logcat, which is very helpful... except it doesn't work on nightlies.
As briefly mentioned in bug 857108, the reason this doesn't work is because we don't mark OFFICIAL_BUILDs with the debuggable flag in AndroidManifest.xml. The debuggable flag makes the zygote explicitely does PR_SET_DUMPABLE that allows to ptrace processes, which is not possible normally on android because application processes are forked and setuid'ed (the latter part blocking ptrace for good reason in the general context).
But since we're running native code, we can do PR_SET_DUMPABLE ourselves to allow debuggerd to work.
Blocks: 722166
Attachment #754093 - Flags: review?(bugmail.mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/1c254da4d503
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 24
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: