[SRU] focal: gallium: Reset {d,r}Priv in dri_unbind_context

Bug #1950174 reported by Jean-Baptiste Lallement
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mesa (Ubuntu)
Undecided
Unassigned
Focal
High
Timo Aaltonen

Bug Description

[Description]
This is a request to backport this fix from mesa 21.1 to focal-updates which is affecting users of WSL:

https://gitlab.freedesktop.org/mesa/mesa/-/commit/7ff30a0499bd872d77b0f377414bbc03463b9f87

This cached stale pointer is causing various chromium applications (Edge, Chrome, Visual Studio Code, etc…) to hang on resize when vGPU is enabled in WSLg. We’re getting incredibly unlucky because a glx drawable is being freed and reallocated with exactly the same heap pointers during a resize, which is causing Mesa to think the new drawable is already fully initialized when binded to the context, but it is not true and only because the new drawable is matching the old stale pointer for the previously freed drawable… and as a result the context remain invalid and the app is unable to present.

With the push of WDDMv3 drivers which expose vGPU in WSL, the number of users hitting this issue is increasing.

[Test Case]
On Windows 11 with WSLg and Ubuntu 20.04

1. Verify that hardware acceleration is enable either with glxinfo -B or in edge with edge://gpu
2. Install and launch chrome, edge or vscode
3. Resize the windows repeatedly

Verification:
The app must not crash or hang.

[What could go wrong]

The patch resets two pointers to NULL in dri_unbind_context(), which is correct for that function and can't regress anything else.

description: updated
Changed in mesa (Ubuntu):
status: New → Fix Released
Changed in mesa (Ubuntu Focal):
status: New → Triaged
importance: Undecided → High
Changed in mesa (Ubuntu Focal):
assignee: nobody → Timo Aaltonen (tjaalton)
description: updated
description: updated
description: updated
Revision history for this message
Robie Basak (racb) wrote :

This SRU upload is missing SRU information. Please follow https://wiki.ubuntu.com/StableReleaseUpdates#Procedure. Thanks!

Changed in mesa (Ubuntu Focal):
status: Triaged → Incomplete
description: updated
Timo Aaltonen (tjaalton)
description: updated
Changed in mesa (Ubuntu Focal):
status: Incomplete → Triaged
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Jean-Baptiste, or anyone else affected,

Accepted mesa into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mesa/21.0.3-0ubuntu0.3~20.04.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in mesa (Ubuntu Focal):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Verification

Mesa 21.0.3-0ubuntu0.3~20.04.4 has been tested on 2 systems and it fixes the issue. Marking as verification-done.

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mesa - 21.0.3-0ubuntu0.3~20.04.4

---------------
mesa (21.0.3-0ubuntu0.3~20.04.4) focal; urgency=medium

  * gallium-Reset-d-r-Priv-in-dri_unbind_context.patch: Fix chromium
    hangs on WSL. (LP: #1950174)

 -- Timo Aaltonen <email address hidden> Wed, 10 Nov 2021 11:24:18 +0200

Changed in mesa (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Update Released

The verification of the Stable Release Update for mesa has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers