<?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>155131</bug_id>
          
          <creation_ts>2016-03-07 13:43:40 -0800</creation_ts>
          <short_desc>(Crash) storage/indexeddb/intversion-open-in-upgradeneeded.html crashes intermittently on mac-wk2</short_desc>
          <delta_ts>2016-06-03 16:49:12 -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>WebCore Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>155050</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=155050</see_also>
          <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>
          
          <blocked>154968</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ryan Haddad">ryanhaddad</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>beidson</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1171729</commentid>
    <comment_count>0</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2016-03-07 13:43:40 -0800</bug_when>
    <thetext>storage/indexeddb/intversion-open-in-upgradeneeded.html crashes intermittently on mac-wk2

&lt;http://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&amp;tests=storage%2Findexeddb%2Fintversion-open-in-upgradeneeded.html&gt;

Thread 4 Crashed:: IndexedDatabase Server
0   com.apple.JavaScriptCore      	0x0000000112d3e267 WTFCrash + 39 (Assertions.cpp:322)
1   com.apple.WebCore             	0x0000000116f28598 WebCore::SQLiteTransaction::begin() + 88 (SQLiteTransaction.cpp:53)
2   com.apple.WebCore             	0x0000000116f1f02e WebCore::IDBServer::SQLiteIDBTransaction::begin(WebCore::SQLiteDatabase&amp;) + 974 (SQLiteIDBTransaction.cpp:62)
3   com.apple.WebCore             	0x0000000116f097ec WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction(WebCore::IDBTransactionInfo const&amp;) + 1628 (SQLiteIDBBackingStore.cpp:628)
4   com.apple.WebCore             	0x0000000117254005 WebCore::IDBServer::UniqueIDBDatabase::beginTransactionInBackingStore(WebCore::IDBTransactionInfo const&amp;) + 117 (UniqueIDBDatabase.cpp:401)
5   com.apple.WebCore             	0x000000011727d4ef WebCore::CrossThreadTaskImpl&lt;WebCore::IDBServer::UniqueIDBDatabase, WebCore::IDBTransactionInfo const&amp;&gt;::CrossThreadTaskImpl(WebCore::IDBServer::UniqueIDBDatabase*, void (WebCore::IDBServer::UniqueIDBDatabase::*)(WebCore::IDBTransactionInfo const&amp;), WebCore::IDBTransactionInfo const&amp;)::&apos;lambda&apos;()::operator()() const + 127 (CrossThreadTask.h:61)
6   com.apple.WebCore             	0x000000011727d45d _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZN7WebCore19CrossThreadTaskImplINS3_9IDBServer17UniqueIDBDatabaseEJRKNS3_18IDBTransactionInfoEEEC1EPS6_MS6_FvS9_ES9_EUlvE_EEEvDpOT_ + 45 (__functional_base:441)
7   com.apple.WebCore             	0x000000011727d2ec std::__1::__function::__func&lt;WebCore::CrossThreadTaskImpl&lt;WebCore::IDBServer::UniqueIDBDatabase, WebCore::IDBTransactionInfo const&amp;&gt;::CrossThreadTaskImpl(WebCore::IDBServer::UniqueIDBDatabase*, void (WebCore::IDBServer::UniqueIDBDatabase::*)(WebCore::IDBTransactionInfo const&amp;), WebCore::IDBTransactionInfo const&amp;)::&apos;lambda&apos;(), std::__1::allocator&lt;WebCore::CrossThreadTaskImpl&lt;WebCore::IDBServer::UniqueIDBDatabase, WebCore::IDBTransactionInfo const&amp;&gt;::CrossThreadTaskImpl(WebCore::IDBServer::UniqueIDBDatabase*, void (WebCore::IDBServer::UniqueIDBDatabase::*)(WebCore::IDBTransactionInfo const&amp;), WebCore::IDBTransactionInfo const&amp;)::&apos;lambda&apos;()&gt;, void ()&gt;::operator()() + 44 (functional:1407)
8   com.apple.WebCore             	0x0000000114e8e29a std::__1::function&lt;void ()&gt;::operator()() const + 26 (functional:1793)
9   com.apple.WebCore             	0x0000000115beec75 WebCore::CrossThreadTask::performTask() + 21 (CrossThreadTask.h:46)
10  com.apple.WebCore             	0x0000000115beca53 WebCore::IDBServer::IDBServer::databaseRunLoop() + 275 (IDBServer.cpp:414)
11  com.apple.WebCore             	0x0000000115bea5e4 WebCore::IDBServer::IDBServer::databaseThreadEntry(void*) + 84 (IDBServer.cpp:404)
12  com.apple.JavaScriptCore      	0x0000000112da9389 WTF::createThread(void (*)(void*), void*, char const*)::$_0::operator()() const + 25 (Threading.cpp:82)
13  com.apple.JavaScriptCore      	0x0000000112da935d void std::__1::__invoke_void_return_wrapper&lt;void&gt;::__call&lt;WTF::createThread(void (*)(void*), void*, char const*)::$_0&amp;&gt;(WTF::createThread(void (*)(void*), void*, char const*)::$_0&amp;&amp;&amp;) + 45 (__functional_base:441)
14  com.apple.JavaScriptCore      	0x0000000112da92fc std::__1::__function::__func&lt;WTF::createThread(void (*)(void*), void*, char const*)::$_0, std::__1::allocator&lt;WTF::createThread(void (*)(void*), void*, char const*)::$_0&gt;, void ()&gt;::operator()() + 44 (functional:1407)
15  com.apple.JavaScriptCore      	0x0000000112656d0a std::__1::function&lt;void ()&gt;::operator()() const + 26 (functional:1793)
16  com.apple.JavaScriptCore      	0x0000000112da805e WTF::threadEntryPoint(void*) + 158 (Threading.cpp:58)
17  com.apple.JavaScriptCore      	0x0000000112da98f1 WTF::wtfThreadEntryPoint(void*) + 289 (ThreadingPthreads.cpp:164)
18  libsystem_pthread.dylib       	0x00007fff91e87c13 _pthread_body + 131
19  libsystem_pthread.dylib       	0x00007fff91e87b90 _pthread_start + 168
20  libsystem_pthread.dylib       	0x00007fff91e85375 thread_start + 13

