Crash when passing cursor to virtual monitor on non headless mutter
Affected version
- Fedora 35
- Mutter 41.0
- Wayland
Bug summary
As detailed in !1698 (merged) , I was trying to stop and replace the gnome-shell with mutter and add the --virtual-monitor parameter. As soon as the cursor moves to the virtual display, mutter crashes.
Steps to reproduce
- Fedora 35 stock ISO installation
- sudo killall gnome-shell
- In a new tty, run
mutter --wayland --display-server --virtual-monitor 1920x1080
(also tested withdbus-run-session
) - Wait for mutter session (blueish screen) to show up
What happened
As soon as one moves the cursor to the virtual monitor, mutter crashes
What did Mutter do that was unexpected?
Crash
What did you expect to happen
Not crash
Relevant logs, screenshots, screencasts etc.
Core was generated by `mutter --display-server --wayland --virtual-monitor 1920x1080'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 has_cursor_plane (logical_monitor=<optimized out>, monitor=monitor@entry=0x5635851e9cf0, output=output@entry=0x5635851cd740, crtc=0x563584f7deb0, user_data=user_data@entry=0x7ffc4f9c31ec)
at ../src/backends/native/meta-cursor-renderer-native.c:680
680 *has_cursor_planes &= !!meta_kms_device_get_cursor_plane_for (kms_device,
[Current thread is 1 (Thread 0x7f5759ebaa80 (LWP 12554))]
(gdb) bt full
#0 has_cursor_plane (logical_monitor=<optimized out>, monitor=monitor@entry=0x5635851e9cf0, output=output@entry=0x5635851cd740, crtc=0x563584f7deb0, user_data=user_data@entry=0x7ffc4f9c31ec)
at ../src/backends/native/meta-cursor-renderer-native.c:680
has_cursor_planes = 0x7ffc4f9c31ec
crtc_kms = 0x563584f7deb0
kms_crtc = 0x0
kms_device = <error reading variable kms_device (Cannot access memory at address 0x18)>
#1 0x00007f575eca3fc7 in foreach_crtc (monitor=monitor@entry=0x5635851e9cf0, mode=mode@entry=0x563584f25f70, monitor_crtc_mode=<optimized out>, user_data=user_data@entry=0x7ffc4f9c3210,
error=error@entry=0x0) at ../src/backends/meta-logical-monitor.c:247
data = 0x7ffc4f9c3210
#2 0x00007f575eca27a2 in meta_monitor_mode_foreach_crtc (monitor=0x5635851e9cf0, mode=0x563584f25f70, func=0x7f575eca3f90 <foreach_crtc>, user_data=0x7ffc4f9c3210, error=0x0)
at ../src/backends/meta-monitor.c:1955
monitor_crtc_mode = <optimized out>
monitor_priv = <optimized out>
l = 0x563584ee6a40
i = 0
#3 0x00007f575ed7be4d in meta_logical_monitor_foreach_crtc (user_data=0x7ffc4f9c31ec, func=0x7f575ed794b0 <has_cursor_plane>, logical_monitor=0x7f574000ee80)
at ../src/backends/meta-logical-monitor.c:274
monitor = 0x5635851e9cf0
mode = <optimized out>
data = {logical_monitor = 0x7f574000ee80, func = 0x7f575ed794b0 <has_cursor_plane>, user_data = 0x7ffc4f9c31ec}
l = 0x5635851ea4a0
l = <optimized out>
monitor = <optimized out>
mode = <optimized out>
data = {logical_monitor = <optimized out>, func = <optimized out>, user_data = <optimized out>}
#4 crtcs_has_cursor_planes (cursor_sprite=0x5635851e3b90, renderer=0x56358514ded0) at ../src/backends/native/meta-cursor-renderer-native.c:720
logical_monitor = 0x7f574000ee80
logical_monitor_layout = {x = <optimized out>, y = <optimized out>, width = <optimized out>, height = <optimized out>}
logical_monitor_rect = {origin = {x = 1920, y = 0}, size = {width = 1920, height = 1080}}
has_cursor_planes = 1
cursor_renderer_native = <optimized out>
cursor_rect = {origin = {x = 1914.06567, y = 386.708557}, size = {width = 24, height = 24}}
priv = <optimized out>
backend = <optimized out>
monitor_manager = <optimized out>
logical_monitors = <optimized out>
l = 0x5635851ea4c0
cursor_renderer_native = <optimized out>
priv = <optimized out>
backend = <optimized out>
monitor_manager = <optimized out>
logical_monitors = <optimized out>
l = <optimized out>
cursor_rect = {origin = {x = <optimized out>, y = <optimized out>}, size = {width = <optimized out>, height = <optimized out>}}
logical_monitor = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
logical_monitor_layout = {x = <optimized out>, y = <optimized out>, width = <optimized out>, height = <optimized out>}
logical_monitor_rect = {origin = {x = <optimized out>, y = <optimized out>}, size = {width = <optimized out>, height = <optimized out>}}
has_cursor_planes = <optimized out>
#5 should_have_hw_cursor (gpus=0x5635858d9f80, cursor_sprite=0x5635851e3b90, renderer=0x56358514ded0) at ../src/backends/native/meta-cursor-renderer-native.c:883
cursor_renderer_native = <optimized out>
texture = <optimized out>
priv = <optimized out>
transform = 1156579328
scale = 2.01455688
l = <optimized out>
cursor_renderer_native = <optimized out>
priv = <optimized out>
texture = <optimized out>
transform = <optimized out>
scale = <optimized out>
l = <optimized out>
gpu_kms = <optimized out>
cursor_renderer_gpu_data = <optimized out>
#6 meta_cursor_renderer_native_update_cursor (renderer=<optimized out>, cursor_sprite=<optimized out>) at ../src/backends/native/meta-cursor-renderer-native.c:1087
native = <optimized out>
priv = <optimized out>
stage = <optimized out>
gpus = 0x5635858d9f80
#7 0x00007f575ec9cb2b in meta_cursor_renderer_update_cursor (renderer=0x56358514ded0, cursor_sprite=0x5635851e3b90) at ../src/backends/meta-cursor-renderer.c:411
priv = 0x56358514de80
handled_by_backend = <optimized out>
#8 0x00007f575ecf2497 in meta_cursor_renderer_update_position (renderer=0x56358514ded0) at ../src/backends/meta-cursor-renderer.c:462
priv = 0x56358514de80
pos = {x = 1918.06567, y = 390.708557}
#9 meta_display_handle_event (event=0x5635857f32b0, display=0x5635851f2080) at ../src/core/events.c:295
cursor_renderer = 0x56358514ded0
device = 0x563585150060
window = <optimized out>
bypass_clutter = 0
backend = 0x563584ece100
bypass_wayland = 0
gesture_tracker = <optimized out>
sequence = <optimized out>
compositor = 0x563584f68330
backend = <optimized out>
window = <optimized out>
bypass_clutter = <optimized out>
bypass_wayland = <optimized out>
gesture_tracker = <optimized out>
sequence = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
compositor = <optimized out>
out = <optimized out>
handle_pad_event = <optimized out>
is_mode_switch = <optimized out>
pad = <optimized out>
button = <optimized out>
source = <optimized out>
cursor_renderer = <optimized out>
device = <optimized out>
cursor_tracker = <optimized out>
grab_mods = <optimized out>
#10 event_callback (event=0x5635857f32b0, data=0x5635851f2080) at ../src/core/events.c:492
display = 0x5635851f2080
#11 0x00007f575e52f715 in _clutter_event_process_filters (event=0x5635857f32b0) at ../clutter/clutter/clutter-event.c:1803
event_filter = <optimized out>
context = <optimized out>
l = <optimized out>
next = 0x0
#12 0x00007f575e54a05c in emit_pointer_event (device=0x563585150060, event=0x5635857f32b0) at ../clutter/clutter/clutter-main.c:1126
No locals.
#13 _clutter_process_event_details (context=0x563585097bb0, event=0x5635857f32b0, stage=<optimized out>) at ../clutter/clutter/clutter-main.c:1649
x = 1918.06567
y = 390.708557
device = 0x563585150060
clutter_context = <optimized out>
backend = 0x7f573c004730
device = <optimized out>
clutter_context = <optimized out>
backend = <optimized out>
actor = <optimized out>
_g_boolean_var_ = <optimized out>
actor = <optimized out>
crossing = <optimized out>
crossing = <optimized out>
x = <optimized out>
y = <optimized out>
x = <optimized out>
y = <optimized out>
grab_actor = <optimized out>
x = <optimized out>
y = <optimized out>
device_type = <optimized out>
#14 _clutter_process_event (event=0x5635857f32b0) at ../clutter/clutter/clutter-main.c:1826
context = 0x563585097bb0
stage = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
seat = <optimized out>
#15 0x00007f575e568c18 in _clutter_stage_process_queued_events (stage=0x5635851ab8b0) at ../clutter/clutter/clutter-stage.c:804
next_event = <optimized out>
device = 0x563585150060
device_type = <optimized out>
event = 0x5635857f32b0
next_device = <optimized out>
check_device = <optimized out>
priv = 0x5635851ab470
events = 0x5635858d9ee0
l = 0x5635858d9fa0
priv = <optimized out>
events = <optimized out>
l = <optimized out>
__func__ = {<optimized out> <repeats 37 times>}
next_event = <optimized out>
_g_boolean_var_ = <optimized out>
__inst = <optimized out>
__t = <optimized out>
__r = <optimized out>
event = <optimized out>
next_event = <optimized out>
device = <optimized out>
next_device = <optimized out>
device_type = <optimized out>
check_device = <optimized out>
#16 handle_frame_clock_before_frame (frame_clock=<optimized out>, frame_count=<optimized out>, user_data=<optimized out>) at ../clutter/clutter/clutter-stage-view.c:1079
view = <optimized out>
priv = <optimized out>
#17 0x00007f575e53b1cb in clutter_frame_clock_dispatch (time_us=2790747808, frame_clock=0x5635851d8240) at ../clutter/clutter/clutter-frame-clock.c:642
frame_count = 57
CoglTraceClutterFrameClockDispatch = {begin_time = 0, name = 0x0, description = 0x0}
ScopedCoglTraceClutterFrameClockDispatch = 0x0
CoglTraceClutterFrameClockFrame = {begin_time = 2790747817618, name = 0x7f575eb3f7e5 <g_source_iter_next+149> "\353\230f\017\037\204",
description = 0x7ffc4f9ed9ca <__vdso_clock_gettime+90> "H\211\302H\205\300xbI\213J\bI\213C(A\213r\030H9\312v\nH)\312H\017\257\326H\001\320A\213J\034I\213s A\213\022A9\325u\267H\323\350H=\377ɚ;v\026\061\322H-"}
result = <optimized out>
ideal_dispatch_time_us = <optimized out>
lateness_us = <optimized out>
CoglTraceClutterFrameClockEvents = {begin_time = 0, name = 0x0, description = 0x0}
CoglTraceClutterFrameClockTimelines = {begin_time = 0, name = 0x7ffc4f9c35a8 "", description = 0x0}
frame_count = <optimized out>
result = <optimized out>
ideal_dispatch_time_us = <optimized out>
lateness_us = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
CoglTraceClutterFrameClockDispatch = {begin_time = <optimized out>, name = <optimized out>, description = <optimized out>}
ScopedCoglTraceClutterFrameClockDispatch = <optimized out>
CoglTraceClutterFrameClockEvents = {begin_time = <optimized out>, name = <optimized out>, description = <optimized out>}
CoglTraceClutterFrameClockTimelines = {begin_time = <optimized out>, name = <optimized out>, description = <optimized out>}
CoglTraceClutterFrameClockFrame = {begin_time = <optimized out>, name = <optimized out>, description = <optimized out>}
__func__ = {<optimized out> <repeats 29 times>}
#18 frame_clock_source_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at ../clutter/clutter/clutter-frame-clock.c:693
clock_source = <optimized out>
frame_clock = 0x5635851d8240
dispatch_time_us = 2790747808
#19 0x00007f575eb4133f in g_main_dispatch (context=0x563584f45030) at ../glib/gmain.c:3381
dispatch = 0x7f575e53b0a0 <frame_clock_source_dispatch>
prev_source = 0x0
begin_time_nsec = 2790747821387
was_in_call = <optimized out>
user_data = 0x0
callback = 0x0
cb_funcs = 0x0
cb_data = 0x0
need_destroy = <optimized out>
source = 0x5635851b9f50
current = 0x563584f102f0
i = 0
__func__ = {<optimized out> <repeats 16 times>}
#20 g_main_context_dispatch (context=0x563584f45030) at ../glib/gmain.c:4099
No locals.
#21 0x00007f575eb96288 in g_main_context_iterate.constprop.0 (context=0x563584f45030, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4175
max_priority = 2147483647
timeout = 1
some_ready = 1
nfds = 6
allocated_nfds = 7
fds = <optimized out>
begin_time_nsec = 2790746615040
#22 0x00007f575eb40903 in g_main_loop_run (loop=0x563585227be0) at ../glib/gmain.c:4373
self = <optimized out>
__func__ = "g_main_loop_run"
#23 0x00007f575ecf7f19 in meta_context_run_main_loop (context=<optimized out>, error=0x7ffc4f9c3730) at ../src/core/meta-context.c:433
priv = 0x563584ec5800
__func__ = "meta_context_run_main_loop"
#24 0x0000563583b4e385 in main (argc=<optimized out>, argv=<optimized out>) at ../src/core/mutter.c:90
context = 0x563584ec5860
error = 0x0