RESOLVED FIXED183042
Add release logging for CacheStorage::Engine disk related functions
https://bugs.webkit.org/show_bug.cgi?id=183042
Summary Add release logging for CacheStorage::Engine disk related functions
youenn fablet
Reported 2018-02-22 09:25:46 PST
Add release logging for CacheStorage::Engine disk related functions
Attachments
Patch (2.26 KB, patch)
2018-02-22 09:26 PST, youenn fablet
no flags
youenn fablet
Comment 1 2018-02-22 09:26:48 PST
Chris Dumez
Comment 2 2018-02-22 09:28:42 PST
Comment on attachment 334456 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=334456&action=review > Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:285 > + RELEASE_LOG_ERROR(CacheStorage, "CacheStorage::Engine::writeFile failed with error %d", error); An engine has an associated sessionID. You should check that the sessionID is not one for an ephemeral session before logging.
youenn fablet
Comment 3 2018-02-22 09:36:41 PST
(In reply to Chris Dumez from comment #2) > Comment on attachment 334456 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=334456&action=review > > > Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:285 > > + RELEASE_LOG_ERROR(CacheStorage, "CacheStorage::Engine::writeFile failed with error %d", error); > > An engine has an associated sessionID. You should check that the sessionID > is not one for an ephemeral session before logging. This is unnecessary as CacheStorage::Engine should not write any file for ephemeral sessions. We could add something like ASSERT(!sessionID.isEphemeral()) at the beginning of writeDisk/readDisk though.
Chris Dumez
Comment 4 2018-02-22 09:37:43 PST
(In reply to youenn fablet from comment #3) > (In reply to Chris Dumez from comment #2) > > Comment on attachment 334456 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=334456&action=review > > > > > Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:285 > > > + RELEASE_LOG_ERROR(CacheStorage, "CacheStorage::Engine::writeFile failed with error %d", error); > > > > An engine has an associated sessionID. You should check that the sessionID > > is not one for an ephemeral session before logging. > > This is unnecessary as CacheStorage::Engine should not write any file for > ephemeral sessions. > We could add something like ASSERT(!sessionID.isEphemeral()) at the > beginning of writeDisk/readDisk though. Ok, please do that.
Chris Dumez
Comment 5 2018-02-22 09:38:14 PST
Comment on attachment 334456 [details] Patch r=me with the added assertions.
youenn fablet
Comment 6 2018-02-22 09:40:39 PST
(In reply to youenn fablet from comment #3) > (In reply to Chris Dumez from comment #2) > > Comment on attachment 334456 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=334456&action=review > > > > > Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:285 > > > + RELEASE_LOG_ERROR(CacheStorage, "CacheStorage::Engine::writeFile failed with error %d", error); > > > > An engine has an associated sessionID. You should check that the sessionID > > is not one for an ephemeral session before logging. > > This is unnecessary as CacheStorage::Engine should not write any file for > ephemeral sessions. > We could add something like ASSERT(!sessionID.isEphemeral()) at the > beginning of writeDisk/readDisk though. Actually, Engine does not store any sessionID. In case of ephemeral session, m_rootPath is null and we are checking whether it is null at the beginning of read/write methods.
youenn fablet
Comment 7 2018-02-22 10:32:25 PST
Chris, I'll land the patch as is given the persistency check is close to the release logging and given the fact engine is not storing its sessionID. Let me know if that does not work for you.
WebKit Commit Bot
Comment 8 2018-02-22 10:36:24 PST
Comment on attachment 334456 [details] Patch Rejecting attachment 334456 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 334456, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: rdparty/autoinstalled/mechanize/_urllib2_fork.py", line 332, in _call_chain result = func(*args) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_urllib2_fork.py", line 1170, in https_open return self.do_open(conn_factory, req) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_urllib2_fork.py", line 1118, in do_open raise URLError(err) urllib2.URLError: <urlopen error [Errno 60] Operation timed out> Full output: http://webkit-queues.webkit.org/results/6624429
WebKit Commit Bot
Comment 9 2018-02-22 10:51:58 PST
Comment on attachment 334456 [details] Patch Clearing flags on attachment: 334456 Committed r228925: <https://trac.webkit.org/changeset/228925>
WebKit Commit Bot
Comment 10 2018-02-22 10:51:59 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 11 2018-02-22 10:53:11 PST
Note You need to log in before you can comment on or make changes to this bug.