Bug 1692426 - Mesa packages contain debug builds
Summary: Mesa packages contain debug builds
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mesa
Version: 29
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Adam Jackson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-25 15:25 UTC by Alex Smith
Modified: 2019-04-08 13:02 UTC (History)
16 users (show)

Fixed In Version: mesa-18.3.5-2.fc29 mesa-19.0.0-2.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-27 20:24:25 UTC


Attachments (Terms of Use)

Description Alex Smith 2019-03-25 15:25:07 UTC
Description of problem:
The current Mesa packages provided in Fedora 29 (18.3.4-1.fc29) contain a debug Mesa build.

This means that the build includes a lot of extra performance-impacting debug assertions and validation. In particular, it includes extra shader validation at pipeline creation time in RADV, which leads to extremely long loading times in Vulkan games.

https://bugs.freedesktop.org/show_bug.cgi?id=109939 - this Mesa bug report has a comment from a user reporting long loading times in Rise of the Tomb Raider on Fedora, and I am able to reproduce the same on the current Fedora 29 packages (takes 20 minutes to load the largest level in the game compared to 2 minutes on a release build that I have done myself).

From looking at the spec file (https://src.fedoraproject.org/rpms/mesa/blob/8410b5cfd86eda6e01fc435a9088401a3e9f17c0/f/mesa.spec), the buildtype option isn't being passed to meson - the default without this is debugoptimized (compiled with optimization but includes asserts/validation/etc). -Dbuildtype=release is needed for a release build.

Spec file in current master also has the same problem so presumably rawhide is affected too.


Version-Release number of selected component (if applicable): 18.3.4-1.fc29

Comment 1 Igor Gnatenko 2019-03-25 15:26:20 UTC
We use buildtype=plain which is intended to be used in distributions. Please open upstream issue (for mesa) if that is causing problems.

Comment 2 Alex Smith 2019-03-25 15:38:56 UTC
I don't see how it's not your bug that right now you are currently shipping a package that causes severe issues for users?

The documentation for buildtype=plain says "no extra build flags are used, even for compiler warnings, useful for distro packagers and other cases where you need to specify all arguments by yourself". "need to specify all arguments by yourself" - you are not specifying -DNDEBUG, if upstream were to add it in that case it would be going against the specified behaviour of plain?

Comment 3 Alex Smith 2019-03-25 15:49:06 UTC
I think you need to add -Db_ndebug=true.

Comment 4 Fedora Update System 2019-03-25 17:00:26 UTC
meson-0.50.0-2.fc29 mesa-18.3.5-2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-2bd5988554

Comment 5 Fedora Update System 2019-03-25 17:00:36 UTC
meson-0.50.0-2.fc30 mesa-19.0.0-2.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-adc3f3e82e

Comment 6 Fedora Update System 2019-03-25 18:54:54 UTC
mesa-19.0.0-2.fc30, meson-0.50.0-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-adc3f3e82e

Comment 8 Fedora Update System 2019-03-27 04:34:12 UTC
mesa-18.3.5-2.fc29, meson-0.50.0-2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-2bd5988554

Comment 9 Alex Smith 2019-03-27 09:43:36 UTC
Tested mesa-18.3.5-2.fc29 and can confirm that it is no longer a debug build, and solves the issue with long load times in Rise of the Tomb Raider. Thanks.

Comment 10 Fedora Update System 2019-03-27 20:24:25 UTC
mesa-18.3.5-2.fc29, meson-0.50.0-2.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2019-03-29 19:20:40 UTC
mesa-19.0.0-2.fc30, meson-0.50.0-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Peter Hutterer 2019-04-08 06:58:05 UTC
This change is causing packages that rely on assert() to break, see e.g. bug 1696264.

Any reason you can't just add -Db_ndebug to the mesa build, instead of changing the behaviour of the build system?

Comment 13 Michael Catanzaro 2019-04-08 13:02:20 UTC
Traditionally, some packages expect to be compiled with NDEBUG and others simply don't. It's kinda expected that this change will break packages that haven't tested release builds. Keep in mind this is just making plain builds (distro builds) more similar to release builds.


Note You need to log in before you can comment on or make changes to this bug.