<?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>154822</bug_id>
          
          <creation_ts>2016-02-29 09:50:42 -0800</creation_ts>
          <short_desc>[ARM] REGRESSION(197226): Removing the on demand executable allocator made 14 tests crash with OOM</short_desc>
          <delta_ts>2016-03-01 22:54:26 -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>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>154910</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>
          
          <blocked>108645</blocked>
    
    <blocked>154749</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Csaba Osztrogonác">ossy</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cgarcia</cc>
    
    <cc>clopez</cc>
    
    <cc>ggaren</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>jh718.park</cc>
    
    <cc>oliver</cc>
    
    <cc>ossy</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1169177</commentid>
    <comment_count>0</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2016-02-29 09:50:42 -0800</bug_when>
    <thetext>http://trac.webkit.org/changeset/197226 removed the on demand executable allocator
which was used by 32 bit ARM Linux platforms. Since r197226, only fixed allocator
is available, which means only 16Mb RAM is available on 32 bit ARM devices.

Failing tests:
mozilla-tests.yaml/js1_5/Regress/regress-159334.js.mozilla-baseline
jsc-layout-tests.yaml/js/script-tests/regress-141098.js.layout-no-llint
jsc-layout-tests.yaml/js/script-tests/dfg-float32array.js.layout-no-llint
jsc-layout-tests.yaml/js/script-tests/dfg-float64array.js.layout-no-llint
jsc-layout-tests.yaml/js/script-tests/dfg-int16array.js.layout-no-llint
jsc-layout-tests.yaml/js/script-tests/dfg-int32array-overflow-values.js.layout-no-llint
jsc-layout-tests.yaml/js/script-tests/dfg-int32array.js.layout-no-llint
jsc-layout-tests.yaml/js/script-tests/dfg-int8array.js.layout-no-llint
jsc-layout-tests.yaml/js/script-tests/dfg-osr-entry-hoisted-clobbered-structure-check.js.layout-no-llint
jsc-layout-tests.yaml/js/script-tests/dfg-uint16array.js.layout-no-llint
jsc-layout-tests.yaml/js/script-tests/dfg-uint32array-overflow-values.js.layout-no-llint
jsc-layout-tests.yaml/js/script-tests/dfg-uint32array.js.layout-no-llint
jsc-layout-tests.yaml/js/script-tests/dfg-uint8array.js.layout-no-llint
jsc-layout-tests.yaml/js/script-tests/dfg-uint8clampedarray.js.layout-no-llint</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1169181</commentid>
    <comment_count>1</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2016-02-29 09:56:32 -0800</bug_when>
    <thetext>Apple already skipped these tests in http://trac.webkit.org/changeset/196625
and I unskipped them on Linux in http://trac.webkit.org/changeset/196762 .

But after http://trac.webkit.org/changeset/197226 these tests started to fail.

Is there a reason to remove the on demand executable allocator?
There weren&apos;t any explanation in the original bug report.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1169190</commentid>
    <comment_count>2</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2016-02-29 10:29:44 -0800</bug_when>
    <thetext>I tried to increase the memory size to 32Mb
(JSC_jitMemoryReservationSize=33554432), which
fixed these tests, but made 150 other tests fail.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1169416</commentid>
    <comment_count>3</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2016-03-01 04:30:46 -0800</bug_when>
    <thetext>Increasing jitMemoryReservationSize to 32Mb fixes the OOM issue with 
the ARMAssembler (ARM instruction set) and we don&apos;t get new crashes.

But with ARMv7Assembler (Thumb2 instruction set) we get ~150 crashes if
we increase the JIT memory above 16Mb (maximum jump with 24 bit address!)

Zoltán fixed a similar bug in ARMv7Assembler 3 years ago:
http://trac.webkit.org/changeset/146396</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1169457</commentid>
    <comment_count>4</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2016-03-01 09:25:55 -0800</bug_when>
    <thetext>Are these just timing out?

(In reply to comment #0)
&gt; http://trac.webkit.org/changeset/197226 removed the on demand executable
&gt; allocator
&gt; which was used by 32 bit ARM Linux platforms. Since r197226, only fixed
&gt; allocator
&gt; is available, which means only 16Mb RAM is available on 32 bit ARM devices.
&gt; 
&gt; Failing tests:
&gt; mozilla-tests.yaml/js1_5/Regress/regress-159334.js.mozilla-baseline
&gt; jsc-layout-tests.yaml/js/script-tests/regress-141098.js.layout-no-llint
&gt; jsc-layout-tests.yaml/js/script-tests/dfg-float32array.js.layout-no-llint
&gt; jsc-layout-tests.yaml/js/script-tests/dfg-float64array.js.layout-no-llint
&gt; jsc-layout-tests.yaml/js/script-tests/dfg-int16array.js.layout-no-llint
&gt; jsc-layout-tests.yaml/js/script-tests/dfg-int32array-overflow-values.js.
&gt; layout-no-llint
&gt; jsc-layout-tests.yaml/js/script-tests/dfg-int32array.js.layout-no-llint
&gt; jsc-layout-tests.yaml/js/script-tests/dfg-int8array.js.layout-no-llint
&gt; jsc-layout-tests.yaml/js/script-tests/dfg-osr-entry-hoisted-clobbered-
&gt; structure-check.js.layout-no-llint
&gt; jsc-layout-tests.yaml/js/script-tests/dfg-uint16array.js.layout-no-llint
&gt; jsc-layout-tests.yaml/js/script-tests/dfg-uint32array-overflow-values.js.
&gt; layout-no-llint
&gt; jsc-layout-tests.yaml/js/script-tests/dfg-uint32array.js.layout-no-llint
&gt; jsc-layout-tests.yaml/js/script-tests/dfg-uint8array.js.layout-no-llint
&gt; jsc-layout-tests.yaml/js/script-tests/dfg-uint8clampedarray.js.layout-no-
&gt; llint</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1169461</commentid>
    <comment_count>5</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2016-03-01 09:32:25 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; Are these just timing out?

No, out of memory because of fixed 16Mb sized VM pool.

I already added my detailed investigation:

(In reply to comment #3)
&gt; Increasing jitMemoryReservationSize to 32Mb fixes the OOM issue with 
&gt; the ARMAssembler (ARM instruction set) and we don&apos;t get new crashes.
&gt; 
&gt; But with ARMv7Assembler (Thumb2 instruction set) we get ~150 crashes if
&gt; we increase the JIT memory above 16Mb (maximum jump with 24 bit address!)
&gt; 
&gt; Zoltán fixed a similar bug in ARMv7Assembler 3 years ago:
&gt; http://trac.webkit.org/changeset/146396

It&apos;s easy to fix this bug with ARMAssembler with increasing
jitMemoryReservationSize. But it would cause more problems
with ARMv7Assembler.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1169465</commentid>
    <comment_count>6</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2016-03-01 09:36:09 -0800</bug_when>
    <thetext>Why is the ARM backend not falling back to the interpreter when it&apos;s out of executable memory?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1169468</commentid>
    <comment_count>7</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2016-03-01 09:43:09 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; Why is the ARM backend not falling back to the interpreter when it&apos;s out of
&gt; executable memory?

These tests explicitly disable LLINT, I don&apos;t think 
if it is possible to fallback in this case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1169755</commentid>
    <comment_count>8</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2016-03-01 22:54:26 -0800</bug_when>
    <thetext>Fixing by rollout.

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

    </bug>

</bugzilla>