<?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>168502</bug_id>
          
          <creation_ts>2017-02-17 02:29:56 -0800</creation_ts>
          <short_desc>REGRESSION(r212778): It made 400 tests crash on AArch64 Linux</short_desc>
          <delta_ts>2017-03-06 15:07:36 -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>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>108645</blocked>
    
    <blocked>167737</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Csaba Osztrogonác">ossy</reporter>
          <assigned_to name="Csaba Osztrogonác">ossy</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>fpizlo</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>msaboff</cc>
    
    <cc>ossy</cc>
    
    <cc>saam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1278183</commentid>
    <comment_count>0</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2017-02-17 02:29:56 -0800</bug_when>
    <thetext>before: https://build.webkit.org/builders/JSCOnly%20Linux%20AArch64%20Release/builds/4617 (r212462)
after: https://build.webkit.org/builders/JSCOnly%20Linux%20AArch64%20Release/builds/4618 (r212482)

I bisected manually, and https://trac.webkit.org/changeset/212466 is the culprit.
r212465 - https://build.webkit.org/builders/JSCOnly%20Linux%20AArch64%20Release/builds/4627
r212466 - https://build.webkit.org/builders/JSCOnly%20Linux%20AArch64%20Release/builds/4626</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1278704</commentid>
    <comment_count>1</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2017-02-19 00:03:56 -0800</bug_when>
    <thetext>Haven&apos;t you noticed this regression on internal iOS JSC tester bots too?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1278726</commentid>
    <comment_count>2</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2017-02-19 07:37:15 -0800</bug_when>
    <thetext>Passed tests just fine on my iPad. 

Idea: what happens when you make Linux take the same path as Windows in RegisterStae.h?  Basically make it fall through to the setjmp code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1278766</commentid>
    <comment_count>3</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2017-02-19 14:39:57 -0800</bug_when>
    <thetext>Did you get a stack trace?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1279822</commentid>
    <comment_count>4</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2017-02-22 01:23:02 -0800</bug_when>
    <thetext>r212466 was rolled out and relanded in https://trac.webkit.org/changeset/212778
Now we have only 400 crashes on AArch64 Linux. 

