RESOLVED FIXED 128621
IDB: The test after storage/indexeddb/mozilla/object-identity.html fails in cleanup code
https://bugs.webkit.org/show_bug.cgi?id=128621
Summary IDB: The test after storage/indexeddb/mozilla/object-identity.html fails in c...
Brady Eidson
Reported 2014-02-11 13:40:53 PST
IDB: The test after storage/indexeddb/mozilla/object-identity.html fails in cleanup code Way to reproduce - run-webkit-tests -2 storage/indexeddb/mozilla/object-identity.html storage/indexeddb/mozilla/put-get-values.html The backtrace is: #0 0x0000000111f6be5c in WTF::Ref<WebCore::IDBServerConnection>::get() at /Volumes/Data/CabUser/build/Debug/usr/local/include/wtf/Ref.h:61 #1 0x0000000111f5e5fc in WebCore::IDBDatabaseBackend::serverConnection() at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h:65 #2 0x0000000111f53d65 in WebCore::IDBTransactionBackend::commit()::$_3::operator()(bool) at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp:245 #3 0x0000000111f53ce3 in bool&& std::__1::forward<bool>(std::__1::remove_reference<bool>::type&) [inlined] at /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/../lib/c++/v1/__functional_base:344 #4 0x0000000111f53cb3 in std::__1::__function::__func<WebCore::IDBTransactionBackend::commit()::$_3, std::__1::allocator<WebCore::IDBTransactionBackend::commit()::$_3>, void (bool)>::operator()(bool&&) at /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/../lib/c++/v1/functional:1059 #5 0x000000010da2f3d1 in std::__1::function<void (bool)>::operator()(bool) const at /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/../lib/c++/v1/functional:1435 #6 0x000000010e0aa33a in WebKit::WebIDBServerConnection::commitTransaction(long long, std::__1::function<void (bool)>)::$_3::operator()() const at /Volumes/Data/git/OpenSource/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:220 #7 0x000000010e0aa30c in decltype(std::__1::forward<WebKit::WebIDBServerConnection::commitTransaction(long long, std::__1::function<void (bool)>)::$_3&>(fp)(std::__1::forward<>(fp0))) std::__1::__invoke<WebKit::WebIDBServerConnection::commitTransaction(long long, std::__1::function<void (bool)>)::$_3&>(WebKit::WebIDBServerConnection::commitTransaction(long long, std::__1::function<void (bool)>)::$_3&&&) [inlined] at /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/../lib/c++/v1/__functional_base:344 #8 0x000000010e0aa2fb in std::__1::__function::__func<WebKit::WebIDBServerConnection::commitTransaction(long long, std::__1::function<void (bool)>)::$_3, std::__1::allocator<WebKit::WebIDBServerConnection::commitTransaction(long long, std::__1::function<void (bool)>)::$_3>, void ()>::operator()() at /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/../lib/c++/v1/functional:1059 #9 0x000000010d9cc46a in std::__1::function<void ()>::operator()() const at /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/../lib/c++/v1/functional:1435 #10 0x000000010e0d2df5 in WebKit::AsyncRequest::requestAborted() at /Volumes/Data/git/OpenSource/Source/WebKit2/Shared/AsyncRequest.cpp:60 #11 0x000000010e083ee8 in WebKit::WebIDBServerConnection::close() at /Volumes/Data/git/OpenSource/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:152 #12 0x00000001129c157c in WebCore::IDBDatabaseBackend::close(WTF::PassRefPtr<WebCore::IDBDatabaseCallbacks>) at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp:611 #13 0x00000001123131e7 in WebCore::IDBDatabase::closeConnection() at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp:291 #14 0x0000000112312ce1 in WebCore::IDBDatabase::close() at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp:283 #15 0x0000000112314819 in WebCore::IDBDatabase::stop() at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp:360 #16 0x000000011231484c in _ZThn88_N7WebCore11IDBDatabase4stopEv at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp:363 #17 0x00000001128ba3d6 in WebCore::ScriptExecutionContext::stopActiveDOMObjects() at /Volumes/Data/git/OpenSource/Source/WebCore/dom/ScriptExecutionContext.cpp:234 #18 0x0000000111488f45 in WebCore::Document::stopActiveDOMObjects() at /Volumes/Data/git/OpenSource/Source/WebCore/dom/Document.cpp:2135 #19 0x0000000111488d0c in WebCore::Document::prepareForDestruction() at /Volumes/Data/git/OpenSource/Source/WebCore/dom/Document.cpp:2059 #20 0x00000001117de736 in WebCore::Frame::setView(WTF::PassRefPtr<WebCore::FrameView>) at /Volumes/Data/git/OpenSource/Source/WebCore/page/Frame.cpp:270 #21 0x00000001117e0e37 in WebCore::Frame::createView(WebCore::IntSize const&, WebCore::Color const&, bool, WebCore::IntSize const&, WebCore::IntRect const&, bool, WebCore::ScrollbarMode, bool, WebCore::ScrollbarMode, bool) at /Volumes/Data/git/OpenSource/Source/WebCore/page/Frame.cpp:901 #22 0x000000010de2d45d in WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage() at /Volumes/Data/git/OpenSource/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:1192 #23 0x00000001117f26e7 in WebCore::FrameLoader::transitionToCommitted(WebCore::CachedPage*) at /Volumes/Data/git/OpenSource/Source/WebCore/loader/FrameLoader.cpp:1955 #24 0x00000001117f19e0 in WebCore::FrameLoader::commitProvisionalLoad() at /Volumes/Data/git/OpenSource/Source/WebCore/loader/FrameLoader.cpp:1785 #25 0x00000001114d0e4c in WebCore::DocumentLoader::commitIfReady() at /Volumes/Data/git/OpenSource/Source/WebCore/loader/DocumentLoader.cpp:353 #26 0x00000001114d1212 in WebCore::DocumentLoader::finishedLoading(double) at /Volumes/Data/git/OpenSource/Source/WebCore/loader/DocumentLoader.cpp:427 #27 0x00000001114d5981 in WebCore::DocumentLoader::maybeLoadEmpty() at /Volumes/Data/git/OpenSource/Source/WebCore/loader/DocumentLoader.cpp:1383 #28 0x00000001114d5af2 in WebCore::DocumentLoader::startLoadingMainResource() at /Volumes/Data/git/OpenSource/Source/WebCore/loader/DocumentLoader.cpp:1395 The IDBDatabaseBackend in stack frame #1 is null
Attachments
Patch v1 (6.21 KB, patch)
2014-02-11 14:49 PST, Brady Eidson
ap: review+
Radar WebKit Bug Importer
Comment 1 2014-02-11 13:41:36 PST
Brady Eidson
Comment 2 2014-02-11 14:14:41 PST
After plugging that, there's a problem where IDBTransactionBackend::abort removes the transactionbackend from the databasebackend, then calls its own onAbort callback, which calls the database shutdown code, which calls back into the transaction to abort its commit request, which then tries to remove itself from the databasebackend *again* trigging an assert. #0 0x000000010db3502a in WTFCrash at /Volumes/Data/git/OpenSource/Source/WTF/wtf/Assertions.cpp:333 #1 0x0000000110660f8f in WebCore::IDBDatabaseBackend::transactionFinished(WebCore::IDBTransactionBackend*) at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp:331 #2 0x000000010fbf4d5c in WebCore::IDBTransactionBackend::commit()::$_3::operator()(bool) at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp:259 #3 0x000000010fbf4bc3 in bool&& std::__1::forward<bool>(std::__1::remove_reference<bool>::type&) [inlined] at /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/../lib/c++/v1/__functional_base:344 #4 0x000000010fbf4b93 in std::__1::__function::__func<WebCore::IDBTransactionBackend::commit()::$_3, std::__1::allocator<WebCore::IDBTransactionBackend::commit()::$_3>, void (bool)>::operator()(bool&&) at /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/../lib/c++/v1/functional:1059 #5 0x000000010b6d03d1 in std::__1::function<void (bool)>::operator()(bool) const at /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/../lib/c++/v1/functional:1435 #6 0x000000010bd4b33a in WebKit::WebIDBServerConnection::commitTransaction(long long, std::__1::function<void (bool)>)::$_3::operator()() const at /Volumes/Data/git/OpenSource/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:220 #7 0x000000010bd4b30c in decltype(std::__1::forward<WebKit::WebIDBServerConnection::commitTransaction(long long, std::__1::function<void (bool)>)::$_3&>(fp)(std::__1::forward<>(fp0))) std::__1::__invoke<WebKit::WebIDBServerConnection::commitTransaction(long long, std::__1::function<void (bool)>)::$_3&>(WebKit::WebIDBServerConnection::commitTransaction(long long, std::__1::function<void (bool)>)::$_3&&&) [inlined] at /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/../lib/c++/v1/__functional_base:344 #8 0x000000010bd4b2fb in std::__1::__function::__func<WebKit::WebIDBServerConnection::commitTransaction(long long, std::__1::function<void (bool)>)::$_3, std::__1::allocator<WebKit::WebIDBServerConnection::commitTransaction(long long, std::__1::function<void (bool)>)::$_3>, void ()>::operator()() at /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/../lib/c++/v1/functional:1059 #9 0x000000010b66d46a in std::__1::function<void ()>::operator()() const at /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/../lib/c++/v1/functional:1435 #10 0x000000010bd73df5 in WebKit::AsyncRequest::requestAborted() at /Volumes/Data/git/OpenSource/Source/WebKit2/Shared/AsyncRequest.cpp:60 #11 0x000000010bd24ee8 in WebKit::WebIDBServerConnection::close() at /Volumes/Data/git/OpenSource/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:152 #12 0x00000001106624fc in WebCore::IDBDatabaseBackend::close(WTF::PassRefPtr<WebCore::IDBDatabaseCallbacks>) at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp:613 #13 0x000000010ffb4147 in WebCore::IDBDatabase::closeConnection() at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp:291 #14 0x000000010ffb4074 in WebCore::IDBDatabase::transactionFinished(WebCore::IDBTransaction*) at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp:112 #15 0x00000001100f416b in WebCore::IDBTransaction::onAbort(WTF::PassRefPtr<WebCore::IDBDatabaseError>) at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp:310 #16 0x000000010ffb4307 in WebCore::IDBDatabase::onAbort(long long, WTF::PassRefPtr<WebCore::IDBDatabaseError>) at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp:118 #17 0x000000010eea351f in WebCore::IDBDatabaseCallbacksImpl::onAbort(long long, WTF::PassRefPtr<WebCore::IDBDatabaseError>) at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:71 #18 0x000000010fbed615 in WebCore::IDBTransactionBackend::abort(WTF::PassRefPtr<WebCore::IDBDatabaseError>) at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp:162 #19 0x000000010fbed1b6 in WebCore::IDBTransactionBackend::abort() at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp:114 #20 0x00000001106601b9 in WebCore::IDBDatabaseBackend::abort(long long) at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp:212 #21 0x00000001100f399f in WebCore::IDBTransaction::abort(int&) at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp:222 #22 0x00000001100f4a27 in WebCore::IDBTransaction::stop() at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp:411 #23 0x00000001100f4a4c in _ZThn88_N7WebCore14IDBTransaction4stopEv at /Volumes/Data/git/OpenSource/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp:412
Brady Eidson
Comment 3 2014-02-11 14:46:02 PST
IDBTransactionBackend::abort simply needs to clear it's m_database pointer before possibly re-entering abort code. Patch is coming.
Brady Eidson
Comment 4 2014-02-11 14:49:03 PST
Created attachment 223903 [details] Patch v1
Brady Eidson
Comment 5 2014-02-11 14:56:22 PST
Note You need to log in before you can comment on or make changes to this bug.