AsyncShutdown crash: [{"name":"places.sqlite Conn #0: waiting for shutdown","state":"(none)"}] Barrier: Sqlite.jsm: wait until all connections are closed

RESOLVED WORKSFORME

Status

()

Toolkit
Async Tooling
RESOLVED WORKSFORME
3 years ago
3 years ago

People

(Reporter: RyanVM, Unassigned)

Tracking

({crash, intermittent-failure})

Trunk
x86_64
Linux
crash, intermittent-failure
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
https://tbpl.mozilla.org/php/getParsedLog.php?id=40565050&tree=Mozilla-Inbound

Linux x86-64 mozilla-inbound valgrind on 2014-05-28 11:00:54 PDT for push 93dce4b831f3
slave: bld-linux64-spot-452

==31495== Memcheck, a memory error detector
==31495== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==31495== Using Valgrind-3.8.2.SVN.MOZ-13022-2546 and LibVEX; rerun with -h for copyright info
==31495== Command: /builds/slave/m-in-l64-valgrind-000000000000/src/obj-firefox/dist/bin/firefox http://127.0.0.1:36030/ -profile /tmp/tmpo_TEEA
==31495==
==31498==
==31498== HEAP SUMMARY:
==31498==     in use at exit: 227,687 bytes in 777 blocks
==31498==   total heap usage: 1,257 allocs, 480 frees, 260,255 bytes allocated
==31498==
==31498== LEAK SUMMARY:
==31498==    definitely lost: 0 bytes in 0 blocks
==31498==    indirectly lost: 0 bytes in 0 blocks
==31498==      possibly lost: 8,574 bytes in 164 blocks
==31498==    still reachable: 171,322 bytes in 577 blocks
==31498==         suppressed: 47,791 bytes in 36 blocks
==31498== Reachable blocks (those to which a pointer was found) are not shown.
==31498== To see them, rerun with: --leak-check=full --show-reachable=yes
==31498==
==31498== For counts of detected and suppressed errors, rerun with: -v
==31498== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 7)
Xlib:  extension "RANDR" missing on display ":2.0".
WARNING: At least one completion condition is taking too long to complete. Conditions: [{"name":"Sqlite.jsm shutdown blocker","state":{"description":"Waiting for connections to close"}}] Barrier: profile-before-change
WARNING: At least one completion condition is taking too long to complete. Conditions: [{"name":"places.sqlite Conn #0: waiting for shutdown","state":"(none)"}] Barrier: Sqlite.jsm: wait until all connections are closed
ERROR: At least one completion condition failed to complete within a reasonable amount of time. Causing a crash to ensure that we do not leave the user with an unresponsive process draining resources. Conditions: [{"name":"Sqlite.jsm shutdown blocker","state":{"description":"Waiting for connections to close"}}] Barrier: profile-before-change
[31495] ###!!! ABORT: file resource://gre/modules/AsyncShutdown.jsm, line 691
[31495] ###!!! ABORT: file resource://gre/modules/AsyncShutdown.jsm, line 691

TEST-UNEXPECTED-FAIL | valgrind-test | Invalid write of size 4 at mozalloc_abort / Abort / NS_DebugBreak / nsDebugImpl::Abort

