<?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>165242</bug_id>
          
          <creation_ts>2016-11-30 22:01:41 -0800</creation_ts>
          <short_desc>REGRESSION (209168!): IndexedDB.IndexedDBMultiProcess and IndexedDB.WebProcessKillIDBCleanup are timing out</short_desc>
          <delta_ts>2016-11-30 23:06:38 -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>WebCore Misc.</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></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>160306</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Brady Eidson">beidson</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ryanhaddad</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1255151</commentid>
    <comment_count>0</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-11-30 22:01:41 -0800</bug_when>
    <thetext>REGRESSION: IndexedDB.IndexedDBMultiProcess and IndexedDB.WebProcessKillIDBCleanup are timing out

Seems they&apos;re timing out reliably in most (if not all) configs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1255152</commentid>
    <comment_count>1</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-11-30 22:04:05 -0800</bug_when>
    <thetext>Trying to track down when this started (probably one of my checkins today)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1255153</commentid>
    <comment_count>2</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-11-30 22:05:49 -0800</bug_when>
    <thetext>I can reproduce locally (95% of the time)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1255161</commentid>
    <comment_count>3</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-11-30 22:55:04 -0800</bug_when>
    <thetext>Focusing on IndexedDB.IndexedDBMultiProcess locally.

I&apos;m not sure this was related to my changes from today.

The test loads 3 html files serially. Each HTML file is expected to communicate back to the native code via various messages.

The first test is supposed to message back:
1 - That an upgrade transaction started (via the javascript onupgradeneeded event handler)
2 - That the transaction completed (via the javascript oncomplete event handler)
3 - That the open request succeeded (via the javascript onsuccess event handler)

I&apos;ve verified through code, in no uncertain terms, that each of those 3 events are firing in the correct order.

But when the test hangs, only message #1 and #3 makes it back to native code.
Message #2 is lost somehow.

I&apos;ve confirmed that event #2 *is firing* and *is being handled*, because I&apos;ve given it side effects that are observed in message #3... yet message #2 never makes it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1255162</commentid>
    <comment_count>4</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-11-30 22:55:21 -0800</bug_when>
    <thetext>Additionally, this only happens &quot;sometimes&quot;, even if it&apos;s most of the time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1255163</commentid>
    <comment_count>5</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-11-30 22:57:46 -0800</bug_when>
    <thetext>The event handler in question is as follows:
        event.target.transaction.oncomplete = function() {
            window.webkit.messageHandlers.testHandler.postMessage(&apos;Transaction complete&apos;);
        }

~95% of the time, that message never gets back to native code.
Sometimes it does.

If I change it to the following:
        sawTransactionComplete = false;
        event.target.transaction.oncomplete = function() {
            window.webkit.messageHandlers.testHandler.postMessage(&apos;Transaction complete&apos;);
            sawTransactionComplete = true;
        }

... and then pass the value of sawTransactionComplete through to the onsuccess event handler message, native code sees that sawTransactionComplete is in fact true.

If I change it to the following:

        event.target.transaction.oncomplete = function() {
            window.webkit.messageHandlers.testHandler.postMessage(&apos;Transaction complete&apos;);
            alert(&quot;Made it here!&quot;);
        }

Then the existence of that alert() call makes the test reliably pass!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1255164</commentid>
    <comment_count>6</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-11-30 23:01:34 -0800</bug_when>
    <thetext>Based on the history of this one bot:
https://build.webkit.org/buildslaves/bot165

Revision 209167 worked but revision 209169 failed.

https://trac.webkit.org/changeset/209168 is of course a (surprising) candidate.

Other bots seem to confirm.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1255169</commentid>
    <comment_count>7</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-11-30 23:06:38 -0800</bug_when>
    <thetext>Rolled out in https://trac.webkit.org/changeset/209176</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>