Closed Bug 1189426 Opened 4 years ago Closed 4 years ago

Assertion failure: false, at dom/storage/DOMStorageDBThread.cpp:192

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: gcp, Assigned: mayhemer)

Details

Attachments

(1 file)

I'm trying to debug an unrelated crash bug on Android. When compiled in debug mode, Fennec crashes with:

W/GeckoGlobalHistory(12640): Rebuilding visited link set...
I/Gecko   (12640): ++DOCSHELL 0x8eae4400 == 4 [pid = 12640] [id = 4]
I/Gecko   (12640): ++DOMWINDOW == 10 (0x8eae6400) [pid = 12640] [serial = 10] [outer = 0x0]
I/Gecko   (12640): ++DOMWINDOW == 11 (0x8eae7c00) [pid = 12640] [serial = 11] [outer = 0x8eae6400]
F/MOZ_Assert(12640): Assertion failure: false, at /home/morbo/hg/mozilla-central/dom/storage/DOMStorageDBThread.cpp:192
F/libc    (12640): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 12658 (Gecko)
I/ActivityManager(  563): Process org.mozilla.fennec_morbo (pid 12640) has died.

...before I can get to my problem.

It's possible on-disk files are partially written but we should be robust against that.
Summary: Assertion failure: false, at /home/morbo/hg/mozilla-central/dom/storage/DOMStorageDBThread.cpp:192 → Assertion failure: false, at dom/storage/DOMStorageDBThread.cpp:192
Removing just the assert eventually lead to a hang:

#0  0x400675d0 in __futex_syscall3 () from /home/morbo/git/jimdb-arm/lib/00658c727e962a43/system/lib/libc.so
#1  0x400596ac in __pthread_cond_timedwait_relative ()
   from /home/morbo/git/jimdb-arm/lib/00658c727e962a43/system/lib/libc.so
#2  0x4005970c in __pthread_cond_timedwait () from /home/morbo/git/jimdb-arm/lib/00658c727e962a43/system/lib/libc.so
#3  0x7746f98c in PR_WaitCondVar (cvar=0x8dc777c0, timeout=4294967295)
    at /home/morbo/hg/mozilla-central/nsprpub/pr/src/pthreads/ptsynch.c:396
#4  0x7b906624 in mozilla::CondVar::Wait (this=0x8f203bdc, aInterval=4294967295)
    at /home/morbo/hg/mozilla-central/xpcom/glue/BlockingResourceBase.cpp:501
#5  0x7d1234cc in Wait (aInterval=4294967295, this=0x8f203bc8) at ../../dist/include/mozilla/Monitor.h:40
#6  Wait (aInterval=4294967295, this=<synthetic pointer>) at ../../dist/include/mozilla/Monitor.h:88
#7  mozilla::dom::DOMStorageCache::LoadWait (this=0x8f203b00)
    at /home/morbo/hg/mozilla-central/dom/storage/DOMStorageCache.cpp:691
#8  0x7d12d08c in mozilla::dom::DOMStorageDBThread::SyncPreload (this=0x8c7e5900, aCache=0x8f203b00, 
    aForceSync=<optimized out>) at /home/morbo/hg/mozilla-central/dom/storage/DOMStorageDBThread.cpp:123
#9  0x7d1243ba in mozilla::dom::DOMStorageCache::WaitForPreload (this=0x8f203b00, 
    aTelemetryID=aTelemetryID@entry=mozilla::Telemetry::LOCALDOMSTORAGE_GETVALUE_BLOCKING_MS)
    at /home/morbo/hg/mozilla-central/dom/storage/DOMStorageCache.cpp:349
#10 0x7d125970 in mozilla::dom::DOMStorageCache::GetItem (this=0x8f203b00, aStorage=aStorage@entry=0x8b2dbc00, 
    aKey=..., aRetval=...) at /home/morbo/hg/mozilla-central/dom/storage/DOMStorageCache.cpp:447
#11 0x7d127360 in mozilla::dom::DOMStorage::GetItem (this=0x8b2dbc00, aKey=..., aResult=..., aRv=...)
    at /home/morbo/hg/mozilla-central/dom/storage/DOMStorage.cpp:102
