Closed Bug 736220 Opened 13 years ago Closed 13 years ago

Startup crash - ScopedXPComStartup::Initialize

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
critical

Tracking

(firefox13 unaffected)

RESOLVED FIXED
Firefox 14
Tracking Status
firefox13 --- unaffected

People

(Reporter: kats, Assigned: glandium)

References

Details

(Keywords: crash, Whiteboard: [native-crash][startupcrash])

Crash Data

Attachments

(1 file)

Building native Fennec mozilla-central in debug mode results in a startup crash. I've tried a build on Linux and ran that on a Galaxy Tab 10.1, I also have a build on Mac OS X running on a Galaxy Nexus doing the same thing. Both https://hg.mozilla.org/mozilla-central/rev/082d016c341f and https://hg.mozilla.org/mozilla-central/rev/f6d38b80417c demonstrate this problem.

gdb gives me a backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 29240]
TouchBadMemory () at /Users/kats/zspace/mozilla-git/memory/mozalloc/mozalloc_abort.cpp:68
68	    gDummyCounter += *p;   // TODO annotation saying we know 
(gdb) bt
#0  TouchBadMemory () at /Users/kats/zspace/mozilla-git/memory/mozalloc/mozalloc_abort.cpp:68
#1  0x70b0194c in mozalloc_abort (msg=<optimized out>) at /Users/kats/zspace/mozilla-git/memory/mozalloc/mozalloc_abort.cpp:89
#2  0x72ece814 in Abort (aMsg=<optimized out>) at /Users/kats/zspace/mozilla-git/xpcom/base/nsDebugImpl.cpp:388
#3  NS_DebugBreak_P (aSeverity=3, aStr=0x0, aExpr=<optimized out>, aFile=<optimized out>, aLine=93) at /Users/kats/zspace/mozilla-git/xpcom/base/nsDebugImpl.cpp:375
#4  0x72ef89a4 in mozilla::Logger::~Logger (this=0x5fe656e4, __in_chrg=<optimized out>) at /Users/kats/zspace/mozilla-git/ipc/chromium/src/base/logging.cc:47
#5  0x72e92530 in ~LogWrapper (this=<optimized out>, __in_chrg=<optimized out>) at /Users/kats/zspace/mozilla-git/ipc/chromium/src/base/logging.h:57
#6  operator-> (this=<optimized out>) at /Users/kats/zspace/mozilla-git/ipc/chromium/src/base/scoped_ptr.h:93
#7  NS_InitXPCOM2_P (result=0x5fe65b10, binDirectory=0x5bc281a0, appFileLocationProvider=0x5fe65934) at /Users/kats/zspace/mozilla-git/xpcom/build/nsXPComInit.cpp:380
#8  0x7226e88e in ScopedXPCOMStartup::Initialize (this=0x5fe65b10) at /Users/kats/zspace/mozilla-git/toolkit/xre/nsAppRunner.cpp:1185
#9  0x72271f7e in XRE_main (argc=<optimized out>, argv=<optimized out>, aAppData=<optimized out>) at /Users/kats/zspace/mozilla-git/toolkit/xre/nsAppRunner.cpp:3455
#10 0x72277cda in GeckoStart (data=0x14e3f0, appData=0x56c78634) at /Users/kats/zspace/mozilla-git/toolkit/xre/nsAndroidStartup.cpp:109
#11 0x56c6e296 in Java_org_mozilla_gecko_GeckoAppShell_nativeRun (jenv=0x1b5098, jc=<optimized out>, jargs=0x41925668)
    at /Users/kats/zspace/mozilla-git/mozglue/android/APKOpen.cpp:873
#12 0x407fbc74 in dvmPlatformInvoke () from /Users/kats/android/jdb/moz-gdb/lib/01466E640801401C/system/lib/libdvm.so
#13 0x4083606c in dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*) ()
   from /Users/kats/android/jdb/moz-gdb/lib/01466E640801401C/system/lib/libdvm.so
#14 0x40837d9a in dvmResolveNativeMethod(unsigned int const*, JValue*, Method const*, Thread*) ()
   from /Users/kats/android/jdb/moz-gdb/lib/01466E640801401C/system/lib/libdvm.so
#15 0x4080dad0 in dvmJitToInterpNoChain () from /Users/kats/android/jdb/moz-gdb/lib/01466E640801401C/system/lib/libdvm.so
#16 0x4080dad0 in dvmJitToInterpNoChain () from /Users/kats/android/jdb/moz-gdb/lib/01466E640801401C/system/lib/libdvm.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
I/Gecko   ( 8669): ###!!! ABORT: file /builds/slave/m-in-andrd-dbg/build/ipc/chromium/src/base/scoped_ptr.h, line 93

That would be bug 716544.
Most likely this: http://hg.mozilla.org/integration/mozilla-inbound/rev/27afd563db7b

But if we go for a backout, we should backout the whole thing.
Building with those patches backed out gave me this:

