Closed Bug 879202 Opened 11 years ago Closed 11 years ago

On-demand decompression makes debugging problematic

Categories

(Firefox for Android Graveyard :: JimDB, defect)

ARM
Android
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gcp, Unassigned)

Details

As of bug 848764, trying to debug Fennec with jimdb is problematic because we SIGSEGV in random places. Ignoring SIGSEGV in jimdb is possible, but again problematic if a SIGSEGV crasher is exactly what you're trying to debug.

glandium told me to try MOZ_LINKER_ONDEMAND, but using that just leads to continuous:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 21593]
0xb00053a4 in ?? () from /home/morbo/jimdb/moz-gdb/lib/42800C743000157/system/bin/linker
(gdb) bt
#0  0xb00053a4 in ?? () from /home/morbo/jimdb/moz-gdb/lib/42800C743000157/system/bin/linker
#1  0xb000572a in ?? () from /home/morbo/jimdb/moz-gdb/lib/42800C743000157/system/bin/linker
#2  0x80b260ec in ElfLoader::DebuggerHelper::Add (this=0x80b6437c <ElfLoader::Singleton+64>, 
    map=0x5c642052) at /home/morbo/hg/mozilla-central/mozglue/linker/ElfLoader.cpp:752
#3  0x80b26c0a in ElfLoader::Register (this=0x80b6433c <ElfLoader::Singleton>, handle=0x5c642100)
    at /home/morbo/hg/mozilla-central/mozglue/linker/ElfLoader.cpp:409
#4  0x80b251ba in CustomElf::Load (mappable=0x5c636160, path=<optimized out>, flags=<optimized out>)
    at /home/morbo/hg/mozilla-central/mozglue/linker/CustomElf.cpp:216


I'm going to try MOZ_ENABLE_SZIP=1 now. Whatever solution works best should probably be defaulted when --enable-debugging is specified.
That stacktrace indicates something that would fail with or without on-demand decompression.
I confirm that even with MOZ_ENABLE_SZIP=0 I'm still unable to debug anything.
Okay, with MOZ_ENABLE_SZIP=0+MOZ_LINKER_ONDEMAND=0 I'm able to debug on a Nexus 4. 

The above problem occured on a Galaxy Tab 10.1 on Android 3.2. FWIW this platform worked fine before recent linker changes.
The line you're crashing on has not changed in a very long time.
Running with the MOZ_LINKER_ONDEMAND=0 env var was effective for me, but need more investigation on why it doesn't seem to work on Honeycomb.
I have updated JimDB to ignore SIGSEGV caused by on-demand decompression. It seems to work most of the time. I also fixed a bug that should fix the linker crash on the Galaxy Tab. Give it a try!
The new jimdb (note that it needs an update gdbserver) works for me. I'll put this as fixed based on that.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.