#12 0x7c991b16 in mozilla::dom::StorageBinding::getItem (cx=0x73ddf420, obj=..., self=0x8b2dbc00, args=...)
    at /home/morbo/hg/mozilla-central/objdir-android/dom/bindings/StorageBinding.cpp:103
#13 0x7cc9bdde in mozilla::dom::GenericBindingMethod (cx=0x73ddf420, argc=<optimized out>, vp=<optimized out>)
    at /home/morbo/hg/mozilla-central/dom/bindings/BindingUtils.cpp:2593
#14 0x7e3cdb36 in js::CallJSNative (cx=cx@entry=0x73ddf420, 
    native=0x7cc9bc85 <mozilla::dom::GenericBindingMethod(JSContext*, unsigned int, JS::Value*)>, args=...)
    at /home/morbo/hg/mozilla-central/js/src/jscntxtinlines.h:235
#15 0x7e3c4648 in js::Invoke (cx=cx@entry=0x73ddf420, args=..., construct=construct@entry=js::NO_CONSTRUCT)
    at /home/morbo/hg/mozilla-central/js/src/vm/Interpreter.cpp:811
#16 0x7e3bdf98 in Interpret (cx=cx@entry=0x73ddf420, state=...)
    at /home/morbo/hg/mozilla-central/js/src/vm/Interpreter.cpp:3073
#17 0x7e3c3ccc in js::RunScript (cx=cx@entry=0x73ddf420, state=...)
    at /home/morbo/hg/mozilla-central/js/src/vm/Interpreter.cpp:752
#18 0x7e3cba62 in js::ExecuteKernel (cx=cx@entry=0x73ddf420, script=..., script@entry=..., scopeChainArg=..., 
    thisv=..., newTargetValue=..., type=type@entry=js::EXECUTE_GLOBAL, evalInFrame=evalInFrame@entry=..., 
    result=result@entry=0x0) at /home/morbo/hg/mozilla-central/js/src/vm/Interpreter.cpp:993
#19 0x7e3cbc7c in js::Execute (cx=0x73ddf420, script=..., scopeChainArg=..., rval=0x0)
    at /home/morbo/hg/mozilla-central/js/src/vm/Interpreter.cpp:1027
#20 0x7e72020c in Evaluate (cx=cx@entry=0x73ddf420, scope=..., staticScope=staticScope@entry=..., optionsArg=..., 
    srcBuf=..., rval=..., rval@entry=...) at /home/morbo/hg/mozilla-central/js/src/jsapi.cpp:4461
#21 0x7e7206d0 in Evaluate (cx=0x73ddf420, scopeChain=..., optionsArg=..., srcBuf=..., rval=rval@entry=...)
    at /home/morbo/hg/mozilla-central/js/src/jsapi.cpp:4487
#22 0x7e720748 in JS::Evaluate (cx=<optimized out>, scopeChain=..., optionsArg=..., srcBuf=..., rval=...)
    at /home/morbo/hg/mozilla-central/js/src/jsapi.cpp:4542
#23 0x7c5e73aa in nsJSUtils::EvaluateString (aCx=aCx@entry=0x73ddf420, aSrcBuf=..., aEvaluationGlobal=..., 
    aEvaluationGlobal@entry=..., aCompileOptions=..., aEvaluateOptions=..., aRetValue=aRetValue@entry=..., 
    aOffThreadToken=aOffThreadToken@entry=0x0) at /home/morbo/hg/mozilla-central/dom/base/nsJSUtils.cpp:224
#24 0x7c5e7a60 in nsJSUtils::EvaluateString (aCx=0x73ddf420, aSrcBuf=..., aEvaluationGlobal=..., aCompileOptions=..., 
    aOffThreadToken=0x0) at /home/morbo/hg/mozilla-central/dom/base/nsJSUtils.cpp:287
#25 0x7c60a3da in nsScriptLoader::EvaluateScript (this=this@entry=0x848a7240, aRequest=aRequest@entry=0x848b62f0, 
    aSrcBuf=..., aOffThreadToken=aOffThreadToken@entry=0x0)
    at /home/morbo/hg/mozilla-central/dom/base/nsScriptLoader.cpp:1144
#26 0x7c60d314 in nsScriptLoader::ProcessRequest (this=this@entry=0x848a7240, aRequest=aRequest@entry=0x848b62f0, 
    aOffThreadToken=aOffThreadToken@entry=0x0) at /home/morbo/hg/mozilla-central/dom/base/nsScriptLoader.cpp:970
