• Bug#1092890: mesa: regression in 24.3: software rendering crashes on pp

    From James Addison@21:1/5 to All on Wed Jan 29 02:50:01 2025
    Package: libglx-mesa0
    Followup-For: Bug #1092890
    X-Debbugs-Cc: mitya57@debian.org

    Dear Maintainer, Dmitry,

    This is conjecture, but I wondered whether an adjustment to the meson linkage options for libgallium_dri[1] around the same time (not contained in the same commit, but chronologically nearby) could be relevant. In particular, libdri moved into link_whole, although libswdri did not.

    (it may not matter at all; I've no idea why a change to that would only affect a single architecture, for example. but it's something I noticed while puzzling over possible causes, so I thought I'd mention it)

    Regards,
    James

    [1] - https://sources.debian.org/src/mesa/24.3.4-2/src/gallium/targets/dri/meson.build/?hl=60#L60

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dmitry Shachnev@21:1/5 to James Addison on Wed Jan 29 22:00:01 2025
    Hi James!

    On Wed, Jan 29, 2025 at 01:43:31AM +0000, James Addison wrote:
    Dear Maintainer, Dmitry,

    This is conjecture, but I wondered whether an adjustment to the meson linkage options for libgallium_dri[1] around the same time (not contained in the same commit, but chronologically nearby) could be relevant. In particular, libdri moved into link_whole, although libswdri did not.

    I tried moving libswdri to link_whole as well, but it did not change anything unfortunately. And reverting 212d57f7e6701a4f307c2c049a0e3eccfce58965 is not possible, because there are conflicts in all three files.

    In other news, I tried to use different linkers and linker options. With all linkers, it crashes, but in a bit different ways:

    - bfd (default): jump happens to stderr().

    - gold: jump happens to some incorrect place in libgallium-24.3.4.so:
    https://paste.debian.net/1347044/
    https://paste.debian.net/1347045/

    - lld: jump happens to 0x0.

    - bfd with -Wl,-z,now: *** stack smashing detected *** but in the same
    location, when attempting to do driSwapBuffers(pdraw->dri_drawable).

    Also I tried a different compiler (clang), and did not notice any difference compared to gcc.

    In case someone else wants to take a look at this, here is how I test it:

    1. Clone upstream repo and enter the directory:
    $ git clone --depth 1 https://gitlab.freedesktop.org/mesa/mesa.git -b 24.3
    $ cd mesa

    2. Configure mesa (see [1] on details how to pass a different compiler or options):
    $ meson setup build

    3. Build mesa (pass -v to see full command lines):
    $ ninja -C build

    4. Install mesa locally:
    $ meson install -C build --destdir=~/mesa-install

    5. Get qtlocation package source:
    $ cd ~
    $ dget -ux https://deb.debian.org/debian/pool/main/q/qtlocation-opensource-src/qtlocation-opensource-src_5.15.15+dfsg-3.dsc

    6. Run the build until it fails:
    $ cd qtlocation-opensource-src-5.15.15+dfsg
    $ dpkg-buildpackage -jauto

    7. Enter the test directory:
    $ cd tests/auto/declarative_ui

    8. Set LD_LIBRARY_PATH environment variable:
    $ export LD_LIBRARY_PATH=~/qtlocation-opensource-src-5.15.15+dfsg/lib:~/mesa-install/usr/local/lib/powerpc64le-linux-gnu

    9. Enter Xvfb environment:
    $ xvfb-run -a -s "-screen 0 1024x768x24 +extension RANDR +extension RENDER +extension GLX" bash

    10. Run the test:
    $ ./tst_declarative_ui -import ~/qtlocation-opensource-src-5.15.15+dfsg/qml

    Steps 5 and 6 can be done once, no need to repeat them between tests.

    [1]: https://docs.mesa3d.org/meson.html#compiler-options

    --
    Dmitry Shachnev

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEq2sdvrA0LydXHe1qsmYUtFL0RrYFAmealYYACgkQsmYUtFL0 Rras3A/9F6gTF3kz9ob2jntxbRGpRY6P5gV5U657VKXtiAkEqJ1so4GRbOP2j+SL 1CraRj2R/mlQI7QqM3unTH3vvTM+7rJm7+VS+IF9+ocHPn8B5tN7iXwn/Pbykhe6 T5Og7CTjzHoheMy/AQ1UYoJa2hzaYeOuQbI2bvsiR5Usm7jVPdF/zE0q7D1gWEK5 39Vo+WWOk7FD7cooRDcrnHrwBeRWsdiHgU3enarcXXXQZnZsxyRuU1gtxDTVC6ql Ui9t92KHdhmXWK5tOYFxGsWSZsl4f7YUuGdG0Jja5q9ZUaElZL9iVYASk9kNd8ju j1fhTnNl+7qWccbNOqM+MDFyT4qbPrev59wDSVo/OOyLGmTUPSDCFuNUfb0yTnKQ 9mIR/CVIxc5dHt1gWhtajRvmVsUV9CozvCu2kAoklJr02O3R0sP1SaGuAGZJKjkx 8et3V81WcKB4QA9WVo+eIJ2GvPvGPBtlU1nDMP3lRiVq6yEPzsMEFodWNBomkWnD KBXFjqqsTcjeZ/JZzxYHgE/5dL5pUdtmymiNaeSufeT8++OnJ/mu4AslYJmB//Ye IC4kwgCluGmiXrZBYXAMJesDWbgYNTWe5f+G6Bj0jFJENO4bu5RGdBG+LYPtJnOF QCURhCFXcyt8jWI97kyAF5MdijDQ/OVlN3wXKXAbdXYdQ87lXuw=
    =qD/S
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dmitry Shachnev@21:1/5 to Dmitry Shachnev on Sun Feb 2 16:10:01 2025
    On Wed, Jan 29, 2025 at 11:54:34PM +0300, Dmitry Shachnev wrote:
    In other news, I tried to use different linkers and linker options. With all linkers, it crashes, but in a bit different ways:

    - bfd (default): jump happens to stderr().

    - gold: jump happens to some incorrect place in libgallium-24.3.4.so:
    https://paste.debian.net/1347044/
    https://paste.debian.net/1347045/

    - lld: jump happens to 0x0.

    - bfd with -Wl,-z,now: *** stack smashing detected *** but in the same
    location, when attempting to do driSwapBuffers(pdraw->dri_drawable).

    Also I tried a different compiler (clang), and did not notice any difference compared to gcc.

    In case someone else wants to take a look at this, here is how I test it: [...]

    First, I found an easier way to reproduce this issue. Installing mesa-utils package and running "xvfb-run -a glxgears" is enough to trigger it.

    Second, I noticed that building without -DUSE_PPC64LE_ASM makes the issue
    go away. Maybe there is some problem with the assembly (entry_ppc64le_tls.h) but I can’t say what exactly. Anyway, I submitted a merge request to disable assembly for now: https://salsa.debian.org/xorg-team/lib/mesa/-/merge_requests/52

    Dear Debian powerpc porters, if someone has an idea what happens here and whether it can be fixed in a better way, any help would be welcome! Please see my previous comments on this bug for more details.

    --
    Dmitry Shachnev

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEq2sdvrA0LydXHe1qsmYUtFL0RrYFAmefiNYACgkQsmYUtFL0 RrYvuA/9GgS/4EQlPzhbgI5v2/UBEOBEH8UA68Cy3o2NplWNsyjVtuJKb99RFp4c 8uhC1HChFDZ+LWOrWAcHFtV4d0vtPkOc/DGwfuJ1XMoIQljdjoQcC0K3g03upthW 9RdcbRJhdmGebcqI35OZcug4jKl1SOhu8wYowAHZMEjf07rxFHLGiqqXasIgvyk/ XLJHClil8NSTZyVeYSuXvzM10zDPFH9KOnq/XKT6iwA1aj8ycJel/Zr8gNV6gZpp udukR2r+yc2/sB1v8RnHpwAAA0wMWer1jfd0rCEJUdCChknUOLDfWBZUW5GkSYSE eXnmsVNctBRYy/4+WLmGGIpmCPKFPn1YR3SJVMp8quRp0A2eoiCMFj0tkJmcFsgJ HC2OXyXLGQDgL/4zUzz7DqcWwRYa45jnhbiMUDD5i6+/xLV9uTq9R7s0qttXdrp/ nd1mt0nfsO6edjMjrrSjE3pSZ8Bz2lAXGcrdY/RovjnVCsK012P+Cdvsh074Wp3K 4+1kwvk5s6PeheSa2JFHUu6JOflBGGMzSk+DUnpdJynK8EMsZy597Q7LLBD/PXR1 7QL/iVvRKhT7dWIBoYALPft2fjXPxpzqUOWQQqGnSsOk71hXdukbxFxZTtylPR3D ZYpFkRN+cu7pFbb/YmWZimmMs9iD6ixMnO9jBRp81jPWaaQBo+8=
    =BZo6
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)