(In reply to comment #2)
&gt; Passed tests just fine on my iPad. 
&gt; 
&gt; Idea: what happens when you make Linux take the same path as Windows in
&gt; RegisterStae.h?  Basically make it fall through to the setjmp code.
Will check soon.

(In reply to comment #3)
&gt; Did you get a stack trace?
Not yet, I&apos;m going to do a debug build in the near future.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1279941</commentid>
    <comment_count>5</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2017-02-22 10:02:12 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; Idea: what happens when you make Linux take the same path as Windows in
&gt; RegisterStae.h?  Basically make it fall through to the setjmp code.

This idea fixed this issue. What does it mean?


(In reply to comment #3)
&gt; Did you get a stack trace?

Unfortunately there are no crashes in debug mode.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1282289</commentid>
    <comment_count>6</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2017-03-01 09:07:36 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #2)
&gt; &gt; Idea: what happens when you make Linux take the same path as Windows in
&gt; &gt; RegisterStae.h?  Basically make it fall through to the setjmp code.
&gt; 
&gt; This idea fixed this issue. What does it mean?
&gt; 
&gt; 
&gt; (In reply to comment #3)
&gt; &gt; Did you get a stack trace?
&gt; 
&gt; Unfortunately there are no crashes in debug mode.

AArch64 Linux platform is still broken due to this GC bug.
Any plan to fix it or should we use the setjmp codepath?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1282308</commentid>
    <comment_count>7</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2017-03-01 09:53:41 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #2)
&gt; &gt; Idea: what happens when you make Linux take the same path as Windows in
&gt; &gt; RegisterStae.h?  Basically make it fall through to the setjmp code.
&gt; 
&gt; This idea fixed this issue. What does it mean?

It means that this is the fix to this issue. From what I remember setjmp is very fast on Linux so this should be fine. 

&gt; 
&gt; 
&gt; (In reply to comment #3)
&gt; &gt; Did you get a stack trace?
&gt; 
&gt; Unfortunately there are no crashes in debug mode.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1283923</commentid>
    <comment_count>8</comment_count>
      <attachid>303550</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2017-03-06 13:48:51 -0800</bug_when>
    <thetext>Created attachment 303550
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1283925</commentid>
    <comment_count>9</comment_count>
      <attachid>303550</attachid>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2017-03-06 13:56:27 -0800</bug_when>
    <thetext>Comment on attachment 303550
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=303550&amp;action=review

&gt; Source/JavaScriptCore/heap/RegisterState.h:32
&gt; -#if !OS(WINDOWS)
&gt; +#if !OS(WINDOWS) &amp;&amp; !(OS(LINUX) &amp;&amp; CPU(ARM64))

This is good.

FWIW, it&apos;s probably also a bit safer to use setjmp on all Linuxes.

I&apos;ve written this kind of stuff on Linux before and always found that setjmp was the canonical Linux way of getting register state.

The only reason why we now do it differently is that Darwin&apos;s setjmp does some extra state saving that makes it just a tad bit too slow.  I don&apos;t think Linux&apos;s setjmp has that kind of problem on any architecture.  It would even be fine to change this to OS(DARWIN) rather than !OS(WINDOWS) &amp;&amp; !OS(LINUX).

If you want to make any of those changes then lets do it in another patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1283977</commentid>
    <comment_count>10</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-03-06 14:48:30 -0800</bug_when>
    <thetext>The commit-queue encountered the following flaky tests while processing attachment 303550:

media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls.html bug 169158 (authors: graouts@apple.com and ryanhaddad@apple.com)
The commit-queue is continuing to process your patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1283980</commentid>
    <comment_count>11</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-03-06 14:48:42 -0800</bug_when>
    <thetext>The commit-queue encountered the following flaky tests while processing attachment 303550:

media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html bug 169159 (authors: graouts@apple.com and ryanhaddad@apple.com)
The commit-queue is continuing to process your patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1283991</commentid>
    <comment_count>12</comment_count>
      <attachid>303550</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-03-06 15:07:30 -0800</bug_when>
    <thetext>Comment on attachment 303550
Patch

Clearing flags on attachment: 303550

Committed r213472: &lt;http://trac.webkit.org/changeset/213472&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1283992</commentid>
    <comment_count>13</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-03-06 15:07:36 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>303550</attachid>
            <date>2017-03-06 13:48:51 -0800</date>
            <delta_ts>2017-03-06 15:07:30 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-168502-20170306224849.patch</filename>
            <type>text/plain</type>
            <size>1334</size>
            <attacher name="Csaba Osztrogonác">ossy</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjEzNDY0CmRpZmYgLS1naXQgYS9Tb3VyY2UvSmF2YVNjcmlw
dENvcmUvQ2hhbmdlTG9nIGIvU291cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwppbmRleCBh
YjZiMWYzYTg4ZWMzMzEwYTY4ZjRmNWQwNWNlOWM3MzhmNzNkZmQ3Li5kOWQ1NWFhOWE1ZWJjN2Mw
YTRhMDg0N2I0MTRmMTM4MThkODEyZWMwIDEwMDY0NAotLS0gYS9Tb3VyY2UvSmF2YVNjcmlwdENv
cmUvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKQEAgLTEs
MyArMSwxMiBAQAorMjAxNy0wMy0wNiAgQ3NhYmEgT3N6dHJvZ29uw6FjICA8b3NzeUB3ZWJraXQu
b3JnPgorCisgICAgICAgIFJFR1JFU1NJT04ocjIxMjc3OCk6IEl0IG1hZGUgNDAwIHRlc3RzIGNy
YXNoIG9uIEFBcmNoNjQgTGludXgKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5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