==31495== Invalid write of size 4
==31495==    at 0x761858B: mozalloc_abort(char const*) (mozalloc_abort.cpp:30)
==31495==    by 0x8102E59: Abort(char const*) (nsDebugImpl.cpp:435)
==31495==    by 0x8103284: NS_DebugBreak (nsDebugImpl.cpp:392)
==31495==    by 0x81034D5: nsDebugImpl::Abort(char const*, int) (nsDebugImpl.cpp:118)
==31495==    by 0x8154C90: NS_InvokeByIndex (xptcinvoke_x86_64_unix.cpp:164)
==31495==    by 0x8E496B9: XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode) (XPCWrappedNative.cpp:2397)
==31495==    by 0x8E4BF80: XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*) (XPCWrappedNativeJSOps.cpp:1273)
==31495==    by 0xA27AE5F: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:239)
==31495==    by 0xA275F5E: Interpret(JSContext*, js::RunState&) (Interpreter.cpp:2581)
==31495==    by 0xA2790E0: js::RunScript(JSContext*, js::RunState&) (Interpreter.cpp:422)
==31495==    by 0xA27ADD2: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (Interpreter.cpp:494)
==31495==    by 0xA198629: js::CallOrConstructBoundFunction(JSContext*, unsigned int, JS::Value*) (jsfun.cpp:1401)
==31495==    by 0xA27AE5F: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:239)
==31495==    by 0xA181A49: js_fun_call(JSContext*, unsigned int, JS::Value*) (jsfun.cpp:1067)
==31495==    by 0xA27AE5F: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:239)
==31495==    by 0xA27BC18: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value const*, JS::MutableHandle<JS::Value>) (Interpreter.cpp:531)
==31495==    by 0xA1DA24E: js::DirectProxyHandler::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (jsproxy.cpp:448)
==31495==    by 0xA217A4E: js::CrossCompartmentWrapper::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (jswrapper.cpp:464)
==31495==    by 0xA1F8232: js::Proxy::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) (jsproxy.cpp:2663)
==31495==    by 0xA1F8319: js::proxy_Call(JSContext*, unsigned int, JS::Value*) (jsproxy.cpp:3066)
==31495==    by 0xA27B03D: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:239)
==31495==    by 0xA27BC18: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value const*, JS::MutableHandle<JS::Value>) (Interpreter.cpp:531)
==31495==    by 0xA0B30A9: js::jit::DoCallFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICCall_Fallback*, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) (BaselineIC.cpp:8182)
==31495==    by 0x41BBD79: ???
==31495==    by 0x6145877: ???
==31495==    by 0x145A3D03: ???
==31495==    by 0x233D600F: ???
==31495==    by 0x41B3776: ???
==31495==    by 0xA03BA92: EnterBaseline(JSContext*, js::jit::EnterJitData&) (BaselineJIT.cpp:124)
==31495==    by 0xA0B5826: js::jit::EnterBaselineMethod(JSContext*, js::RunState&) (BaselineJIT.cpp:155)
==31495==    by 0xA279176: js::RunScript(JSContext*, js::RunState&) (Interpreter.cpp:411)
==31495==    by 0xA27ADD2: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (Interpreter.cpp:494)
==31495==    by 0xA198629: js::CallOrConstructBoundFunction(JSContext*, unsigned int, JS::Value*) (jsfun.cpp:1401)
==31495==    by 0xA27AE5F: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:239)
==31495==    by 0xA27BC18: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value const*, JS::MutableHandle<JS::Value>) (Interpreter.cpp:531)
==31495==    by 0xA147AFD: JS_CallFunctionValue(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) (jsapi.cpp:5202)
==31495==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

Skipping 457 lines...

==31495==    by 0x814951F: nsThread::ProcessNextEvent(bool, bool*) (nsThread.h:116)
==31495==    by 0x80F2AD6: NS_ProcessNextEvent(nsIThread*, bool) (nsThreadUtils.cpp:263)
==31495==    by 0x83809C6: mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) (MessagePump.cpp:336)
==31495==    by 0x836F52B: MessageLoop::RunInternal() (message_loop.cc:229)
==31495==    by 0x836F536: MessageLoop::RunHandler() (message_loop.cc:222)
==31495==    by 0x836F7BB: MessageLoop::Run() (message_loop.cc:196)
==31495==    by 0x814CA3A: nsThread::ThreadFunc(void*) (nsThread.cpp:346)
==31495==    by 0x63C1E8D: _pt_root (ptthread.c:212)
==31495==    by 0x4E377F0: start_thread (in /lib64/libpthread-2.12.so)
==31495==    by 0x5CDD92C: clone (in /lib64/libc-2.12.so)