---Type <return> to continue, or q <return> to quit---
#27 0x7c6134f0 in nsScriptLoader::ProcessScriptElement (this=this@entry=0x848a7240, aElement=aElement@entry=0x8b2d52d4)
    at /home/morbo/hg/mozilla-central/dom/base/nsScriptLoader.cpp:688
#28 0x7c614864 in nsScriptElement::MaybeProcessScript (this=0x8b2d52d4)
    at /home/morbo/hg/mozilla-central/dom/base/nsScriptElement.cpp:141
#29 0x7c226744 in AttemptToExecute (this=0x8b2d52d4) at /home/morbo/hg/mozilla-central/dom/base/nsIScriptElement.h:221
#30 nsHtml5TreeOpExecutor::RunScript (this=this@entry=0x8dc33180, aScriptElement=<optimized out>)
    at /home/morbo/hg/mozilla-central/parser/html/nsHtml5TreeOpExecutor.cpp:662
#31 0x7c227586 in nsHtml5TreeOpExecutor::RunFlushLoop (this=0x8dc33180)
    at /home/morbo/hg/mozilla-central/parser/html/nsHtml5TreeOpExecutor.cpp:487
#32 0x7c230c6a in nsHtml5ExecutorReflusher::Run (this=<optimized out>)
    at /home/morbo/hg/mozilla-central/parser/html/nsHtml5TreeOpExecutor.cpp:55
#33 0x7b8e968e in nsThread::ProcessNextEvent (this=0x73d43a10, aMayWait=<optimized out>, aResult=0x73eff88f)
    at /home/morbo/hg/mozilla-central/xpcom/threads/nsThread.cpp:867
#34 0x7b914484 in NS_ProcessNextEvent (aThread=<optimized out>, aMayWait=<optimized out>)
    at /home/morbo/hg/mozilla-central/xpcom/glue/nsThreadUtils.cpp:277
#35 0x7bbd4f62 in mozilla::ipc::MessagePump::Run (this=0x73d6b5b0, aDelegate=0x73d840c0)
    at /home/morbo/hg/mozilla-central/ipc/glue/MessagePump.cpp:95
#36 0x7bba092a in MessageLoop::RunInternal (this=this@entry=0x73d840c0)
    at /home/morbo/hg/mozilla-central/ipc/chromium/src/base/message_loop.cc:234
#37 0x7bba0aa8 in RunHandler (this=0x73d840c0)
    at /home/morbo/hg/mozilla-central/ipc/chromium/src/base/message_loop.cc:227
#38 MessageLoop::Run (this=0x73d840c0) at /home/morbo/hg/mozilla-central/ipc/chromium/src/base/message_loop.cc:201
#39 0x7d4db66a in nsBaseAppShell::Run (this=0x73de72c0) at /home/morbo/hg/mozilla-central/widget/nsBaseAppShell.cpp:165
#40 0x7dce4532 in nsAppStartup::Run (this=0x86f63c40)
    at /home/morbo/hg/mozilla-central/toolkit/components/startup/nsAppStartup.cpp:280
#41 0x7dd4738a in XREMain::XRE_mainRun (this=this@entry=0x73effae4)
    at /home/morbo/hg/mozilla-central/toolkit/xre/nsAppRunner.cpp:4288
#42 0x7dd47876 in XREMain::XRE_main (this=this@entry=0x73effae4, argc=argc@entry=10, argv=argv@entry=0x73d2e708, 
    aAppData=aAppData@entry=0x73ab9700 <sAppData>) at /home/morbo/hg/mozilla-central/toolkit/xre/nsAppRunner.cpp:4385
#43 0x7dd47ba4 in XRE_main (argc=10, argv=0x73d2e708, aAppData=0x73ab9700 <sAppData>, aFlags=<optimized out>)
    at /home/morbo/hg/mozilla-central/toolkit/xre/nsAppRunner.cpp:4474
#44 0x7dd4fbc0 in GeckoStart (data=<optimized out>, appData=0x73ab9700 <sAppData>)
    at /home/morbo/hg/mozilla-central/toolkit/xre/nsAndroidStartup.cpp:73