Full crashlog:
&lt;https://build.webkit.org/results/Apple%20El%20Capitan%20Debug%20WK2%20(Tests)/r197696%20(3498)/storage/indexeddb/intversion-open-in-upgradeneeded-crash-log.txt&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1171794</commentid>
    <comment_count>1</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2016-03-07 15:18:46 -0800</bug_when>
    <thetext>&lt;rdar://problem/25015010&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1178134</commentid>
    <comment_count>2</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-03-25 15:26:30 -0700</bug_when>
    <thetext>I think this was the &quot;too many file handles open at once&quot; problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1178135</commentid>
    <comment_count>3</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-03-25 15:27:10 -0700</bug_when>
    <thetext>Which I fixed in http://trac.webkit.org/changeset/197474</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1178136</commentid>
    <comment_count>4</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-03-25 15:27:58 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; Which I fixed in http://trac.webkit.org/changeset/197474

Which was, sadly, a few days before Ryan filed this...  =/ Grumble.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1178139</commentid>
    <comment_count>5</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-03-25 15:30:15 -0700</bug_when>
    <thetext>Regardless, it is the same problem. With the entire test suite cruising along, and with the unpredictability of GC, and with some leaks still outstanding, we&apos;re clearly keeping some file handles open that we don&apos;t need.

Fixing leaks is going to be one way out of this mess.

Another is:
https://bugs.webkit.org/show_bug.cgi?id=154923</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1199114</commentid>
    <comment_count>6</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-06-03 16:44:35 -0700</bug_when>
    <thetext>According to the dashboard:
- This test hasn&apos;t crashed in recent recorded history.
- This test stopped timing out mid May-27th, which jives with my fix http://trac.webkit.org/changeset/201461
- This test is still flaking on text results quite often.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1199116</commentid>
    <comment_count>7</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-06-03 16:45:07 -0700</bug_when>
    <thetext>My fix on 5/27 also jives with the nature of the crash log.

I&apos;m confident it made an impact here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1199117</commentid>
    <comment_count>8</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-06-03 16:47:02 -0700</bug_when>
    <thetext>The text diff is always about the blocked event:
--- /Volumes/Data/slave/yosemite-debug-tests-wk2/build/layout-test-results/storage/indexeddb/intversion-open-in-upgradeneeded-expected.txt
+++ /Volumes/Data/slave/yosemite-debug-tests-wk2/build/layout-test-results/storage/indexeddb/intversion-open-in-upgradeneeded-actual.txt
@@ -34,8 +34,6 @@
 onVersionChange():
 db.close()
 
-onBlocked():
-
 upgradeNeeded2():
 db = event.target.result
 PASS event.newVersion is 3
----

This is basically the same flakiness issue as https://bugs.webkit.org/show_bug.cgi?id=155050

This can be resolved with a test change (getting the blocked event is not relevant to the test, and blocked events are well tested elsewhere)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1199118</commentid>
    <comment_count>9</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-06-03 16:49:12 -0700</bug_when>
    <thetext>Okay, hilarious - This is actually the SAME TEST as 155050.

The change has already been made.

We&apos;re good here.

*** This bug has been marked as a duplicate of bug 155050 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>