RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1656926 - Crash while maximize X client window
Summary: Crash while maximize X client window
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: mutter
Version: 8.0
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: 8.0
Assignee: Jonas Ådahl
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: 1635157 1657660
TreeView+ depends on / blocked
 
Reported: 2018-12-06 16:42 UTC by Jiri Koten
Modified: 2019-06-14 01:03 UTC (History)
4 users (show)

Fixed In Version: mutter-3.28.3-9.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-14 01:03:26 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
session log (16.60 KB, text/plain)
2018-12-06 16:46 UTC, Jiri Koten
no flags Details
shaped-texture-get-image-via-offscreen.patch (28.71 KB, patch)
2018-12-19 12:16 UTC, Jonas Ådahl
no flags Details | Diff
shaped-texture-get-image-via-offscreen.patch (v2) (29.12 KB, patch)
2018-12-19 15:25 UTC, Jonas Ådahl
no flags Details | Diff
shaped-texture-get-image-via-offscreen.patch (v3) (39.97 KB, application/mbox)
2018-12-20 18:06 UTC, Jonas Ådahl
no flags Details
shaped-texture-get-image-via-offscreen.patch (v4) (39.99 KB, patch)
2019-01-07 09:47 UTC, Jonas Ådahl
no flags Details | Diff
shaped-texture-get-image-via-offscreen.patch (v5) (39.99 KB, patch)
2019-01-11 15:15 UTC, Jonas Ådahl
no flags Details | Diff

Description Jiri Koten 2018-12-06 16:42:43 UTC
Description of problem:
Running Wayland with nvidia binary drivers and maximizing X client window, e.g. Firefox window, results in gnome-shell crash.

Wayland clients are fine and it's probably related to EGLStreams. We don't see such a problem with other drivers.


Version-Release number of selected component (if applicable):
mutter-3.28.3-5.el8
kernel-4.18.0-48.el8
nvidia drivers 410.78

How reproducible:
100%

Steps to Reproduce:
1. Disable the gdm udev rule for nvidia
2. enable nvidia modeset
3. Login to session
4. Open Firefox or other X client
5. Maximize the window 

Actual results:
Crash

Expected results:
No crash

Additional info:

Comment 1 Jiri Koten 2018-12-06 16:46:35 UTC
Created attachment 1512195 [details]
session log

Cogl:ERROR:driver/gl/gl/cogl-driver-gl.c:284:_cogl_driver_pixel_format_to_gl_with_target: code should not be reached

Comment 2 Jonas Ådahl 2018-12-17 17:49:47 UTC
Seems to be a problem with reading pixels from the EGLStream texture. Adding

diff --git a/cogl/cogl/driver/gl/cogl-texture-2d-gl.c b/cogl/cogl/driver/gl/cogl-texture-2d-gl.c
index d1eff4507..53be13216 100644
--- a/cogl/cogl/driver/gl/cogl-texture-2d-gl.c
+++ b/cogl/cogl/driver/gl/cogl-texture-2d-gl.c
@@ -470,7 +470,12 @@ allocate_custom_egl_image_external (CoglTexture2D *tex_2d,
 {
   CoglTexture *tex = COGL_TEXTURE (tex_2d);
   CoglContext *ctx = tex->context;
-  CoglPixelFormat internal_format = loader->src.egl_image_external.format;
+  CoglPixelFormat external_format;
+  CoglPixelFormat internal_format;
+
+  external_format = loader->src.egl_image_external.format;
+  internal_format = _cogl_texture_determine_internal_format (tex,
+                                                             external_format);
 
   _cogl_gl_util_clear_gl_errors (ctx);
 
avoids the crash, but the path that is fixed (meta_shaped_texture_get_image()) which provides the pixels used for e.g. maximize animation now results in garbage.

Comment 3 Jonas Ådahl 2018-12-19 12:16:47 UTC
Created attachment 1515580 [details]
shaped-texture-get-image-via-offscreen.patch

Attaching patch that should fix the issue.

Comment 4 Jonas Ådahl 2018-12-19 15:25:09 UTC
Created attachment 1515623 [details]
shaped-texture-get-image-via-offscreen.patch (v2)

Attached new version of the patch, as the old one had an issue with subtextures.

Comment 5 Jonas Ådahl 2018-12-20 07:51:01 UTC
Scratch-build repo available here: http://brew-task-repos.usersys.redhat.com/repos/scratch/jadahl/mutter/3.28.3/6.el8/

Comment 6 Jonas Ådahl 2018-12-20 18:06:19 UTC
Created attachment 1515943 [details]
shaped-texture-get-image-via-offscreen.patch (v3)

After feedback from testers upstream a couple of issues were discovered. Those should be addressed by the latest revision of the patch.

Comment 8 Jonas Ådahl 2019-01-07 09:47:34 UTC
Created attachment 1518939 [details]
shaped-texture-get-image-via-offscreen.patch (v4)

Updated patch to handle the texture tower failing better.

Comment 11 Jonas Ådahl 2019-01-11 15:15:23 UTC
Created attachment 1520048 [details]
shaped-texture-get-image-via-offscreen.patch (v5)

Updated patch. The old one was missing a ` = NULL;` in one place.

Comment 13 Jiri Koten 2019-02-12 13:17:12 UTC
Verified in mutter-3.28.3-17.el8

kernel-4.18.0-67.el8
NVidia 410.93


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