03-15 22:30:03.789 I/GeckoApp(30075): start
03-15 22:30:03.797 I/GeckoApp(30075): resume
03-15 22:30:03.875 D/dalvikvm(30075): GC_CONCURRENT freed 77K, 1% free 14845K/14983K, paused 2ms+2ms
03-15 22:30:03.898 W/GeckoProfile(30075): zerdatime 96777143 - start check sessionstore.js exists
03-15 22:30:03.898 W/GeckoProfile(30075): zerdatime 96777143 - finish check sessionstore.js exists
03-15 22:30:03.898 D/GeckoFavicons(30075): Creating Favicons instance
03-15 22:30:03.898 D/GeckoFavicons(30075): Creating DatabaseHelper
03-15 22:30:03.898 W/GeckoApp(30075): zerdatime 96777146 - start of getPluginDirectories
03-15 22:30:03.898 W/GeckoApp(30075): zerdatime 96777147 - end of getPluginDirectories
03-15 22:30:03.906 I/GeckoAppShell(30075): env0: null
03-15 22:30:03.914 D/dalvikvm(30075): Trying to load lib /data/data/org.mozilla.fennec_kats/lib/libmozglue.so 0x41804188
03-15 22:30:03.914 D/dalvikvm(30075): Shared lib '/data/data/org.mozilla.fennec_kats/lib/libmozglue.so' already loaded in same CL 0x41804188
03-15 22:30:03.914 E/GeckoLibLoad(30075): Load sqlite start
03-15 22:30:03.922 W/GeckoApp(30075): zerdatime 96777171 - UI almost up
03-15 22:30:03.961 E/GeckoLinker(30075): /data/app/org.mozilla.fennec_kats-1.apk!/libmozsqlite3.so: Text relocations are not supported
03-15 22:30:03.961 D/dalvikvm(30075): GC_FOR_ALLOC freed 178K, 2% free 15073K/15303K, paused 23ms
03-15 22:30:03.961 I/dalvikvm-heap(30075): Grow heap (frag case) to 15.152MB for 406484-byte allocation
03-15 22:30:03.969 E/GeckoLibLoad(30075): Couldn't get a handle to libmozsqlite3!
03-15 22:30:03.969 E/GeckoLibLoad(30075): Throw
03-15 22:30:03.992 D/dalvikvm(30075): GC_FOR_ALLOC freed 4K, 2% free 15465K/15751K, paused 23ms
03-15 22:30:03.992 W/GeckoApp(30075): zerdatime 96777240 - pre checkLaunchState
03-15 22:30:03.992 I/GeckoApp(30075): checking profile migration in: /data/data/org.mozilla.fennec_kats/files/mozilla/j58vr066.default
03-15 22:30:04.000 I/ProfMigr(30075): Opening path: /data/data/org.mozilla.fennec_kats/files/mozilla/j58vr066.default/places.sqlite
03-15 22:30:04.000 I/ProfMigr(30075): No database
03-15 22:30:04.000 I/GeckoApp(30075): Profile migration took 1 ms
03-15 22:30:04.000 E/GeckoLibLoad(30075): Load sqlite done
03-15 22:30:04.000 W/dalvikvm(30075): threadid=12: thread exiting with uncaught exception (group=0x40a421f8)
03-15 22:30:04.000 E/GeckoAppShell(30075): >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 982 ("Thread-982")
03-15 22:30:04.000 E/GeckoAppShell(30075): java.lang.Exception: Error loading sqlite libraries
03-15 22:30:04.000 E/GeckoAppShell(30075): 	at org.mozilla.gecko.GeckoAppShell.loadSQLiteLibsNative(Native Method)
03-15 22:30:04.000 E/GeckoAppShell(30075): 	at org.mozilla.gecko.GeckoAppShell.loadSQLiteLibs(GeckoAppShell.java:373)
03-15 22:30:04.000 E/GeckoAppShell(30075): 	at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:92)
03-15 22:30:04.000 F/libc    (30075): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)


Might be interference from somewhere else; I probably need to clean out all the accumulated junk from my partial builds and rebuild. Just putting it here in case somebody else tries this too.
> /data/app/org.mozilla.fennec_kats-1.apk!/libmozsqlite3.so: Text relocations are not supported

You most definitely have something else going on.
Crash Signature: [@ TouchBadMemory]
Depends on: 722044
Keywords: crash
Hardware: All → ARM
Whiteboard: [native-crash][startupcrash]
I am testing a patch on try:
https://tbpl.mozilla.org/?tree=Try&rev=f97d42e0bc53

This is based on the theory that that assert definition was actually *always* overriddent by the one from assert.h, which I'm testing too (validated locally for android debug):
https://tbpl.mozilla.org/?tree=Try&rev=3701d13b8d89
That one reverts bug 716544 and replaces the assert definition from logging.h with something that always fails to build.
(In reply to Mike Hommey [:glandium] from comment #5)
> > /data/app/org.mozilla.fennec_kats-1.apk!/libmozsqlite3.so: Text relocations are not supported
> 
> You most definitely have something else going on.

Yeah, a clean build made this go away.
Both try builds ended up completely green (see comment 6), and the resulting android debug build works fine. So the problem is that the assert definition in logging.h was broken. Bug 716544 made it be used, while it turns out it was absolutely never used before. It's thus okay to remove it.
Attachment #606578 - Flags: review?(jones.chris.g)
Ping!

Many more people are starting to encounter this crash as they update their checkouts to latest m-c. Please fix or backout ASAP.
Attachment #606578 - Flags: review?(jones.chris.g) → review+
Assignee: nobody → mh+mozilla
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 14
Crash Signature: [@ TouchBadMemory] → [@ TouchBadMemory] [@ TouchBadMemory | mozalloc_abort | NS_DebugBreak_P | mozilla::Logger::~Logger]
Blocks: 719373
Crash Signature: [@ TouchBadMemory] [@ TouchBadMemory | mozalloc_abort | NS_DebugBreak_P | mozilla::Logger::~Logger] → [@ TouchBadMemory] [@ TouchBadMemory | mozalloc_abort | NS_DebugBreak_P | mozilla::Logger::~Logger ]
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: