Bug 143451 - [WK2][iOS] Regression(r182323): ASSERTION FAILED: WebCore::SQLiteDatabaseTracker::hasTransactionInProgress() in NetworkCache::Statistics::initialize()
Summary: [WK2][iOS] Regression(r182323): ASSERTION FAILED: WebCore::SQLiteDatabaseTrac...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 143278
  Show dependency treegraph
 
Reported: 2015-04-06 12:35 PDT by Chris Dumez
Modified: 2015-04-06 13:50 PDT (History)
4 users (show)

See Also:


Attachments
Patch (6.39 KB, patch)
2015-04-06 13:17 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2015-04-06 12:35:22 PDT
We sometimes hit the following assertion:
ASSERTION FAILED: WebCore::SQLiteDatabaseTracker::hasTransactionInProgress() in NetworkCache::Statistics::initialize()

0x107ff3020 WTFCrash
0x1036fe3fc WebKit::NetworkCache::executeSQLCommand(WebCore::SQLiteDatabase&, WTF::String const&)
0x1036fdaaa WebKit::NetworkCache::Statistics::initialize(WTF::String const&)::$_0::operator()() const
0x1036fd6bc std::__1::__function::__func<WebKit::NetworkCache::Statistics::initialize(WTF::String const&)::$_0, std::__1::allocator<WebKit::NetworkCache::Statistics::initialize(WTF::String const&)::$_0>, void ()>::operator()()
0x107b4358a std::__1::function<void ()>::operator()() const
0x108014bb9 invocation function for block in WTF::WorkQueue::dispatch(std::__1::function<void ()>)
0x101beebfd _dispatch_call_block_and_release
0x101c0e40d _dispatch_client_callout
0x101bf50ff _dispatch_queue_drain
0x101bf46fc _dispatch_queue_invoke
0x101bf6c1f _dispatch_root_queue_drain
0x101bf66bc _dispatch_worker_thread3
0x101f308a6 _pthread_wqthread
0x101f2e0c5 start_wqthread

I do have a "WebCore::SQLiteTransactionInProgressAutoCounter transactionCounter" in NetworkCache::Statistics::initialize(). My current guess is that the SQLiteDatabaseTrackerClient can get set after transactionCounter is initialized but before executeSQLCommand() is called.
Comment 1 Chris Dumez 2015-04-06 13:06:18 PDT
I can reproduce. Working on a fix now.
Comment 2 Radar WebKit Bug Importer 2015-04-06 13:06:52 PDT
<rdar://problem/20437994>
Comment 3 Chris Dumez 2015-04-06 13:17:52 PDT
Created attachment 250223 [details]
Patch
Comment 4 Chris Dumez 2015-04-06 13:50:31 PDT
Comment on attachment 250223 [details]
Patch

Clearing flags on attachment: 250223

Committed r182437: <http://trac.webkit.org/changeset/182437>
Comment 5 Chris Dumez 2015-04-06 13:50:35 PDT
All reviewed patches have been landed.  Closing bug.