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 1846191 - usb adapters hotplug crashes gnome-shell
Summary: usb adapters hotplug crashes gnome-shell
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: mutter
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Jonas Ådahl
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-11 03:13 UTC by Dave Airlie
Modified: 2020-11-04 01:37 UTC (History)
4 users (show)

Fixed In Version: mutter-3.32.2-45.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 01:35:45 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:4451 0 None None None 2020-11-04 01:36:01 UTC

Description Dave Airlie 2020-06-11 03:13:47 UTC
I had a RHEL7 bug filed and I wanted to test RHEL 8. I'm running 8.3 nightly.

I plug in the USB device, and it shows up, I have trouble getting the control center to apply changes to switch to dual screen.

When I unplug the device it looks like mutter doesn't notice.

When I plug it in again it looks like mutter crashes.

Comment 1 Dave Airlie 2020-06-11 03:14:55 UTC
this is in wayland session.

Comment 2 Dave Airlie 2020-06-15 04:24:54 UTC
Thread 1 "gnome-shell" received signal SIGSEGV, Segmentation fault.
0x00007f7acb71ebab in meta_gpu_get_outputs (gpu=gpu@entry=0x35) at ../src/backends/meta-gpu.c:111
111	  return priv->outputs;
(gdb) bt
#0  0x00007f7acb71ebab in meta_gpu_get_outputs (gpu=gpu@entry=0x35) at ../src/backends/meta-gpu.c:111
#1  0x00007f7acb7d6115 in get_crtc_drm_connectors (gpu=0x35, crtc=crtc@entry=0x7f7a98008770, connectors=connectors@entry=0x7ffdf0ed2790, n_connectors=n_connectors@entry=0x7ffdf0ed278c)
    at ../src/backends/native/meta-gpu-kms.c:119
#2  0x00007f7acb7d6501 in meta_gpu_kms_apply_crtc_mode (gpu_kms=gpu_kms@entry=0x55d85a380340, crtc=0x7f7a98008770, x=x@entry=0, y=y@entry=0, fb_id=fb_id@entry=0)
    at ../src/backends/native/meta-gpu-kms.c:151
#3  0x00007f7acb7e0042 in meta_renderer_native_finish_frame (renderer_native=0x55d8571c7eb0) at ../src/backends/native/meta-renderer-native.c:3640
#4  0x00007f7acbf95dda in clutter_stage_cogl_redraw (stage_window=0x55d857622190) at ../clutter/clutter/cogl/clutter-stage-cogl.c:938
#5  0x00007f7acbf54a0e in _clutter_stage_do_update (stage=<optimized out>) at ../clutter/clutter/clutter-stage.c:1127
#6  0x00007f7acbf3e1e9 in master_clock_update_stages (master_clock=0x55d857643e40, stages=0x55d859284a70 = {...}) at ../clutter/clutter/clutter-master-clock-default.c:442
#7  0x00007f7acbf3e1e9 in clutter_clock_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at ../clutter/clutter/clutter-master-clock-default.c:568
#8  0x00007f7acd2d267d in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#9  0x00007f7acd2d2a48 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#10 0x00007f7acd2d2d72 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#11 0x00007f7acb767e30 in meta_run () at ../src/core/main.c:685
#12 0x000055d855872576 in main ()
(gdb) print priv
$1 = (MetaGpuPrivate *) 0x15
(gdb) up
#1  0x00007f7acb7d6115 in get_crtc_drm_connectors (gpu=0x35, crtc=crtc@entry=0x7f7a98008770, connectors=connectors@entry=0x7ffdf0ed2790, n_connectors=n_connectors@entry=0x7ffdf0ed278c)
    at ../src/backends/native/meta-gpu-kms.c:119
119	  for (l = meta_gpu_get_outputs (gpu); l; l = l->next)
(gdb) print gpu
$2 = 0x35

Comment 3 Dave Airlie 2020-06-15 04:38:01 UTC
okay looks like we have to get some backporting done 

f3660dc60e76b13e35f361a1ea6816f8b0af66d8
Author: Hans de Goede <hdegoede>
Date:   Mon Aug 5 14:08:08 2019 +0200

    kms: Deal with GPUs being unplugged


would seem necessary.

Comment 5 Jonas Ådahl 2020-06-25 08:20:55 UTC
Backporting is not feasable, so I attempted to in the dark write something similar that might fix it. Created a scratch build for it here:

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=29679293

Comment 6 Dave Airlie 2020-06-29 18:40:23 UTC
I'd did a couple of hotplug cycles, and it doesn't crash anymore, and seems to work.

One thing is I'm not sure if disconnects are being signalled/processed properly, since xrandr still shows two outputs when I unplug, but this isn't as urgent at the crashing was.

Comment 7 Jonas Ådahl 2020-06-29 18:49:45 UTC
(In reply to Dave Airlie from comment #6)
> I'd did a couple of hotplug cycles, and it doesn't crash anymore, and seems
> to work.
> 
> One thing is I'm not sure if disconnects are being signalled/processed
> properly, since xrandr still shows two outputs when I unplug, but this isn't
> as urgent at the crashing was.

What does `modetest` and the Display panel in Settings show?

The `remove` udev event should in the patch be treated as a hotplug event, where it should rediscover CRTCs, connectors etc as it is exposed by KMS.

Comment 8 Dave Airlie 2020-06-30 00:53:01 UTC
oh yes the displa(In reply to Jonas Ådahl from comment #7)
> (In reply to Dave Airlie from comment #6)
> > I'd did a couple of hotplug cycles, and it doesn't crash anymore, and seems
> > to work.
> > 
> > One thing is I'm not sure if disconnects are being signalled/processed
> > properly, since xrandr still shows two outputs when I unplug, but this isn't
> > as urgent at the crashing was.
> 
> What does `modetest` and the Display panel in Settings show?
> 
> The `remove` udev event should in the patch be treated as a hotplug event,
> where it should rediscover CRTCs, connectors etc as it is exposed by KMS.

oh it works fine there. so all good from me.

Comment 16 Jiri Koten 2020-08-24 07:30:50 UTC
I was able to reproduce the crash and verify the fix. Tested multiple hotplug cycles.

Comment 19 errata-xmlrpc 2020-11-04 01:35:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: GNOME security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4451


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