WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
235340
Assertion is not acquired in network process when setting database journal mode
https://bugs.webkit.org/show_bug.cgi?id=235340
Summary
Assertion is not acquired in network process when setting database journal mode
Sihui Liu
Reported
2022-01-18 16:19:34 PST
...
Attachments
Patch
(1.33 KB, patch)
2022-01-18 16:25 PST
,
Sihui Liu
no flags
Details
Formatted Diff
Diff
Patch
(1.45 KB, patch)
2022-01-18 22:29 PST
,
Sihui Liu
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Sihui Liu
Comment 1
2022-01-18 16:23:58 PST
An example trace when network process is killed for holding database lock: Thread 3 Dispatch queue: WebResourceLoadStatisticsStore Process Data Queue ... 13 libsqlite3.dylib 0x1f666f8e0 sqlite3LockAndPrepare + 244 (/Library/Caches/com.apple.xbs/Sources/SQLite/derived_source/sqlite3.c:139474) 14 WebCore 0x1e8b30858 WebCore::SQLiteDatabase::prepareStatement(WTF::ASCIILiteral) + 120 (/Library/Caches/com.apple.xbs/Sources/WebCore/Source/WebCore/./platform/sql/SQLiteDatabase.cpp:696) 15 WebCore 0x1e8b30298 WebCore::SQLiteDatabase::open(WTF::String const&, WebCore::SQLiteDatabase::OpenMode) + 1776 (/Library/Caches/com.apple.xbs/Sources/WebCore/Source/WebCore/./platform/sql/SQLiteDatabase.cpp:228) 16 WebKit 0x1e64953bc WebKit::DatabaseUtilities::openDatabaseAndCreateSchemaIfNecessary() + 148 (/Library/Caches/com.apple.xbs/Sources/WebKit/Source/WebKit/NetworkProcess/DatabaseUtilities.cpp:92) 17 WebKit 0x1e65296bc WTF::Detail::CallableWrapper<WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore(WebKit::NetworkSession&, WTF::String const&, WebKit::ShouldIncludeLocalhost, WebCore::ResourceLoadStatistics::IsEphemeral)::$_33, void>::call() + 788 (/Library/Caches/com.apple.xbs/Sources/WebKit/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:341) ...
Radar WebKit Bug Importer
Comment 2
2022-01-18 16:24:11 PST
<
rdar://problem/87741289
>
Sihui Liu
Comment 3
2022-01-18 16:25:11 PST
Created
attachment 449446
[details]
Patch
Darin Adler
Comment 4
2022-01-18 18:07:16 PST
Comment on
attachment 449446
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=449446&action=review
> Source/WebCore/ChangeLog:3 > + Assertion is not acquired in network process when setting database journal mode
What is the effect of not acquiring this assertion? Is there a test failing because of this mistake>
Sihui Liu
Comment 5
2022-01-18 22:26:43 PST
(In reply to Darin Adler from
comment #4
)
> Comment on
attachment 449446
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=449446&action=review
> > > Source/WebCore/ChangeLog:3 > > + Assertion is not acquired in network process when setting database journal mode > > What is the effect of not acquiring this assertion? Is there a test failing > because of this mistake>
Assertion is needed for keeping process active. If assertion is not held, process can be suspended. When a process is suspended and it's holding file lock, it will get killed by running boardd (to ensure file lock is released). So we need to hold assertion when doing database activities that requires file lock. There is no test (since it involves daemons), but we see network process gets killed with trace I pasted above. More traces in
rdar://82412733
.
Sihui Liu
Comment 6
2022-01-18 22:29:11 PST
Created
attachment 449464
[details]
Patch
Chris Dumez
Comment 7
2022-01-19 07:19:09 PST
Comment on
attachment 449464
[details]
Patch r=me
EWS
Comment 8
2022-01-19 11:49:33 PST
Committed
r288223
(
246183@main
): <
https://commits.webkit.org/246183@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 449464
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug