<?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>190795</bug_id>
          
          <creation_ts>2018-10-22 08:59:17 -0700</creation_ts>
          <short_desc>Regression (r232410): StorageTracker.db file gets unlinked while in use</short_desc>
          <delta_ts>2018-10-23 09:58:55 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</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="Sihui Liu">sihui_liu</reporter>
          <assigned_to name="Sihui Liu">sihui_liu</assigned_to>
          <cc>cdumez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>ggaren</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1471226</commentid>
    <comment_count>0</comment_count>
    <who name="Sihui Liu">sihui_liu</who>
    <bug_when>2018-10-22 08:59:17 -0700</bug_when>
    <thetext>In r232410, WebKit stopped to use StorageTracker.db because of performance, and it would delete this file for safety.
r232410 didn&apos;t change the behavior of WebKitLegacy, as to keep the old things working. 
It turned out WebKitLegacy could be using the same file as WebKit, so app built on WebKit could delete the db file while apps with WebKitLegacy is using it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471227</commentid>
    <comment_count>1</comment_count>
    <who name="Sihui Liu">sihui_liu</who>
    <bug_when>2018-10-22 09:00:19 -0700</bug_when>
    <thetext>&lt;rdar://problem/45409880&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471232</commentid>
    <comment_count>2</comment_count>
      <attachid>352893</attachid>
    <who name="Sihui Liu">sihui_liu</who>
    <bug_when>2018-10-22 09:07:37 -0700</bug_when>
    <thetext>Created attachment 352893
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471240</commentid>
    <comment_count>3</comment_count>
      <attachid>352893</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2018-10-22 09:33:18 -0700</bug_when>
    <thetext>Comment on attachment 352893
Patch

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

Is this an issue for apps using both WK1 and WK2?

&gt; Source/WebKitLegacy/ChangeLog:8
&gt; +        WK2 stopped to use StorageTracker.db file in r232410 and would delete 

stopped to use -&gt; stopped using</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471258</commentid>
    <comment_count>4</comment_count>
    <who name="Sihui Liu">sihui_liu</who>
    <bug_when>2018-10-22 10:26:06 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #3)
&gt; Comment on attachment 352893 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=352893&amp;action=review
&gt; 
&gt; Is this an issue for apps using both WK1 and WK2?
&gt; 
Yes, if the app uses WK1&apos;s Storage API.

&gt; &gt; Source/WebKitLegacy/ChangeLog:8
&gt; &gt; +        WK2 stopped to use StorageTracker.db file in r232410 and would delete 
&gt; 
&gt; stopped to use -&gt; stopped using
Okay.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471261</commentid>
    <comment_count>5</comment_count>
      <attachid>352896</attachid>
    <who name="Sihui Liu">sihui_liu</who>
    <bug_when>2018-10-22 10:29:05 -0700</bug_when>
    <thetext>Created attachment 352896
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471265</commentid>
    <comment_count>6</comment_count>
      <attachid>352896</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2018-10-22 10:50:36 -0700</bug_when>
    <thetext>Comment on attachment 352896
Patch

