<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>183042</bug_id>
          
          <creation_ts>2018-02-22 09:25:46 -0800</creation_ts>
          <short_desc>Add release logging for CacheStorage::Engine disk related functions</short_desc>
          <delta_ts>2018-02-22 10:53:11 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Service Workers</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="youenn fablet">youennf</reporter>
          <assigned_to name="youenn fablet">youennf</assigned_to>
          <cc>cdumez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1401435</commentid>
    <comment_count>0</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2018-02-22 09:25:46 -0800</bug_when>
    <thetext>Add release logging for CacheStorage::Engine disk related functions</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1401436</commentid>
    <comment_count>1</comment_count>
      <attachid>334456</attachid>
    <who name="youenn fablet">youennf</who>
    <bug_when>2018-02-22 09:26:48 -0800</bug_when>
    <thetext>Created attachment 334456
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1401437</commentid>
    <comment_count>2</comment_count>
      <attachid>334456</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2018-02-22 09:28:42 -0800</bug_when>
    <thetext>Comment on attachment 334456
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=334456&amp;action=review

&gt; Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:285
&gt; +                RELEASE_LOG_ERROR(CacheStorage, &quot;CacheStorage::Engine::writeFile failed with error %d&quot;, error);

An engine has an associated sessionID. You should check that the sessionID is not one for an ephemeral session before logging.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1401438</commentid>
    <comment_count>3</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2018-02-22 09:36:41 -0800</bug_when>
    <thetext>(In reply to Chris Dumez from comment #2)
&gt; Comment on attachment 334456 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=334456&amp;action=review
&gt; 
&gt; &gt; Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:285
&gt; &gt; +                RELEASE_LOG_ERROR(CacheStorage, &quot;CacheStorage::Engine::writeFile failed with error %d&quot;, error);
&gt; 
&gt; An engine has an associated sessionID. You should check that the sessionID
&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1401439</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2018-02-22 09:37:43 -0800</bug_when>
    <thetext>(In reply to youenn fablet from comment #3)
&gt; (In reply to Chris Dumez from comment #2)
&gt; &gt; Comment on attachment 334456 [details]
&gt; &gt; Patch
&gt; &gt; 
&gt; &gt; View in context:
&gt; &gt; https://bugs.webkit.org/attachment.cgi?id=334456&amp;action=review
&gt; &gt; 
&gt; &gt; &gt; Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:285
&gt; &gt; &gt; +                RELEASE_LOG_ERROR(CacheStorage, &quot;CacheStorage::Engine::writeFile failed with error %d&quot;, error);
&gt; &gt; 
&gt; &gt; An engine has an associated sessionID. You should check that the sessionID
&gt; &gt; is not one for an ephemeral session before logging.
&gt; 
&gt; This is unnecessary as CacheStorage::Engine should not write any file for
&gt; ephemeral sessions.
&gt; We could add something like ASSERT(!sessionID.isEphemeral()) at the
&gt; beginning of writeDisk/readDisk though.

Ok, please do that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1401440</commentid>
    <comment_count>5</comment_count>
      <attachid>334456</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2018-02-22 09:38:14 -0800</bug_when>
    <thetext>Comment on attachment 334456
Patch

r=me with the added assertions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1401442</commentid>
    <comment_count>6</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2018-02-22 09:40:39 -0800</bug_when>
    <thetext>(In reply to youenn fablet from comment #3)
&gt; (In reply to Chris Dumez from comment #2)
&gt; &gt; Comment on attachment 334456 [details]
&gt; &gt; Patch
&gt; &gt; 
&gt; &gt; View in context:
&gt; &gt; https://bugs.webkit.org/attachment.cgi?id=334456&amp;action=review
&gt; &gt; 
&gt; &gt; &gt; Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:285
&gt; &gt; &gt; +                RELEASE_LOG_ERROR(CacheStorage, &quot;CacheStorage::Engine::writeFile failed with error %d&quot;, error);
&gt; &gt; 
&gt; &gt; An engine has an associated sessionID. You should check that the sessionID
&gt; &gt; is not one for an ephemeral session before logging.
&gt; 
&gt; This is unnecessary as CacheStorage::Engine should not write any file for
&gt; ephemeral sessions.
&gt; We could add something like ASSERT(!sessionID.isEphemeral()) at the
&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1401451</commentid>
    <comment_count>7</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2018-02-22 10:32:25 -0800</bug_when>
    <thetext>Chris, I&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1401456</commentid>
    <comment_count>8</comment_count>
      <attachid>334456</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-02-22 10:36:24 -0800</bug_when>
    <thetext>Comment on attachment 334456
Patch

Rejecting attachment 334456 from commit-queue.

Failed to run &quot;[&apos;/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch&apos;, &apos;--status-host=webkit-queues.webkit.org&apos;, &apos;--bot-id=webkit-cq-02&apos;, &apos;land-attachment&apos;, &apos;--force-clean&apos;, &apos;--non-interactive&apos;, &apos;--parent-command=commit-queue&apos;, 334456, &apos;--port=mac&apos;]&quot; exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
rdparty/autoinstalled/mechanize/_urllib2_fork.py&quot;, line 332, in _call_chain
    result = func(*args)
  File &quot;/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_urllib2_fork.py&quot;, line 1170, in https_open
    return self.do_open(conn_factory, req)
  File &quot;/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_urllib2_fork.py&quot;, line 1118, in do_open
    raise URLError(err)
urllib2.URLError: &lt;urlopen error [Errno 60] Operation timed out&gt;

Full output: http://webkit-queues.webkit.org/results/6624429</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1401466</commentid>
    <comment_count>9</comment_count>
      <attachid>334456</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-02-22 10:51:58 -0800</bug_when>
    <thetext>Comment on attachment 334456
Patch

Clearing flags on attachment: 334456

Committed r228925: &lt;https://trac.webkit.org/changeset/228925&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1401467</commentid>
    <comment_count>10</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-02-22 10:51:59 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1401468</commentid>
    <comment_count>11</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-02-22 10:53:11 -0800</bug_when>
    <thetext>&lt;rdar://problem/37793473&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>334456</attachid>
            <date>2018-02-22 09:26:48 -0800</date>
            <delta_ts>2018-02-22 10:51:58 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-183042-20180222092629.patch</filename>
            <type>text/plain</type>
            <size>2314</size>
            <attacher name="youenn fablet">youennf</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjI4ODU4CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0L0No
YW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCmluZGV4IDBiZThhYmNiNmM2NDhjMjA5
MTYzMDVhYzY4MGMwOGRkNmMyNzI5MWYuLjE0NWZhZWM0OWQzNjQzZDEyOTEwNGJkMTMxNWI1Zjk1
ZWI4Mjk2NDQgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCisrKyBiL1NvdXJj
ZS9XZWJLaXQvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTQgQEAKKzIwMTgtMDItMjIgIFlvdWVubiBG
YWJsZXQgIDx5b3Vlbm5AYXBwbGUuY29tPgorCisgICAgICAgIEFkZCByZWxlYXNlIGxvZ2dpbmcg
Zm9yIENhY2hlU3RvcmFnZTo6RW5naW5lIGRpc2sgcmVsYXRlZCBmdW5jdGl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Y2sgPSBXVEZNb3ZlKGNh
bGxiYWNrKV0oY29uc3QgRGF0YSYgZGF0YSwgaW50IGVycm9yKSBtdXRhYmxlIHsKKyAgICAgICAg
ICAgIFJFTEVBU0VfTE9HX0VSUk9SX0lGKGVycm9yLCBDYWNoZVN0b3JhZ2UsICJDYWNoZVN0b3Jh
Z2U6OkVuZ2luZTo6cmVhZEZpbGUgZmFpbGVkIHdpdGggZXJyb3IgJWQiLCBlcnJvcik7CisKICAg
ICAgICAgICAgIC8vIEZJWE1FOiBXZSBzaG91bGQgZG8gdGhlIGRlY29kaW5nIGluIHRoZSBiYWNr
Z3JvdW5kIHRocmVhZC4KICAgICAgICAgICAgIEFTU0VSVChSdW5Mb29wOjppc01haW4oKSk7CiAg
ICAgICAgICAgICBjYWxsYmFjayhkYXRhLCBlcnJvcik7Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>