Bug 2294145

Summary: mesa 24.1.x broke xvfb opengl
Product: [Fedora] Fedora Reporter: Dmitri A. Sergatskov <dasergatskov>
Component: mesaAssignee: José Expósito <jexposit>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 40CC: ajax, bskeggs, igor.raits, jexposit, j, lyude, rhughes, rstrode, suraj.ghimire7, tstellar, walter.pete
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
URL: https://buildbot.octave.org/#/builders/21/builds/1109/steps/6/logs/stdio
Whiteboard:
Fixed In Version: mesa-24.1.2-8.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-07-13 02:46:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
those are bad.svg and good.svg produced on Centos Stream 9
none
those are bad.svg and good.svg produced on Centos Stream 9 none

Description Dmitri A. Sergatskov 2024-06-25 03:50:08 UTC
Octave buildbots (running on fedora host) are using Xvfb for headless printing of opengl figures. After up date to mesa 24.1.x this broke. Octave uses "gl2ps" library to convert opengl figures to pdf/postscript/svg. By inspecting those files one can see a number of "NaNs" where some numbers suppose to be.    

Reproducible: Always

Steps to Reproduce:
1.Run octave in Xvfb buffer: "xvfb-run octave"
2.At the octave prompt execute:
  octave:1> plot(1:3)
  octave:2> print bad.svg
3. For the reference, repeat the same with a "normal" octave session. Start octave and then do 
octave:1> plot(1:3)
octave:2> print good.svg

Actual Results:  
In the bad.svg one can see lines like:
<polyline fill="none" points="-nan,-nan -nan,-nan" stroke="#262626" stroke-dasharray="16,0" stroke-linecap="square" stroke-linejoin="miter" stroke-width="1"/>
<polyline fill="none" points="-nan,-nan -nan,-nan" stroke="#262626" stroke-dasharray="16,0" stroke-linecap="square" stroke-linejoin="miter" stroke-width="1"/>
<polyline fill="none" points="-nan,-nan -nan,-nan" stroke="#262626" stroke-dasharray="16,0" stroke-linecap="square" stroke-linejoin="miter" stroke-width="1"/>
<polyline fill="none" points="-nan,-nan -nan,-nan" stroke="#262626" stroke-dasharray="16,0" stroke-linecap="square" stroke-linejoin="miter" stroke-width="1"/>


Expected Results:  
In a good.svg the corresponding lines are 
<polyline fill="none" points="54.6167,280.435 380.215,280.435" stroke="#262626" stroke-dasharray="16,0" stroke-linecap="square" stroke-linejoin="miter" stroke-width="1"/>
<polyline fill="none" points="54.6167,23.6323 380.215,23.6323" stroke="#262626" stroke-dasharray="16,0" stroke-linecap="square" stroke-linejoin="miter" stroke-width="1"/>
<polyline fill="none" points="54.6167,280.435 54.6167,23.6323" stroke="#262626" stroke-dasharray="16,0" stroke-linecap="square" stroke-linejoin="miter" stroke-width="1"/>
<polyline fill="none" points="380.215,280.435 380.215,23.6323" stroke="#262626" stroke-dasharray="16,0" stroke-linecap="square" stroke-linejoin="miter" stroke-width="1"/>


The problem is reproduced on Fedora 40 with 24.1.1 and 24.1.2 and on Centos Stream 9 with 24.1.0. Try different video card (AMD, Intel, Nvidia with both free and proprietary drivers).

Comment 1 Dmitri A. Sergatskov 2024-06-25 03:51:38 UTC
Created attachment 2038201 [details]
those are bad.svg and good.svg produced on Centos Stream 9

Comment 2 Dmitri A. Sergatskov 2024-06-25 03:52:08 UTC
Created attachment 2038202 [details]
those are bad.svg and good.svg produced on Centos Stream 9

Comment 3 José Expósito 2024-07-01 16:45:53 UTC
Hi @dasergatskov

Are you still able to reproduce this issue in Fedora with the latest mesa? (mesa-24.1.2-7.fc40)

I'm not able to reproduce it, but I'm not sure whether it is because the issue is fixed or because it depends on the hardware used.

Comment 4 Dmitri A. Sergatskov 2024-07-01 18:49:49 UTC
Yes, I still have a problem with mesa-24.1.2-7.fc40.
I played a little bit and now I think the issue is with llvmpipe driver. 
I see the problem if I start octave as:
$ LIBGL_ALWAYS_SOFTWARE=1 octave
That will set renderer to llvmpipe (one can verify that by running "__opengl_info__.renderer" in octave).
The same renderer is used when octave is run in Xvfb environment.

Dmitri.
--

Comment 5 José Expósito 2024-07-02 15:56:50 UTC
Bisected and reported upstream:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/11445

Comment 6 Fedora Update System 2024-07-12 09:47:01 UTC
FEDORA-2024-e4651140c2 (mesa-24.1.2-8.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-e4651140c2

Comment 7 José Expósito 2024-07-12 09:48:26 UTC
Hi @dasergatskov

I backported the fix for your issue, please test this version of mesa and confirm if it is solved for you:
https://bodhi.fedoraproject.org/updates/FEDORA-2024-e4651140c2

Comment 8 Dmitri A. Sergatskov 2024-07-12 13:44:48 UTC
Seems to work for me. Please build one for Centos Stream as well.

Comment 9 Fedora Update System 2024-07-13 02:46:29 UTC
FEDORA-2024-e4651140c2 (mesa-24.1.2-8.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.