GPU hangs in SketchUp on Intel gen12 due to outdated MESA library

Bug #2035360 reported by Daniel J Blueman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mesa
New
Unknown
chromium-browser (Ubuntu)
New
Undecided
Unassigned
firefox (Ubuntu)
New
Undecided
Unassigned

Bug Description

When opening a SketchUp model (example: https://app.sketchup.com/share/tc/europe/9jWfPS5lgN8?stoken=KYi8KrAR6g3gv6OqLAKNEEMrQHLOA7jd8oV20HmBbHrZqyPRPmG1QlPurYkJnuw_) in Firefox or Chromium, after ~5 seconds, the SketchUp logo freezes for ~4 seconds, and we see a blank page. The logs show the GPU hang and browser rendering context failed to initialise.

This has 100% reproducibility on my 12-gen GPU.

On this system with Ubuntu 23.04, I have always seen a GPU hang with the stock Ubuntu kernel or mainline.
Log files as attachment

- the output of 'dmesg' is at https://quora.org/OJnlVgn4xZ/dmesg.txt
- the output of 'dmesg' with kernel boot args 'drm.debug=0x1e log_buf_len=16M' is at https://quora.org/OJnlVgn4xZ/dmesg-debug.txt
- the output of /sys/class/drm/card0/error is at https://quora.org/OJnlVgn4xZ/i915-error.txt

Since I was able to cause failure uncontained to the rendering process when performing this 5-8 times, there is an argument that this is a security (DoS) issue, though I'll let someone else make a judgement.

Revision history for this message
Daniel J Blueman (watchmaker) wrote :

System:
  Host: spectre Kernel: 6.2.0-32-generic arch: x86_64 bits: 64
    compiler: N/A Desktop: GNOME v: 44.3 tk: GTK v: 3.24.37 wm: gnome-shell
    dm: GDM3 Distro: Ubuntu 23.04 (Lunar Lobster)
CPU:
  Info: 9-core model: 12th Gen Intel Core i7-1260P bits: 64 type: MCP
    smt: disabled arch: Alder Lake rev: 3 cache: L1: 848 KiB L2: 5.2 MiB
    L3: 18 MiB
  Speed (MHz): avg: 2303 high: 2500 min/max: 400/4700:3400 cores: 1: 2500
    2: 2500 3: 2500 4: 2500 5: 729 6: 2500 7: 2500 8: 2500 9: 2500
    bogomips: 44928
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel Alder Lake-P Integrated Graphics vendor: Hewlett-Packard
    driver: i915 v: kernel arch: Gen-12.2 ports: active: eDP-1 empty: DP-1,
    DP-2, DP-3, DP-4, DP-5 bus-ID: 00:02.0 chip-ID: 8086:46a6
  Device-2: Intel DG2 [Arc A370M] vendor: Hewlett-Packard driver: vfio-pci
    v: N/A arch: Gen-12.7 pcie: speed: 2.5 GT/s lanes: 1 bus-ID: 03:00.0
    chip-ID: 8086:5693
  Display: wayland server: X.org v: 1.21.1.7 with: Xwayland v: 22.1.8
    compositor: gnome-shell driver: X: loaded: N/A
    unloaded: fbdev,modesetting,vesa gpu: i915 display-ID: 0
  Monitor-1: eDP-1 model: Samsung 0x4174 res: 3840x2400 dpi: 284
    diag: 406mm (16")
  API: OpenGL v: 4.6 Mesa 23.0.4-0ubuntu1~23.04.1 renderer: Mesa Intel
    Graphics (ADL GT2) direct-render: Yes

Revision history for this message
Daniel J Blueman (watchmaker) wrote :

In order to test if the system MESA has the fix while the Chromium snaps does not, I unpacked it and ran the Chromium binary against system libraries.

The GPU hang doesn't reproduce, suggesting the MESA libraries included in the Snaps is outdated and should be updated to eg 23.0.4-0ubuntu1~23.04.1.

Revision history for this message
Daniel J Blueman (watchmaker) wrote :

My original MESA bug report (now closed) is at: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9695

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Thanks, it seems you already pinned down the issue, I'll investigate how to get the newer Mesa in (I think that's provided by a gnome-* snap) and all the following is just for completeness.

Can you attach the following information?

--->
snap info chromium firefox
snap connections chromium
snap connections firefox
<---

> In order to test if the system MESA has the fix while the Chromium snaps does not, I unpacked it and ran the Chromium binary against system libraries.

In general, for testing purposes you can run the unconfined binary directly by calling /snap/chromium/current/usr/lib/chromium-browser/chrome or /snap/firefox/current/usr/lib/firefox/firefox.

You can also verify if an issue is related to hardware acceleration by passing --disable-gpu.

affects: firefox → mesa
description: updated
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Asked about the possibility of a rebuild at https://github.com/ubuntu/gnome-sdk/issues/167.

Changed in mesa:
status: Unknown → New
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

The Gnome snap has been built with a newer Mesa.

Could you try

  snap refresh --candidate gnome-42-2204

and then start the browser? Does the issue go away?

Changed in chromium-browser (Ubuntu):
status: New → Fix Committed
Changed in firefox (Ubuntu):
status: New → Fix Committed
Revision history for this message
Daniel J Blueman (watchmaker) wrote :

Thanks for the updates Nathan.

As previously stated, running the unconfined binary /snap/chromium/current/usr/lib/chromium-browser/chrome or /snap/firefox/current/usr/lib/firefox/firefox prevents the GPU hang, ie using the system MESA library. Also disabling GPU acceleration via MESA environment variables confirms the hang is indeed related to GPU command queue submission from the MESA library.

The GPU hang still occurs after "snap refresh --candidate gnome-42-2204" and rebooting to clear possible state, however I see /snap/chromium/2623/usr/lib/chromium-browser/libGLESv2.so, therefore surely the chromium snap needs the updated MESA library?

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Sorry, I hadn't seen you already had done those tests in the linked bug report.

> the chromium snap needs the updated MESA library

It uses the one gnome-42-2204 exposes. If migrating to candidate didn't help, then the problem should be something else.

Changed in chromium-browser (Ubuntu):
status: Fix Committed → New
Changed in firefox (Ubuntu):
status: Fix Committed → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.