#45 0x73a73e18 in Java_org_mozilla_gecko_mozglue_GeckoLoader_nativeRun (jenv=<optimized out>, jc=<optimized out>, 
    jargs=0x20900005) at /home/morbo/hg/mozilla-central/mozglue/android/APKOpen.cpp:390
#46 0x40891c50 in dvmPlatformInvoke () from /home/morbo/git/jimdb-arm/lib/00658c727e962a43/system/lib/libdvm.so
#47 0x408c1ed2 in dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*) ()
   from /home/morbo/git/jimdb-arm/lib/00658c727e962a43/system/lib/libdvm.so
#48 0x408c38be in dvmResolveNativeMethod(unsigned int const*, JValue*, Method const*, Thread*) ()
   from /home/morbo/git/jimdb-arm/lib/00658c727e962a43/system/lib/libdvm.so
That assertion fires if we're launching the storage thread too late in shutdown.  Not sure why you would expect removing it to help.
Component: DOM: IndexedDB → DOM
Because that matches release mode? I'm trying to debug my own bugs :-)
This is the actual stack on the assert itself:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 17195]
0x7d32cea2 in mozilla::dom::DOMStorageDBThread::InsertDBOp (this=this@entry=0x8c7c9300, 
    aOperation=aOperation@entry=0x8ed114f0) at /home/morbo/hg/mozilla-central/dom/storage/DOMStorageDBThread.cpp:192
192         MOZ_ASSERT(false);
(gdb) bt
#0  0x7d32cea2 in mozilla::dom::DOMStorageDBThread::InsertDBOp (this=this@entry=0x8c7c9300, 
    aOperation=aOperation@entry=0x8ed114f0) at /home/morbo/hg/mozilla-central/dom/storage/DOMStorageDBThread.cpp:192
#1  0x7d3312aa in mozilla::dom::DOMStorageDBThread::AsyncPreload (this=0x8c7c9300, aCache=0x8f337500, 
    aPriority=<optimized out>) at /home/morbo/hg/mozilla-central/dom/storage/DOMStorageDBThread.h:249
#2  0x7d32e02e in mozilla::dom::DOMStorageCache::Preload (this=this@entry=0x8f337500)
    at /home/morbo/hg/mozilla-central/dom/storage/DOMStorageCache.cpp:237
#3  0x7d32ec52 in mozilla::dom::DOMStorageCache::Init (this=this@entry=0x8f337500, aManager=aManager@entry=0x8c7fdca0, 
    aPersistent=aPersistent@entry=true, aPrincipal=aPrincipal@entry=0x8dc9c740, aQuotaScope=...)
    at /home/morbo/hg/mozilla-central/dom/storage/DOMStorageCache.cpp:140
#4  0x7d32f102 in mozilla::dom::DOMStorageManager::PutCache (this=this@entry=0x8c7fdca0, aScope=..., 
    aPrincipal=aPrincipal@entry=0x8dc9c740) at /home/morbo/hg/mozilla-central/dom/storage/DOMStorageManager.cpp:289
#5  0x7d32f42a in mozilla::dom::DOMStorageManager::GetStorageInternal (this=0x8c7fdca0, aCreate=aCreate@entry=true, 
    aWindow=aWindow@entry=0x8dca6810, aPrincipal=aPrincipal@entry=0x8dc9c740, aDocumentURI=..., 
    aPrivate=aPrivate@entry=false, aRetval=aRetval@entry=0x73e5a5e4)
    at /home/morbo/hg/mozilla-central/dom/storage/DOMStorageManager.cpp:351
#6  0x7d32f4ae in mozilla::dom::DOMStorageManager::CreateStorage (this=<optimized out>, aWindow=0x8dca6810, 
    aPrincipal=0x8dc9c740, aDocumentURI=..., aPrivate=false, aRetval=0x73e5a5e4)
    at /home/morbo/hg/mozilla-central/dom/storage/DOMStorageManager.cpp:382
#7  0x7c6a102a in nsGlobalWindow::GetLocalStorage (this=0x8dca6800, aError=...)
    at /home/morbo/hg/mozilla-central/dom/base/nsGlobalWindow.cpp:10927
#8  0x7ccc9242 in mozilla::dom::WindowBinding::get_localStorage (cx=0x740df420, obj=..., self=<optimized out>, 
    args=...) at /home/morbo/hg/mozilla-central/objdir-android/dom/bindings/WindowBinding.cpp:12388
#9  0x7ccb7730 in mozilla::dom::WindowBinding::genericGetter (cx=0x740df420, argc=<optimized out>, vp=<optimized out>)
    at /home/morbo/hg/mozilla-central/objdir-android/dom/bindings/WindowBinding.cpp:12986
#10 0x7e5cdb36 in js::CallJSNative (cx=cx@entry=0x740df420, 
    native=0x7ccb75e9 <mozilla::dom::WindowBinding::genericGetter(JSContext*, unsigned int, JS::Value*)>, args=...)
    at /home/morbo/hg/mozilla-central/js/src/jscntxtinlines.h:235
#11 0x7e5c4648 in js::Invoke (cx=cx@entry=0x740df420, args=..., construct=construct@entry=js::NO_CONSTRUCT)
    at /home/morbo/hg/mozilla-central/js/src/vm/Interpreter.cpp:811
#12 0x7e5c4da6 in js::Invoke (cx=cx@entry=0x740df420, thisv=..., fval=..., argc=argc@entry=0, argv=argv@entry=0x0, 
    rval=rval@entry=...) at /home/morbo/hg/mozilla-central/js/src/vm/Interpreter.cpp:866
#13 0x7e5c4eb2 in js::InvokeGetter (cx=cx@entry=0x740df420, obj=0x84012160, fval=..., rval=rval@entry=...)
    at /home/morbo/hg/mozilla-central/js/src/vm/Interpreter.cpp:942
#14 0x7e5c5046 in CallGetter (vp=..., shape=..., receiver=..., obj=..., cx=0x740df420)
    at /home/morbo/hg/mozilla-central/js/src/vm/NativeObject.cpp:1654
#15 GetExistingProperty<(js::AllowGC)1> (cx=cx@entry=0x740df420, receiver=receiver@entry=..., obj=obj@entry=..., 
    shape=shape@entry=..., vp=vp@entry=...) at /home/morbo/hg/mozilla-central/js/src/vm/NativeObject.cpp:1706
#16 0x7e5e4266 in NativeGetExistingProperty (vp=..., shape=..., obj=..., receiver=..., cx=0x740df420)
    at /home/morbo/hg/mozilla-central/js/src/vm/NativeObject.cpp:1724
#17 js::FetchName<false> (cx=cx@entry=0x740df420, obj=..., obj@entry=..., obj2=obj2@entry=..., name=name@entry=..., 
    shape=shape@entry=..., vp=vp@entry=...) at /home/morbo/hg/mozilla-central/js/src/vm/Interpreter-inl.h:218
#18 0x7e5be67c in GetNameOperation (vp=..., pc=0x8f341155 "\232", fp=<optimized out>, cx=0x740df420)
    at /home/morbo/hg/mozilla-central/js/src/vm/Interpreter.cpp:302
#19 Interpret (cx=cx@entry=0x740df420, state=...) at /home/morbo/hg/mozilla-central/js/src/vm/Interpreter.cpp:3200
#20 0x7e5c3ccc in js::RunScript (cx=cx@entry=0x740df420, state=...)
    at /home/morbo/hg/mozilla-central/js/src/vm/Interpreter.cpp:752
#21 0x7e5cba62 in js::ExecuteKernel (cx=cx@entry=0x740df420, script=..., script@entry=..., scopeChainArg=..., 
    thisv=..., newTargetValue=..., type=type@entry=js::EXECUTE_GLOBAL, evalInFrame=evalInFrame@entry=..., 
    result=result@entry=0x0) at /home/morbo/hg/mozilla-central/js/src/vm/Interpreter.cpp:993
#22 0x7e5cbc7c in js::Execute (cx=0x740df420, script=..., scopeChainArg=..., rval=0x0)
    at /home/morbo/hg/mozilla-central/js/src/vm/Interpreter.cpp:1027
#23 0x7e92020c in Evaluate (cx=cx@entry=0x740df420, scope=..., staticScope=staticScope@entry=..., optionsArg=..., 
    srcBuf=..., rval=..., rval@entry=...) at /home/morbo/hg/mozilla-central/js/src/jsapi.cpp:4461
#24 0x7e9206d0 in Evaluate (cx=0x740df420, scopeChain=..., optionsArg=..., srcBuf=..., rval=rval@entry=...)
    at /home/morbo/hg/mozilla-central/js/src/jsapi.cpp:4487
