<?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>259773</bug_id>
          
          <creation_ts>2023-08-03 03:23:45 -0700</creation_ts>
          <short_desc>REGRESSION(264514@main): [WPE] Lot of crashes when running layout tests on machines without a GPU</short_desc>
          <delta_ts>2023-08-04 04:04:03 -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>WPE WebKit</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=257321</see_also>
          <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="Carlos Alberto Lopez Perez">clopez</reporter>
          <assigned_to name="Philippe Normand">philn</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>philn</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1969418</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2023-08-03 03:23:45 -0700</bug_when>
    <thetext>264514@main updated several recipes on the Flatpak SDK.

Among them it updated the FDO junction from freedesktop-sdk-22.08.11-24-g67b3605b402cffed2db0344f1da3a6acb5b6c914 to freedesktop-sdk-22.08.11-127-g7bed8a0d05bfd13939862b30e7080d1ffd5f635b

And that it turn updated Mesa from mesa-23.0.3-0-g77661a60228061aa5d78107e0de5c58c803a57a4 to mesa-23.1.0-0-gbe4f7fb656180ab55a50eff01f36672b0bf5f146


And there is a regression with the new version of Mesa that is causing massive crashes on the WPE bots that run without a GPU (which happen to be all the EWS machines).

You can see how they are crashing with more than 500 crashes (exit early) since then: https://ews-build.webkit.org/#/builders/34


I have been able to reproduce the issue by building Mesa with jhbuild (for faster iteration) and I&apos;m now bisecting Mesa to find out which Mesa commit caused this</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1969424</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2023-08-03 04:00:45 -0700</bug_when>
    <thetext>Bisect finished.

This is the Mesa commit causing the issue:

- b8da022da410519c95d5726fc92a9ee5731de5e8 is the first bad commit
- https://gitlab.freedesktop.org/mesa/mesa/-/commit/b8da022da410519c95d5726fc92a9ee5731de5e8

Is not obvious to me why this Mesa commit is causing this crashes. Will try to debug it with GDB.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1969425</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2023-08-03 04:07:47 -0700</bug_when>
    <thetext>The issue (crashes) is not reproducible with Mesa main so it seems this has been fixed on the main branch.

I will do a reverse bisect to find the commit fixing it</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1969464</commentid>
    <comment_count>3</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2023-08-03 10:28:00 -0700</bug_when>
    <thetext>Thanks for investigating this, Carlos!

Do you know if Mesa 23.1.5 is also affected by this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1969465</commentid>
    <comment_count>4</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2023-08-03 10:30:01 -0700</bug_when>
    <thetext>Do you have a bt of the crash? The EWS doesn&apos;t seem to log them...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1969573</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2023-08-03 18:21:18 -0700</bug_when>
    <thetext>I had trouble bisecting the main branch as I&apos;m not able to build several commits in the range.

However I tested the stable branches and:

- 23.1.5 : works fine
- 23.1.4 : crashes

Bisecting between both tags:

- The commit fixing the issue is: c795abedd2c8d293ad5e9bfac1f8b362260e5bf8
https://gitlab.freedesktop.org/mesa/mesa/-/commit/c795abedd2c8d293ad5e9bfac1f8b362260e5bf8
Related MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24347

So we need to update Mesa to 23.1.5 to fix this issue on the bots.


I didn&apos;t bothered to get a GDB back-trace but I can get one easily if you think is useful, just let me know if you want it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1969617</commentid>
    <comment_count>6</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2023-08-04 01:22:42 -0700</bug_when>
    <thetext>(In reply to Carlos Alberto Lopez Perez from comment #5)
&gt; So we need to update Mesa to 23.1.5 to fix this issue on the bots.
&gt; 

I can submit a PR.

&gt; 
&gt; I didn&apos;t bothered to get a GDB back-trace but I can get one easily if you
&gt; think is useful, just let me know if you want it.

I was just asking out of curiosity.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1969620</commentid>
    <comment_count>7</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2023-08-04 02:15:38 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #6)
&gt; (In reply to Carlos Alberto Lopez Perez from comment #5)
&gt; &gt; So we need to update Mesa to 23.1.5 to fix this issue on the bots.
&gt; &gt; 
&gt; 
&gt; I can submit a PR.
&gt; 

Great. I appreciate that. Thanks!

&gt; &gt; 
&gt; &gt; I didn&apos;t bothered to get a GDB back-trace but I can get one easily if you
&gt; &gt; think is useful, just let me know if you want it.
&gt; 
&gt; I was just asking out of curiosity.

Ok. Will try to get some backtrace.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1969627</commentid>
    <comment_count>8</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2023-08-04 03:08:09 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/16388</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1969631</commentid>
    <comment_count>9</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2023-08-04 03:19:58 -0700</bug_when>
    <thetext>(In reply to Carlos Alberto Lopez Perez from comment #7)
&gt; (In reply to Philippe Normand from comment #6)
&gt; &gt; (In reply to Carlos Alberto Lopez Perez from comment #5)
&gt; &gt; &gt; So we need to update Mesa to 23.1.5 to fix this issue on the bots.
&gt; &gt; &gt; 
&gt; &gt; 
&gt; &gt; I can submit a PR.
&gt; &gt; 
&gt; 
&gt; Great. I appreciate that. Thanks!
&gt; 
&gt; &gt; &gt; 
&gt; &gt; &gt; I didn&apos;t bothered to get a GDB back-trace but I can get one easily if you
&gt; &gt; &gt; think is useful, just let me know if you want it.
&gt; &gt; 
&gt; &gt; I was just asking out of curiosity.
&gt; 
&gt; Ok. Will try to get some backtrace.


I tried to debug this but is a bit complicated.

There isn&apos;t a crash as such.

And the issue is not on the WebProcess but on the UIProcess.

I can reproduce this both with WebKitTestRunner or with Cog.

On stderr you can see this:

  libEGL warning: failed to get driver name for fd 0
  libEGL warning: MESA-LOADER: failed to retrieve device information

But I couldn&apos;t get much more useful information.

Seems some OpenGL/EGL API call that is not expected to fail is failing and
then everything goes wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1969633</commentid>
    <comment_count>10</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-08-04 03:26:54 -0700</bug_when>
    <thetext>Committed 266576@main (87a213be3f95): &lt;https://commits.webkit.org/266576@main&gt;

Reviewed commits have been landed. Closing PR #16388 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1969634</commentid>
    <comment_count>11</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2023-08-04 03:31:37 -0700</bug_when>
    <thetext>(In reply to Carlos Alberto Lopez Perez from comment #9)
&gt; (In reply to Carlos Alberto Lopez Perez from comment #7)
&gt; &gt; (In reply to Philippe Normand from comment #6)
&gt; &gt; &gt; (In reply to Carlos Alberto Lopez Perez from comment #5)
&gt; &gt; &gt; &gt; So we need to update Mesa to 23.1.5 to fix this issue on the bots.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; 
&gt; &gt; &gt; I can submit a PR.
&gt; &gt; &gt; 
&gt; &gt; 
&gt; &gt; Great. I appreciate that. Thanks!
&gt; &gt; 
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; I didn&apos;t bothered to get a GDB back-trace but I can get one easily if you
&gt; &gt; &gt; &gt; think is useful, just let me know if you want it.
&gt; &gt; &gt; 
&gt; &gt; &gt; I was just asking out of curiosity.
&gt; &gt; 
&gt; &gt; Ok. Will try to get some backtrace.
&gt; 
&gt; 
&gt; I tried to debug this but is a bit complicated.
&gt; 
&gt; There isn&apos;t a crash as such.
&gt; 
&gt; And the issue is not on the WebProcess but on the UIProcess.
&gt; 
&gt; I can reproduce this both with WebKitTestRunner or with Cog.
&gt; 
&gt; On stderr you can see this:
&gt; 
&gt;   libEGL warning: failed to get driver name for fd 0
&gt;   libEGL warning: MESA-LOADER: failed to retrieve device information
&gt; 
&gt; But I couldn&apos;t get much more useful information.
&gt; 
&gt; Seems some OpenGL/EGL API call that is not expected to fail is failing and
&gt; then everything goes wrong.

Also the issue is much more easy to trigger if you run several WebKitTestRunners in parallel.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1969638</commentid>
    <comment_count>12</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2023-08-04 04:04:03 -0700</bug_when>
    <thetext>(In reply to Carlos Alberto Lopez Perez from comment #9)
&gt; On stderr you can see this:
&gt; 
&gt;   libEGL warning: failed to get driver name for fd 0
&gt;   libEGL warning: MESA-LOADER: failed to retrieve device information
&gt; 

Another important thing is that the log is also full of warnings like this:

EGLDisplay Initialization failed: EGL_NOT_INITIALIZED


But that warning (EGL_NOT_INITIALIZED) also happens with this new Mesa version that fixes the issue and was also happening before this regression. So it is not new.

Things work despite that EGL_NOT_INITIALIZED warning, but maybe we should look at it as it doesn&apos;t seem normal this warning.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>