#1010838 Mesa 22.x regression on mipsel: GTK4 test segfaults with llvmpipe

Package:
libgl1-mesa-dri
Source:
mesa
Description:
free implementation of the OpenGL API -- DRI modules
Submitter:
Simon McVittie
Date:
2026-01-10 11:40:06 UTC
Severity:
important
Tags:
#1010838#5
Date:
2022-05-11 09:08:43 UTC
From:
To:
Source: gtk4
Version: 4.6.3+ds1-1
Severity: serious
Tags: ftbfs
Justification: fails to build from source (but built successfully in the past)
X-Debbugs-Cc: debian-mips@lists.debian.org
User: debian-mips@lists.debian.org
Usertags: mipsel
Control: block 1010813 by -1

During GTK 4's test suite, it carries out the drawing operations described
in testsuite/gsk/compare/rounded-clip-in-clip-3d.node, expecting the result
to match testsuite/gsk/compare/rounded-clip-in-clip-3d.png. On the mipsel
buildds, instead this resulted in a segfault.

This appears to be a regression in 4.6.3, or a regression in some
dependency (perhaps Mesa?) that changed at around the same time we
uploaded 4.6.3. I'm setting up a chroot on the porterbox 'eller' to see
whether I can get a backtrace for this.

I don't know what implications (if any) this has for practical usability
of GTK 4 applications on mipsel.

See also #993550, #1003348 which are other mips*el-specific issues in GTK4
(although they are not crashes, and they affect mips64el, which this one
does not).

    smcv

#1010838#12
Date:
2022-05-14 16:04:29 UTC
From:
To:
Control: retitle -1 Mesa 22.x regression on mipsel: GTK4 test segfaults with llvmpipe
Control: reassign -1 libgl1-mesa-dri 22.0.3-1
Control: severity -1 important
Control: affects -1 src:gtk4
not a regression in the new GTK version. Instead, it looks like a
regression in related packages, most likely in the transition to Mesa 22
or LLVM 14.

I can reproduce this without building GTK, by using the installed-tests
in the gtk-4-tests package.

Enter a mipsel chroot on eller:

    schroot -n ${USER}-bug1010838 -c sid_mipsel-dchroot --begin
    dd-schroot-cmd -c ${USER}-bug1010838 apt-get -y update
    dd-schroot-cmd -c ${USER}-bug1010838 apt-get -y dist-upgrade
    dd-schroot-cmd -c ${USER}-bug1010838 apt-get -y install gdb gtk-4-tests xauth xvfb
    schroot -c ${USER}-bug1010838 -r

Get GTK 4 source code and cd into it (no need to compile or patch, you
just need the test data files). Then the reproducer for the segfault is:

xvfb-run -a \
/usr/libexec/installed-tests/gtk-4.0/gsk/compare-render \
    --output ~ \
    testsuite/gsk/compare/rounded-clip-in-clip-3d.node \
    testsuite/gsk/compare/rounded-clip-in-clip-3d.png

Expected result: GTK renders the node, writes it to
~/rounded-clip-in-clip-3d.out.png and compares it with the reference
PNG. Ideally it should exit with status 0. If there is a rendering
difference, it writes an exaggerated version of the difference into
~/rounded-clip-in-clip-3d.diff.png and exits with status 1.

Actual result: compare-render segfaults (for this specific .node file,
others work OK). Unfortunately the backtrace from the segfault doesn't
seem to be useful (presumably it's in generated code), but I've captured
it into gdb.txt in case it's useful.

This test works OK in a bookworm chroot (see attached good.txt for the
exact package list), and fails in a sid chroot (see bad.txt).

Workaround: any of the following environment variables avoids the crash:

- GSK_RENDERER=cairo
  (avoids GTK's GL renderer and falls back to Cairo; the scene is
  misrendered and the test fails, but it doesn't crash)
- GALLIUM_DRIVER=softpipe
  (the test passes)
- LIBGL_ALWAYS_INDIRECT=true
  (the scene is misrendered and the test fails, but it doesn't crash)

Mesa-related information from

    xvfb-run -a reportbug --template libgl1-mesa-dri

also attached, as reportbug.txt.

    smcv

#1010838#33
Date:
2026-01-10 10:08:19 UTC
From:
To:
Es gibt eine Familienspende in Höhe von 1.850.000,00 USD von Cheng Charlie
Saephan. Bitte antworten Sie für weitere Informationen. Denken Sie daran,
Ihrer Familie und den Bedürftigen in Ihrer Umgebung Gutes zu tun.

Dies ist bereits der zweite Versuch, Sie zu erreichen. Bitte antworten Sie
für weitere Details.

#1010838#38
Date:
2026-01-10 10:08:19 UTC
From:
To:
Es gibt eine Familienspende in Höhe von 1.850.000,00 USD von Cheng Charlie
Saephan. Bitte antworten Sie für weitere Informationen. Denken Sie daran,
Ihrer Familie und den Bedürftigen in Ihrer Umgebung Gutes zu tun.

Dies ist bereits der zweite Versuch, Sie zu erreichen. Bitte antworten Sie
für weitere Details.