One concern: Does this mean that WK1-only apps will now have the historical StorageTracker.db and the new LegacyStorageTracker.db when updating WebKit? If so, we&apos;d probably need to remove the historical StorageTracker.db file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471286</commentid>
    <comment_count>7</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2018-10-22 12:00:53 -0700</bug_when>
    <thetext>When we make this file name change, won&apos;t LegacyWebKit apps &quot;forget&quot; all the LocalStorage entries that were recorded in StorageTracker.db?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471324</commentid>
    <comment_count>8</comment_count>
    <who name="Sihui Liu">sihui_liu</who>
    <bug_when>2018-10-22 13:36:55 -0700</bug_when>
    <thetext>(In reply to Geoffrey Garen from comment #7)
&gt; When we make this file name change, won&apos;t LegacyWebKit apps &quot;forget&quot; all the
&gt; LocalStorage entries that were recorded in StorageTracker.db?

It would. But during the initialization of StorageTracker, the origins get re-imported by syncFileSystemAndTrackerDatabase().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471325</commentid>
    <comment_count>9</comment_count>
      <attachid>352896</attachid>
    <who name="Sihui Liu">sihui_liu</who>
    <bug_when>2018-10-22 13:40:53 -0700</bug_when>
    <thetext>Comment on attachment 352896
Patch

Seems like disk access error on wincairo.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471326</commentid>
    <comment_count>10</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2018-10-22 13:41:37 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #6)
&gt; Comment on attachment 352896 [details]
&gt; Patch
&gt; 
&gt; One concern: Does this mean that WK1-only apps will now have the historical
&gt; StorageTracker.db and the new LegacyStorageTracker.db when updating WebKit?
&gt; If so, we&apos;d probably need to remove the historical StorageTracker.db file.

You did not address my concern.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471327</commentid>
    <comment_count>11</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2018-10-22 13:42:14 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #10)
&gt; (In reply to Chris Dumez from comment #6)
&gt; &gt; Comment on attachment 352896 [details]
&gt; &gt; Patch
&gt; &gt; 
&gt; &gt; One concern: Does this mean that WK1-only apps will now have the historical
&gt; &gt; StorageTracker.db and the new LegacyStorageTracker.db when updating WebKit?
&gt; &gt; If so, we&apos;d probably need to remove the historical StorageTracker.db file.
&gt; 
&gt; You did not address my concern.

i.e. we do not want legacy files to use up space on customers&apos; devices.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471335</commentid>
    <comment_count>12</comment_count>
      <attachid>352896</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-10-22 14:05:29 -0700</bug_when>
    <thetext>Comment on attachment 352896
Patch

Clearing flags on attachment: 352896

Committed r237330: &lt;https://trac.webkit.org/changeset/237330&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471336</commentid>
    <comment_count>13</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-10-22 14:05:31 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471594</commentid>
    <comment_count>14</comment_count>
    <who name="Sihui Liu">sihui_liu</who>
    <bug_when>2018-10-23 09:58:55 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #11)
&gt; (In reply to Chris Dumez from comment #10)
&gt; &gt; (In reply to Chris Dumez from comment #6)
&gt; &gt; &gt; Comment on attachment 352896 [details]
&gt; &gt; &gt; Patch
&gt; &gt; &gt; 
&gt; &gt; &gt; One concern: Does this mean that WK1-only apps will now have the historical
&gt; &gt; &gt; StorageTracker.db and the new LegacyStorageTracker.db when updating WebKit?
&gt; &gt; &gt; If so, we&apos;d probably need to remove the historical StorageTracker.db file.
&gt; &gt; 
&gt; &gt; You did not address my concern.
&gt; 
&gt; i.e. we do not want legacy files to use up space on customers&apos; devices.

Sorry I missed your comment...

Yes, I assumed that the users always have some WK2 app to do the cleanup, but there is a chance the user only use WK1 apps so the historical file is left. It won&apos;t pose a threat like using up the space, but I should do the cleanup.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>352893</attachid>
            <date>2018-10-22 09:07:37 -0700</date>
            <delta_ts>2018-10-22 10:29:02 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-190795-20181022090736.patch</filename>
            <type>text/plain</type>
            <size>1719</size>
            <attacher name="Sihui Liu">sihui_liu</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjM3MzA4CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0TGVn
YWN5L0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJLaXRMZWdhY3kvQ2hhbmdlTG9nCmluZGV4IDhiZWFh
OTQxMDA0YTE0YjU2NDRhMzVhOTg1NjExNTg2MGMxYzFhZWYuLjIzZDZiOWYxMGY4ZjNmMTQ2ZDAy
M2JjNWRlYjY4ZWY2MjFkNTIzYzQgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJLaXRMZWdhY3kvQ2hh
bmdlTG9nCisrKyBiL1NvdXJjZS9XZWJLaXRMZWdhY3kvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTgg
QEAKKzIwMTgtMTAtMjIgIFNpaHVpIExpdSAgPHNpaHVpX2xpdUBhcHBsZS5jb20+CisKKyAgICAg
ICAgUmVncmVzc2lvbiAocjIzMjQxMCk6IFN0b3JhZ2VUcmFja2VyLmRiIGZpbGUgZ2V0cyB1bmxp
bmtlZCB3aGlsZSBpbiB1c2UKKyAgICAgICAgaHR0cHM6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0b3JhZ2UvU3RvcmFnZVRyYWNr
ZXIuY3BwCkBAIC0xMDQsNyArMTA0LDcgQEAgU3RvcmFnZVRyYWNrZXI6OlN0b3JhZ2VUcmFja2Vy
KGNvbnN0IFN0cmluZyYgc3RvcmFnZVBhdGgpCiBTdHJpbmcgU3RvcmFnZVRyYWNrZXI6OnRyYWNr
ZXJEYXRhYmFzZVBhdGgoKQogewogICAgIEFTU0VSVCghbV9kYXRhYmFzZU11dGV4LnRyeUxvY2so
KSk7Ci0gICAgcmV0dXJuIEZpbGVTeXN0ZW06OnBhdGhCeUFwcGVuZGluZ0NvbXBvbmVudChtX3N0
b3JhZ2VEaXJlY3RvcnlQYXRoLCAiU3RvcmFnZVRyYWNrZXIuZGIiKTsKKyAgICByZXR1cm4gRmls
ZVN5c3RlbTo6cGF0aEJ5QXBwZW5kaW5nQ29tcG9uZW50KG1fc3RvcmFnZURpcmVjdG9yeVBhdGgs
ICJMZWdhY3lTdG9yYWdlVHJhY2tlci5kYiIpOwogfQogCiBzdGF0aWMgYm9vbCBlbnN1cmVEYXRh
YmFzZUZpbGVFeGlzdHMoY29uc3QgU3RyaW5nJiBmaWxlTmFtZSwgYm9vbCBjcmVhdGVJZkRvZXNO
b3RFeGlzdCkK
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>352896</attachid>
            <date>2018-10-22 10:29:05 -0700</date>
            <delta_ts>2018-10-22 14:05:29 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-190795-20181022102904.patch</filename>
            <type>text/plain</type>
            <size>1718</size>
            <attacher name="Sihui Liu">sihui_liu</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjM3MzA4CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0TGVn
YWN5L0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJLaXRMZWdhY3kvQ2hhbmdlTG9nCmluZGV4IDhiZWFh
OTQxMDA0YTE0Yj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