---Type <return> to continue, or q <return> to quit---
#25 0x7e920748 in JS::Evaluate (cx=<optimized out>, scopeChain=..., optionsArg=..., srcBuf=..., rval=...)
    at /home/morbo/hg/mozilla-central/js/src/jsapi.cpp:4542
#26 0x7c7e73aa in nsJSUtils::EvaluateString (aCx=aCx@entry=0x740df420, aSrcBuf=..., aEvaluationGlobal=..., 
    aEvaluationGlobal@entry=..., aCompileOptions=..., aEvaluateOptions=..., aRetValue=aRetValue@entry=..., 
    aOffThreadToken=aOffThreadToken@entry=0x0) at /home/morbo/hg/mozilla-central/dom/base/nsJSUtils.cpp:224
#27 0x7c7e7a60 in nsJSUtils::EvaluateString (aCx=0x740df420, aSrcBuf=..., aEvaluationGlobal=..., aCompileOptions=..., 
    aOffThreadToken=0x0) at /home/morbo/hg/mozilla-central/dom/base/nsJSUtils.cpp:287
#28 0x7c80a3da in nsScriptLoader::EvaluateScript (this=this@entry=0x8db023c0, aRequest=aRequest@entry=0x8dcec030, 
    aSrcBuf=..., aOffThreadToken=aOffThreadToken@entry=0x0)
    at /home/morbo/hg/mozilla-central/dom/base/nsScriptLoader.cpp:1144
#29 0x7c80d314 in nsScriptLoader::ProcessRequest (this=this@entry=0x8db023c0, aRequest=aRequest@entry=0x8dcec030, 
    aOffThreadToken=aOffThreadToken@entry=0x0) at /home/morbo/hg/mozilla-central/dom/base/nsScriptLoader.cpp:970
#30 0x7c8134f0 in nsScriptLoader::ProcessScriptElement (this=this@entry=0x8db023c0, aElement=aElement@entry=0x8f32b6d4)
    at /home/morbo/hg/mozilla-central/dom/base/nsScriptLoader.cpp:688
#31 0x7c814864 in nsScriptElement::MaybeProcessScript (this=0x8f32b6d4)
    at /home/morbo/hg/mozilla-central/dom/base/nsScriptElement.cpp:141
#32 0x7c426744 in AttemptToExecute (this=0x8f32b6d4) at /home/morbo/hg/mozilla-central/dom/base/nsIScriptElement.h:221
#33 nsHtml5TreeOpExecutor::RunScript (this=this@entry=0x8db10f00, aScriptElement=<optimized out>)
    at /home/morbo/hg/mozilla-central/parser/html/nsHtml5TreeOpExecutor.cpp:662
#34 0x7c427586 in nsHtml5TreeOpExecutor::RunFlushLoop (this=0x8db10f00)
    at /home/morbo/hg/mozilla-central/parser/html/nsHtml5TreeOpExecutor.cpp:487
#35 0x7c430c6a in nsHtml5ExecutorReflusher::Run (this=<optimized out>)
    at /home/morbo/hg/mozilla-central/parser/html/nsHtml5TreeOpExecutor.cpp:55
#36 0x7bae968e in nsThread::ProcessNextEvent (this=0x74043a10, aMayWait=<optimized out>, aResult=0x73e5b88f)
    at /home/morbo/hg/mozilla-central/xpcom/threads/nsThread.cpp:867
#37 0x7bb14484 in NS_ProcessNextEvent (aThread=<optimized out>, aMayWait=<optimized out>)
    at /home/morbo/hg/mozilla-central/xpcom/glue/nsThreadUtils.cpp:277
#38 0x7bdd4f62 in mozilla::ipc::MessagePump::Run (this=0x7406b5b0, aDelegate=0x740840c0)
    at /home/morbo/hg/mozilla-central/ipc/glue/MessagePump.cpp:95
#39 0x7bda092a in MessageLoop::RunInternal (this=this@entry=0x740840c0)
    at /home/morbo/hg/mozilla-central/ipc/chromium/src/base/message_loop.cc:234
#40 0x7bda0aa8 in RunHandler (this=0x740840c0)
    at /home/morbo/hg/mozilla-central/ipc/chromium/src/base/message_loop.cc:227
