<?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>177901</bug_id>
          
          <creation_ts>2017-10-04 15:42:03 -0700</creation_ts>
          <short_desc>REGRESSION: LayoutTest workers/wasm-hashset.html is a flaky crash</short_desc>
          <delta_ts>2017-10-06 15:14:16 -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>JavaScriptCore</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>177473</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ryan Haddad">ryanhaddad</reporter>
          <assigned_to name="JF Bastien">jfbastien</assigned_to>
          <cc>fpizlo</cc>
    
    <cc>jfbastien</cc>
    
    <cc>jlewis3</cc>
    
    <cc>saam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1356694</commentid>
    <comment_count>0</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2017-10-04 15:42:03 -0700</bug_when>
    <thetext>LayoutTest workers/wasm-hashset.html is a flaky crash

SHOULD NEVER BE REACHED
./interpreter/CallFrame.cpp(77) : bool JSC::ExecState::callSiteBitsAreCodeOriginIndex() const
1   0x11e5c7980 WTFCrash
2   0x11e2c6b92 JSC::ExecState::callSiteBitsAreCodeOriginIndex() const
3   0x11e2c6e6a JSC::ExecState::bytecodeOffset()
4   0x11e2d05e6 JSC::StackVisitor::readNonInlinedFrame(JSC::ExecState*, JSC::CodeOrigin*)
5   0x11e2cffe3 JSC::StackVisitor::readFrame(JSC::ExecState*)
6   0x11e2d01d3 JSC::StackVisitor::gotoNextFrame()
7   0x11e2cb1f3 void JSC::StackVisitor::visit&lt;JSC::Interpreter::getStackTrace(JSC::JSCell*, WTF::Vector&lt;JSC::StackFrame, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;&amp;, unsigned long, unsigned long)::$_3&gt;(JSC::ExecState*, JSC::VM*, JSC::Interpreter::getStackTrace(JSC::JSCell*, WTF::Vector&lt;JSC::StackFrame, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;&amp;, unsigned long, unsigned long)::$_3 const&amp;)
8   0x11e2cb022 JSC::Interpreter::getStackTrace(JSC::JSCell*, WTF::Vector&lt;JSC::StackFrame, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;&amp;, unsigned long, unsigned long)
9   0x11e5b212f JSC::Exception::finishCreation(JSC::VM&amp;, JSC::JSValue, JSC::Exception::StackCaptureAction)
10  0x11e5b2045 JSC::Exception::create(JSC::VM&amp;, JSC::JSValue, JSC::Exception::StackCaptureAction)
11  0x11d605c8e JSC::VM::throwException(JSC::ExecState*, JSC::JSValue)
12  0x11d5e01c5 JSC::ThrowScope::throwException(JSC::ExecState*, JSC::JSValue)
13  0x11d222cad JSC::throwException(JSC::ExecState*, JSC::ThrowScope&amp;, JSC::JSValue)
14  0x11e39f645 llint_slow_path_throw
15  0x11d206c70 llint_entry
16  0x11d2061c1 llint_entry
17  0x11d2061c1 llint_entry
18  0x11d2061c1 llint_entry
19  0x11d1fe587 vmEntryToJavaScript
20  0x11e32dee1 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*)
21  0x11e2cd445 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;)
22  0x11e536390 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;)
23  0x11e536469 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;, WTF::NakedPtr&lt;JSC::Exception&gt;&amp;)
24  0x11e5366cd JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;, WTF::NakedPtr&lt;JSC::Exception&gt;&amp;)
25  0x110fda27b WebCore::JSMainThreadExecState::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;, WTF::NakedPtr&lt;JSC::Exception&gt;&amp;)
26  0x112512564 WebCore::ScheduledAction::executeFunctionInContext(JSC::JSGlobalObject*, JSC::JSValue, WebCore::ScriptExecutionContext&amp;)
27  0x112512148 WebCore::ScheduledAction::execute(WebCore::Document&amp;)
28  0x112512003 WebCore::ScheduledAction::execute(WebCore::ScriptExecutionContext&amp;)
29  0x11065434f WebCore::DOMTimer::fired()
30  0x112a64722 WebCore::ThreadTimers::sharedTimerFiredInternal()
31  0x112a64da1 WebCore::ThreadTimers::setSharedTimer(WebCore::SharedTimer*)::$_0::operator()() const

https://build.webkit.org/results/Apple%20El%20Capitan%20Debug%20WK2%20(Tests)/r222860%20(3432)/results.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1356696</commentid>
    <comment_count>1</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2017-10-04 15:46:44 -0700</bug_when>
    <thetext>The other crashes I see when looking at results on the flakiness dashboard have different backtraces.

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&amp;tests=workers%2Fwasm-hashset.html

https://build.webkit.org/results/Apple%20Sierra%20Debug%20WK2%20(Tests)/r222795%20(3328)/workers/wasm-hashset-crash-log.txt

https://build.webkit.org/results/Apple%20El%20Capitan%20Debug%20WK1%20(Tests)/r222842%20(4010)/workers/wasm-hashset-crash-log.txt</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1356700</commentid>
    <comment_count>2</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2017-10-04 15:59:01 -0700</bug_when>
    <thetext>I think this may have started with https://trac.webkit.org/changeset/222791/webkit</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1357257</commentid>
    <comment_count>3</comment_count>
    <who name="JF Bastien">jfbastien</who>
    <bug_when>2017-10-05 14:48:16 -0700</bug_when>
    <thetext>Yeah it&apos;s likely related to my change. I repro-d locally, definitely flaky and generates different backtraces each time. I&apos;m guessing it&apos;s a memory corruption, and since this is a worker test which instantiates the same wasm module multiple times. The bug doesn&apos;t occur in the jsc shell wasm tests, so the bug isn&apos;t likely to be some other memory corruption.

It&apos;s likely that Wasm::Module isn&apos;t refcounted properly. That&apos;s odd though, I use ThreadSafeRefCounted which should be fine. It could also be CodeBlock or some other thing.

I&apos;ll try out an asan build and see if that finds anything.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1357260</commentid>
    <comment_count>4</comment_count>
    <who name="JF Bastien">jfbastien</who>
    <bug_when>2017-10-05 14:51:04 -0700</bug_when>
    <thetext>It could also be something about tiering, I haven&apos;t tried disabling it yet, will try on asan build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1357768</commentid>
    <comment_count>5</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2017-10-06 15:14:16 -0700</bug_when>
    <thetext>Rolled this change out in https://trac.webkit.org/r223002. Duping this to the original bug.

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

    </bug>

</bugzilla>