Bug 1219095 - python-matplotlib:test FTBFS with Mesa 23.3.0
Summary: python-matplotlib:test FTBFS with Mesa 23.3.0
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Python (show other bugs)
Version: Current
Hardware: Other Other
: P2 - High : Major (vote)
Target Milestone: ---
Assignee: Stefan Dirsch
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-23 13:21 UTC by Ana Guerrero
Modified: 2024-03-26 11:00 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
python-matplotlib:test (3.11 MB, text/plain)
2024-01-23 13:21 UTC, Ana Guerrero
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ana Guerrero 2024-01-23 13:21:50 UTC
Created attachment 872100 [details]
python-matplotlib:test

An update of Mesa  23.3.0+ ( https://build.opensuse.org/request/show/1140618 ) is making python-matplotlib:test FTBFS. More precisely one test is failing:

[  318s] =================================== FAILURES ===================================
[  318s] ___________________________ test_openin_any_paranoid ___________________________
[  318s] [gw2] linux -- Python 3.9.18 /usr/bin/python3.9
[  318s] 
[  318s]     @needs_usetex
[  318s]     def test_openin_any_paranoid():
[  318s]         completed = subprocess.run(
[  318s]             [sys.executable, "-c",
[  318s]              'import matplotlib.pyplot as plt;'
[  318s]              'plt.rcParams.update({"text.usetex": True});'
[  318s]              'plt.title("paranoid");'
[  318s]              'plt.show(block=False);'],
[  318s]             env={**os.environ, 'openin_any': 'p'}, check=True, capture_output=True)
[  318s] >       assert completed.stderr == b""
[  318s] E       AssertionError: assert b'MESA: error: ZINK: vkCreateInstance failed (VK_ERROR_INCOMPATIBLE_DRIVER)\nglx: failed to create drisw screen\nfailed to load driver: zink\n' == b''
[  318s] E         Full diff:
[  318s] E         - b''
[  318s] E         + (
[  318s] E         +  b'MESA: error: ZINK: vkCreateInstance failed (VK_ERROR_INCOMPATIBLE_DRIVER'
[  318s] E         +  b')\nglx: failed to create drisw screen\nfailed to load driver: zink\n',
[  318s] E         + )
[  318s] 
[  318s] /usr/lib64/python3.9/site-packages/matplotlib/tests/test_texmanager.py:74: AssertionError

Please find the full log attached.
Comment 3 Stefan Dirsch 2024-01-23 14:55:05 UTC
Ok. Adding packages

libvulkan_lvp
Mesa-vulkan-device-select
Mesa-vulkan-overlay

doesn't help. Even removing zink_dri.so from  /usr/lib64/dri/doesn't during build before the test runs does not.

[...]
[  199s] >       assert completed.stderr == b""
[  199s] E       AssertionError: assert b'MESA-LOADER: failed to open zink: /usr/lib64/dri/zink_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri, suffix _dri)\nfailed to load driver: zink\n' == b''
[...]

For some reason Mesa thinks it wants to load zink driver. And fails, if this is not possible.
Comment 4 Stefan Dirsch 2024-01-23 15:36:25 UTC
When not removing the driver file

[  270s] >       assert completed.stderr == b""
[  270s] E       AssertionError: assert b'error: XDG_RUNTIME_DIR is invalid or not set in the environment.\nMESA: error: ZINK: failed to choose pdev\nglx: failed to create drisw screen\nfailed to load driver: zink\n' == b''
Comment 5 Stefan Dirsch 2024-01-23 16:44:24 UTC
Ok. I can reproduce these messages, but they are just warnings. The fallback to 'swrast' ("llvmpipe") driver just works. Actually you can already use

  D3D_ALWAYS_SOFTWARE=1 glxinfo

to use zink + software rendering

I suggest to make use of 

  LIBGL_ALWAYS_SOFTWARE=1 

environment variable. Hopefully eporting it works, I'm doing a testbuild of python-matplotlib:test  with that right now.
Comment 6 Stefan Dirsch 2024-01-23 16:45:36 UTC
(setting LIBGL_ALWAYS_SOFTWARE=1 forces Mesa to use 'swrast' ("llvmpipe") driver.)
Comment 7 Stefan Dirsch 2024-01-23 17:16:04 UTC
Seems to work. Submit requests here.

https://build.opensuse.org/request/show/1141029
https://build.opensuse.org/request/show/1141030

Closing.
Comment 8 Ana Guerrero 2024-01-23 18:24:56 UTC
Testing here:

https://build.opensuse.org/project/show/openSUSE:Factory:Staging:E
Comment 9 Stefan Dirsch 2024-01-24 09:10:15 UTC
(In reply to Ana Guerrero from comment #8)
> Testing here:
> 
> https://build.opensuse.org/project/show/openSUSE:Factory:Staging:E

Seems this was successful. :-)