#41 MessageLoop::Run (this=0x740840c0) at /home/morbo/hg/mozilla-central/ipc/chromium/src/base/message_loop.cc:201
#42 0x7d6db66a in nsBaseAppShell::Run (this=0x740e72c0) at /home/morbo/hg/mozilla-central/widget/nsBaseAppShell.cpp:165
#43 0x7dee4532 in nsAppStartup::Run (this=0x87063c40)
    at /home/morbo/hg/mozilla-central/toolkit/components/startup/nsAppStartup.cpp:280
#44 0x7df4738a in XREMain::XRE_mainRun (this=this@entry=0x73e5bae4)
    at /home/morbo/hg/mozilla-central/toolkit/xre/nsAppRunner.cpp:4288
#45 0x7df47876 in XREMain::XRE_main (this=this@entry=0x73e5bae4, argc=argc@entry=10, argv=argv@entry=0x7402e708, 
    aAppData=aAppData@entry=0x739a5700 <sAppData>) at /home/morbo/hg/mozilla-central/toolkit/xre/nsAppRunner.cpp:4385
#46 0x7df47ba4 in XRE_main (argc=10, argv=0x7402e708, aAppData=0x739a5700 <sAppData>, aFlags=<optimized out>)
    at /home/morbo/hg/mozilla-central/toolkit/xre/nsAppRunner.cpp:4474
#47 0x7df4fbc0 in GeckoStart (data=<optimized out>, appData=0x739a5700 <sAppData>)
    at /home/morbo/hg/mozilla-central/toolkit/xre/nsAndroidStartup.cpp:73
#48 0x7395fe18 in Java_org_mozilla_gecko_mozglue_GeckoLoader_nativeRun (jenv=<optimized out>, jc=<optimized out>, 
    jargs=0x20900005) at /home/morbo/hg/mozilla-central/mozglue/android/APKOpen.cpp:390
#49 0x40891c50 in dvmPlatformInvoke () from /home/morbo/git/jimdb-arm/lib/00658c727e962a43/system/lib/libdvm.so
#50 0x408c1ed2 in dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*) ()
   from /home/morbo/git/jimdb-arm/lib/00658c727e962a43/system/lib/libdvm.so
#51 0x408c38be in dvmResolveNativeMethod(unsigned int const*, JValue*, Method const*, Thread*) ()
   from /home/morbo/git/jimdb-arm/lib/00658c727e962a43/system/lib/libdvm.so
#52 0x4089b064 in dvmJitToInterpNoChain () from /home/morbo/git/jimdb-arm/lib/00658c727e962a43/system/lib/libdvm.so
#53 0x4089b064 in dvmJitToInterpNoChain () from /home/morbo/git/jimdb-arm/lib/00658c727e962a43/system/lib/libdvm.so
Steps to reproduce for me are trying to reproduce bug 1189058 with the STR in the original comment there.
Ok, so why is mStopIOThread true?  Did we take the early return at http://mxr.mozilla.org/mozilla-central/source/dom/storage/DOMStorageDBThread.cpp#283?  That would be consistent with corrupt files on disk.
Flags: needinfo?(honzab.moz)
The flag is set on one of the two:

http://hg.mozilla.org/mozilla-central/annotate/33dc8a83cfc0/dom/storage/DOMStorageDBThread.cpp#l106
http://hg.mozilla.org/mozilla-central/annotate/33dc8a83cfc0/dom/storage/DOMStorageDBThread.cpp#l289

Check which is called first, I assume the DB open failure.

If it's a failure to open the DB, then we definitely should not assert.  According the stack in comment 4 it doesn't seem to be a shutdown problem apparently.
Flags: needinfo?(honzab.moz) → needinfo?(gpascutto)
Easy solution.
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Attached patch v1Splinter Review
mStatus (falling to a failure state on failure of any sqlite operation) must be checked before the shutdown condition because the thread is shut down in case of the initial database open unrecoverable error (so right after startup)

https://treeherder.mozilla.org/#/jobs?repo=try&revision=3f0ffb30d371
Attachment #8644487 - Flags: review?(bugs)
Attachment #8644487 - Flags: review?(bugs) → review+
Can't easily verify this any more as I've had to wipe the affected profile.
Flags: needinfo?(gpascutto)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/28148663ff57
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.