<?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>98722</bug_id>
          
          <creation_ts>2012-10-08 22:35:02 -0700</creation_ts>
          <short_desc>REGRESSION (r130359): Assertion failure in JSC::checkOffset caused by removal of fixed inline slots count assumption</short_desc>
          <delta_ts>2013-01-11 14:39:24 -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>JavaScriptCore</component>
          <version>528+ (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, Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Lam">mark.lam</reporter>
          <assigned_to name="Geoffrey Garen">ggaren</assigned_to>
          <cc>barraclough</cc>
    
    <cc>cdumez</cc>
    
    <cc>dimitris.apostolou</cc>
    
    <cc>d-r</cc>
    
    <cc>fpizlo</cc>
    
    <cc>ggaren</cc>
    
    <cc>jussi.kukkonen</cc>
    
    <cc>koivisto</cc>
    
    <cc>mhahnenberg</cc>
    
    <cc>rniwa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>slewis</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>737424</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2012-10-08 22:35:02 -0700</bug_when>
    <thetext>Change set &lt;http://trac.webkit.org/changeset/130359&gt; (https://bugs.webkit.org/show_bug.cgi?id=98332 Removed the assumption that &quot;final&quot; objects have a fixed number of inline slots) caused some mozilla  tests in run-javascriptcore-tests to fail intermittently when jsc is built with COLLECT_ON_EVERY_ALLOCATION enabled in heap/MarkedAllocator.cpp.  This issue does not manifest in r130344 which is the revision immediately before r130359 (as far as JavaScriptCore changes are concern).

I reproduced the issues by simply running the GC only one in 5 times in MarkedAllocator::allocateSlowCase() as follows (which runs a lot faster):
#if 1 // COLLECT_ON_EVERY_ALLOCATION // mlam
    static int count = 0;
    count = (count + 1) % 5;
    if (count == 0) {
        m_heap-&gt;collectAllGarbage();
        ASSERT(m_heap-&gt;m_operationInProgress == NoOperation);
    }
#endif

When I tried running an affected test in gdb, the test does not fail every time.  But if I re-run the test over and over again in gdb, it eventually fails with an assertion failure.  Here is an example backtrace from running the following (on a more recent build, r130716):

$ cd Source/JavaScriptCore/tests/mozilla
Source/JavaScriptCore/tests/mozilla$ DYLD_FRAMEWORK_PATH=/Volumes/Source/ws2/OpenSource/WebKitBuild/Debug/ gdb /Volumes/Source/ws2/OpenSource/WebKitBuild/Debug/jsc
...
(gdb) r -s  -f ./js1_6/shell.js -f ./js1_6/Array/shell.js -f ./js1_6/Array/regress-304828.js
Starting program: /Volumes/Source/ws2/OpenSource/WebKitBuild/Debug/jsc -s  -f ./js1_6/shell.js -f ./js1_6/Array/shell.js -f ./js1_6/Array/regress-304828.js
BUGNUMBER: 304828

STATUS: Array Generic Methods

ASSERTION FAILED: offset == invalidOffset || offset &lt; inlineCapacity || isOutOfLineOffset(offset)
...

(gdb) bt
#0  0x00000001002433e7 in JSC::checkOffset (offset=37, inlineCapacity=13) at PropertyOffset.h:71
#1  0x00000001002b7209 in JSC::validateOffset (offset=37, inlineCapacity=13) at PropertyOffset.h:84
#2  0x00000001002b6f6e in JSC::JSObject::offsetForLocation (this=0x101dcffe0, location=0x101dd0118) at JSObject.h:468
#3  0x000000010032869d in JSC::setUpStaticFunctionSlot (exec=0x104800058, entry=0x102802060, thisObj=0x101dcffe0, propertyName={m_impl = 0x101902630, static NotAnIndex = 4294967295}, slot=@0x7fff5fbfdbf8) at /Volumes/Source/ws2/OpenSource/Source/JavaScriptCore/runtime/Lookup.cpp:87
#4  0x000000010035729a in JSC::getStaticFunctionSlot&lt;JSC::JSNonFinalObject&gt; (exec=0x104800058, table=0x101901680, thisObj=0x101dcffe0, propertyName={m_impl = 0x101902630, static NotAnIndex = 4294967295}, slot=@0x7fff5fbfdbf8) at Lookup.h:294
#5  0x0000000100356089 in JSC::ObjectPrototype::getOwnPropertySlot (cell=0x101dcffe0, exec=0x104800058, propertyName={m_impl = 0x101902630, static NotAnIndex = 4294967295}, slot=@0x7fff5fbfdbf8) at /Volumes/Source/ws2/OpenSource/Source/JavaScriptCore/runtime/ObjectPrototype.cpp:82
#6  0x000000010008c2e6 in JSC::JSCell::fastGetOwnPropertySlot (this=0x101dcffe0, exec=0x104800058, propertyName={m_impl = 0x101902630, static NotAnIndex = 4294967295}, slot=@0x7fff5fbfdbf8) at JSObject.h:905
#7  0x000000010008c0b0 in JSC::JSObject::getPropertySlot (this=0x101dcfe20, exec=0x104800058, propertyName={m_impl = 0x101902630, static NotAnIndex = 4294967295}, slot=@0x7fff5fbfdbf8) at JSObject.h:930
#8  0x0000000100085518 in JSC::JSObject::get (this=0x101dcfe20, exec=0x104800058, propertyName={m_impl = 0x101902630, static NotAnIndex = 4294967295}) at JSObject.h:955
#9  0x00000001002db1a0 in callDefaultValueFunction (exec=0x104800058, object=0x101dcfe20, propertyName={m_impl = 0x101902630, static NotAnIndex = 4294967295}) at /Volumes/Source/ws2/OpenSource/Source/JavaScriptCore/runtime/JSObject.cpp:736
#10 0x00000001002d833d in JSC::JSObject::defaultValue (object=0x101dcfe20, exec=0x104800058, hint=JSC::NoPreference) at /Volumes/Source/ws2/OpenSource/Source/JavaScriptCore/runtime/JSObject.cpp:775
#11 0x00000001002a9dd4 in JSC::JSObject::toPrimitive (this=0x101dcfe20, exec=0x104800058, preferredType=JSC::NoPreference) at JSObject.h:1142
#12 0x00000001002a971f in JSC::JSCell::toPrimitive (this=0x101dcfe20, exec=0x104800058, preferredType=JSC::NoPreference) at /Volumes/Source/ws2/OpenSource/Source/JavaScriptCore/runtime/JSCell.cpp:140
#13 0x000000010012c038 in JSC::JSValue::toPrimitive (this=0x7fff5fbfdef8, exec=0x104800058, preferredType=JSC::NoPreference) at JSCell.h:264
#14 0x000000010035796b in JSC::jsAddSlowCase (callFrame=0x104800058, v1={u = {asInt64 = 4326227488, ptr = 0x101dcfe20, asBits = {payload = 31260192, tag = 1}}}, v2={u = {asInt64 = 4321181664, ptr = 0x1018fffe0, asBits = {payload = 26214368, tag = 1}}}) at /Volumes/Source/ws2/OpenSource/Source/JavaScriptCore/runtime/Operations.cpp:54
#15 0x000000010042b467 in llint_slow_path_add (exec=0x104800058, pc=0x1020193f8) at /Volumes/Source/ws2/OpenSource/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:633
#16 0x00000001004362dc in llint_op_add ()
#17 0x000000010024bc14 in JSC::JITCode::execute (this=0x100efdd00, stack=0x1036090e0, callFrame=0x104800058, globalData=0x101007e00) at JITCode.h:134
#18 0x000000010024846b in JSC::Interpreter::execute (this=0x1036090c0, program=0x100efdce0, callFrame=0x1018cfb88, thisObj=0x1018efd80) at /Volumes/Source/ws2/OpenSource/Source/JavaScriptCore/interpreter/Interpreter.cpp:878
#19 0x000000010012885f in JSC::evaluate (exec=0x1018cfb88, source=@0x7fff5fbff770, thisValue={u = {asInt64 = 4320983424, ptr = 0x1018cf980, asBits = {payload = 26016128, tag = 1}}}, returnedException=0x7fff5fbff790) at /Volumes/Source/ws2/OpenSource/Source/JavaScriptCore/runtime/Completion.cpp:77
#20 0x00000001000087c9 in runWithScripts (globalObject=0x1018cf980, scripts=@0x7fff5fbff880, dump=false) at jsc.cpp:567
#21 0x0000000100008008 in jscmain (argc=8, argv=0x7fff5fbff910) at jsc.cpp:755
#22 0x0000000100007efe in main (argc=8, argv=0x7fff5fbff910) at jsc.cpp:530
(gdb)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>740249</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2012-10-11 14:01:39 -0700</bug_when>
    <thetext>This is also causing a crash in the layout test: inspector/styles/import-pseudoclass-crash.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>740252</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2012-10-11 14:04:41 -0700</bug_when>
    <thetext>The inspector/styles/import-pseudoclass-crash.html  crash seems to be intermittent.  I&apos;m not seeing it on the ews bots.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>744171</commentid>
    <comment_count>3</comment_count>
    <who name="Dominik Röttsches (drott)">d-r</who>
    <bug_when>2012-10-17 05:14:32 -0700</bug_when>
    <thetext>*** Bug 99356 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>744173</commentid>
    <comment_count>4</comment_count>
    <who name="Dominik Röttsches (drott)">d-r</who>
    <bug_when>2012-10-17 05:14:44 -0700</bug_when>
    <thetext>*** Bug 98596 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>744361</commentid>
    <comment_count>5</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2012-10-17 10:19:02 -0700</bug_when>
    <thetext>&lt;rdar://problem/12518688&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>745708</commentid>
    <comment_count>6</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2012-10-18 16:16:18 -0700</bug_when>
    <thetext>I tried reproducing this @r131809, using the COLLECT_ON_EVERY_ALLOCATION change above:
    - run-javascriptcore-tests --debug: no crash
    - r -s  -f ./js1_6/shell.js -f ./js1_6/Array/shell.js -f ./js1_6/Array/regress-304828.js: no crash
    - r -s  -f ./js1_6/shell.js -f ./js1_6/Array/shell.js -f ./js1_6/Array/regress-304828.js....: no crash</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>746477</commentid>
    <comment_count>7</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2012-10-19 11:22:25 -0700</bug_when>
    <thetext>I can reproduce this using run-javascriptcore-tests @r130359, on many sub-tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>746495</commentid>
    <comment_count>8</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2012-10-19 11:42:11 -0700</bug_when>
    <thetext>Frequently seeing this while debugging facebook.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>756568</commentid>
    <comment_count>9</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2012-11-01 13:24:57 -0700</bug_when>
    <thetext>Seems pretty frequent

http://build.webkit.org/results/Apple%20MountainLion%20Debug%20WK1%20(Tests)/r133207%20(2384)/results.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>758549</commentid>
    <comment_count>10</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2012-11-05 08:19:19 -0800</bug_when>
    <thetext>This crash still occurs regularly on EFL EWS:
http://build.webkit.org/results/EFL%20Linux%2064-bit%20Debug/r133475%20(8160)/results.html
http://build.webkit.org/results/EFL%20Linux%2064-bit%20Debug/r133460%20(8156)/results.html

It makes it tough to keep the bots green since it affects random tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>794216</commentid>
    <comment_count>11</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2012-12-18 17:41:15 -0800</bug_when>
    <thetext>Still happens:
http://build.webkit.org/results/Apple%20MountainLion%20Debug%20WK1%20(Tests)/r138081%20(3961)/fast/dom/gc-acid3-crash-log.txt</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>799464</commentid>
    <comment_count>12</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-01-03 10:32:05 -0800</bug_when>
    <thetext>inspector/extensions/extensions-panel.html and inspector/extensions/extensions-api.html crashed on this run:
http://build.webkit.org/results/Apple%20MountainLion%20Debug%20WK1%20(Tests)/r138709%20(4272)/results.html

fast/dom/gc-acid3.html and inspector/profiler/webgl/webgl-profiler-get-error.html crashed on this run:
http://build.webkit.org/results/Apple%20MountainLion%20Debug%20WK2%20(Tests)/r138709%20(5405)/results.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>799877</commentid>
    <comment_count>13</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-01-03 17:38:39 -0800</bug_when>
    <thetext>We’re constantly seeing this failure on bots:

http://build.webkit.org/results/Apple%20MountainLion%20Debug%20WK1%20(Tests)/r138762%20(4284)/results.html

http://build.webkit.org/results/Apple%20Lion%20Debug%20WK1%20(Tests)/r138761%20(5649)/results.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>799951</commentid>
    <comment_count>14</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-01-03 21:55:14 -0800</bug_when>
    <thetext>Here&apos;s another one:

http://build.webkit.org/results/Apple%20MountainLion%20Debug%20WK1%20(Tests)/r138776%20(4290)/results.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>800351</commentid>
    <comment_count>15</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-01-04 10:29:22 -0800</bug_when>
    <thetext>Another one: http://build.webkit.org/results/Apple%20MountainLion%20Debug%20WK1%20(Tests)/r138805%20(4304)/results.html

This bug is preventing us from making debug bots green.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>805515</commentid>
    <comment_count>16</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-01-11 12:20:19 -0800</bug_when>
    <thetext>Bug 106686 should fix most of these reports. A related bug remains in JSObject::offsetForLocation() (coming soon).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>805558</commentid>
    <comment_count>17</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-01-11 13:18:09 -0800</bug_when>
    <thetext>Bug 106692 removes JSObject::offsetForLocation().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>805559</commentid>
    <comment_count>18</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-01-11 13:18:34 -0800</bug_when>
    <thetext>I believe this issue is fixed; we&apos;ll reopen if more buildbot issues appear.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>805560</commentid>
    <comment_count>19</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-01-11 13:19:46 -0800</bug_when>
    <thetext>BTW, Phil is the one who diagnosed this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>805627</commentid>
    <comment_count>20</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-01-11 14:39:24 -0800</bug_when>
    <thetext>(In reply to comment #17)
&gt; Bug 106692 removes JSObject::offsetForLocation().

Exciting!

(In reply to comment #19)
&gt; BTW, Phil is the one who diagnosed this bug.

Thanks a lot for following up on this bug. I really hope this flaky crash goes away in the next cycle.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>