[Webkit-unassigned] [Bug 211637] SHOULD NEVER BE REACHED in WebKit::ResourceLoadStatisticsDatabaseStore::openAndUpdateSchemaIfNecessary

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 11 09:05:36 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=211637

--- Comment #4 from katherine_cheney at apple.com ---
(In reply to Sihui Liu from comment #2)

Thanks for taking a look at this.

> From the error log, "ERROR: SQLite database failed to set journal_mode to
> WAL, error: database is locked", it looks like there are conflicted
> transactions on the same database connection
> (https://www.sqlite.org/rescode.html#locked). 
> 
> As this is regression from r260791(?), it's possible a database connection
> is not closed properly, e.g. a connection will not be closed if there are
> unfinalized prepared statements(https://www.sqlite.org/c3ref/close.html).
> 

This could definitely be related. The statements are all prepared in ResourceLoadStatisticsDatabaseStore::prepareStatements(), but the unused ones are not finalized before closing.

> Looking at r260791, it seems
> NetworkSession::recreateResourceLoadStatisticStore can be called
> consecutively, and m_resourceLoadStatistics will be set before task
> dispatched in WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore
> is done. Not sure if this is an issue. Maybe verify by waiting in
> NetworkSession::recreateResourceLoadStatisticStore until the completion
> handler is called to see if this fixes the issue.

Isn't this already occurring? m_resourceLoadStatistics is set in the completion handler of destroyResourceLoadStatistics, which gets passed to WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore(), so it won't be set until that has finished.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200511/cec3b8f8/attachment.htm>


More information about the webkit-unassigned mailing list