Thread 32: status = VgTs_WaitSys
==31495==    at 0x4E3B3DC: pthread_cond_wait@@GLIBC_2.3.2 (in /lib64/libpthread-2.12.so)
==31495==    by 0x63BCD63: PR_Wait (ptsynch.c:691)
==31495==    by 0x81490E6: nsEventQueue::GetEvent(bool, nsIRunnable**) (ReentrantMonitor.h:96)
==31495==    by 0x814951F: nsThread::ProcessNextEvent(bool, bool*) (nsThread.h:116)
==31495==    by 0x80F2AD6: NS_ProcessNextEvent(nsIThread*, bool) (nsThreadUtils.cpp:263)
==31495==    by 0x83809C6: mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) (MessagePump.cpp:336)
==31495==    by 0x836F52B: MessageLoop::RunInternal() (message_loop.cc:229)
==31495==    by 0x836F536: MessageLoop::RunHandler() (message_loop.cc:222)
==31495==    by 0x836F7BB: MessageLoop::Run() (message_loop.cc:196)
==31495==    by 0x814CA3A: nsThread::ThreadFunc(void*) (nsThread.cpp:346)
==31495==    by 0x63C1E8D: _pt_root (ptthread.c:212)
==31495==    by 0x4E377F0: start_thread (in /lib64/libpthread-2.12.so)
==31495==    by 0x5CDD92C: clone (in /lib64/libc-2.12.so)

Thread 34: status = VgTs_WaitSys
==31495==    at 0x4E3B3DC: pthread_cond_wait@@GLIBC_2.3.2 (in /lib64/libpthread-2.12.so)
==31495==    by 0x63BCD63: PR_Wait (ptsynch.c:691)
==31495==    by 0x81490E6: nsEventQueue::GetEvent(bool, nsIRunnable**) (ReentrantMonitor.h:96)
==31495==    by 0x814951F: nsThread::ProcessNextEvent(bool, bool*) (nsThread.h:116)
==31495==    by 0x80F2AD6: NS_ProcessNextEvent(nsIThread*, bool) (nsThreadUtils.cpp:263)
==31495==    by 0x83809C6: mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) (MessagePump.cpp:336)
==31495==    by 0x836F52B: MessageLoop::RunInternal() (message_loop.cc:229)
==31495==    by 0x836F536: MessageLoop::RunHandler() (message_loop.cc:222)
==31495==    by 0x836F7BB: MessageLoop::Run() (message_loop.cc:196)
==31495==    by 0x814CA3A: nsThread::ThreadFunc(void*) (nsThread.cpp:346)
==31495==    by 0x63C1E8D: _pt_root (ptthread.c:212)
==31495==    by 0x4E377F0: start_thread (in /lib64/libpthread-2.12.so)
==31495==    by 0x5CDD92C: clone (in /lib64/libc-2.12.so)
TEST-UNEXPECTED-FAIL | valgrind-test | non-zero exit code from Valgrind
Apparently, the error is unrelated to anything Valgrind specific. It seems that we open places.sqlite with Sqlite.jsm but we do not always close it before Sqlite.jsm.

Do you know of any code that opens places.sqlite using Sqlite.jsm, mak?
Flags: needinfo?(mak77)
I wonder if it's related to (and may already be fixed by) bug 1016831 that just landed...
Flags: needinfo?(mak77)
Summary: Intermittent valgrind-test | Invalid write of size 4 at mozalloc_abort / Abort / NS_DebugBreak / nsDebugImpl::Abort after "ABORT: file resource://gre/modules/AsyncShutdown.jsm, line 691" → AsyncShutdown crash: [{"name":"places.sqlite Conn #0: waiting for shutdown","state":"(none)"}] Barrier: Sqlite.jsm: wait until all connections are closed
Component: OS.File → Async Tooling
In the absence of new occurrences, I guess this was indeed fixed by bug 1016831.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.