WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
220220
Safari Networking high % CPU when Caches/WebKit/ServiceWorkers folder not writable
https://bugs.webkit.org/show_bug.cgi?id=220220
Summary
Safari Networking high % CPU when Caches/WebKit/ServiceWorkers folder not wri...
Jeff Johnson
Reported
2021-01-01 07:44:59 PST
When the Caches/WebKit/ServiceWorkers folder is not writable, the Safari Networking process has very high CPU usage (near 100%), due to logging error messages nonstop. Steps to reproduce: 1) Delete the contents of the folder ~/Library/Containers/com.apple.Safari/Data/Library/Caches 2) Lock the folder ~/Library/Containers/com.apple.Safari/Data/Library/Caches in Finder 3) Launch Safari 4) Open
https://www.youtube.com
5) Play a video 6) Launch Activity Monitor and view % CPU 7) Launch Console and view messages I found the problem by also noticing the "logd" process high in Activity Monitor, which inspired me to check the Console log. I saw the following errors over and over again: com.apple.WebKit.Networking os_unix.c:44500: (2) open(/Users/bigsir/Library/Containers/com.apple.Safari/Data/Library/Caches/WebKit/ServiceWorkers/ServiceWorkerRegistrations-5.sqlite3) - No such file or directory com.apple.WebKit.Networking Failed to open Service Worker registration database com.apple.WebKit.Networking cannot open file at line 44499 of [02c344acea] I've reproduced this issue with macOS 11.1 (20C69) and Safari 14.0.2 (16610.3.7.1.9) on an Apple silicon Mac mini, and also with macOS 10.14.6 (18G7016) on an Intel MacBook Pro. I had locked the Safari Caches folder because it tends to get enormous on disk for no good reason. I don't need or want anything to be cached on disk after I quit Safari.
Attachments
Patch
(4.91 KB, patch)
2021-01-08 08:35 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2021-01-02 10:44:52 PST
I think that this is something we'd consider to be unsupported configuration, but CC'ing other folks for their perspectives.
youenn fablet
Comment 2
2021-01-04 07:59:04 PST
> I had locked the Safari Caches folder because it tends to get enormous on > disk for no good reason. I don't need or want anything to be cached on disk > after I quit Safari.
Why not using Safari private windows?
youenn fablet
Comment 3
2021-01-04 07:59:38 PST
(In reply to Alexey Proskuryakov from
comment #1
)
> I think that this is something we'd consider to be unsupported > configuration, but CC'ing other folks for their perspectives.
I tend to agree, though it should not be too difficult to fix.
Jeff Johnson
Comment 4
2021-01-04 08:14:51 PST
> Why not using Safari private windows?
Some people including myself would like private browsing by default. However, Safari has several barriers to this. For example, there is no Private Window option in the "New windows open with" preference. Also, the ⌘n keyboard shortcut cannot be successfully redefined to New Private Window in System Preferences, Keyboard, Shortcuts.
> it should not be too difficult to fix.
This was the hope. It may be unsupported, but perhaps this bug reveals that the architecture of the underlying code is a bit problematic.
Radar WebKit Bug Importer
Comment 5
2021-01-08 07:45:23 PST
<
rdar://problem/72930195
>
youenn fablet
Comment 6
2021-01-08 08:35:20 PST
Created
attachment 417268
[details]
Patch
youenn fablet
Comment 7
2021-01-12 05:29:25 PST
Comment on
attachment 417268
[details]
Patch test failure is unrelated
EWS
Comment 8
2021-01-12 09:00:25 PST
Committed
r271404
: <
https://trac.webkit.org/changeset/271404
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 417268
[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