gnome-shell wayland crash in iris_dri.so after upgrading to mesa 24.1.0
System information
System:
Host: rattmann Kernel: 6.9.2-arch1-1 arch: x86_64 bits: 64 compiler: gcc
v: 14.1.1
Desktop: GNOME v: 46.2 tk: GTK v: 3.24.42 wm: gnome-shell dm: GDM
Distro: Arch Linux
CPU:
Info: quad core model: 11th Gen Intel Core i7-1165G7 bits: 64 type: MT MCP
arch: Tiger Lake rev: 1 cache: L1: 320 KiB L2: 5 MiB L3: 12 MiB
Speed (MHz): avg: 583 high: 1166 min/max: 400/4700 cores: 1: 400 2: 670
3: 572 4: 400 5: 400 6: 400 7: 1166 8: 662 bogomips: 44864
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: CLEVO/KAPOK
driver: i915 v: kernel arch: Gen-12.1 ports: active: eDP-1 empty: DP-1,
DP-2, DP-3, DP-4, HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:9a49
Device-2: Chicony USB2.0 Camera driver: uvcvideo type: USB rev: 2.0
speed: 480 Mb/s lanes: 1 bus-ID: 3-7:2 chip-ID: 04f2:b685
Display: x11 server: X.Org v: 21.1.13 with: Xwayland v: 24.1.0
compositor: gnome-shell driver: X: loaded: modesetting unloaded: vesa
alternate: fbdev,intel dri: iris gpu: i915 display-ID: :1 screens: 1
Screen-1: 0 s-res: 3840x1080 s-dpi: 96
Monitor-1: Unknown-1 mapped: None-1-1 note: disabled size-res: N/A
Monitor-2: eDP-1 pos: primary model: ChiMei InnoLux 0x14d5 res: 1920x1080
dpi: 158 diag: 354mm (13.9")
API: EGL v: 1.5 platforms: device: 0 drv: iris device: 1 drv: swrast gbm:
drv: kms_swrast surfaceless: drv: iris x11: drv: iris inactive: wayland
API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.1.0-arch1.1
glx-v: 1.4 direct-render: yes renderer: Mesa Intel Xe Graphics (TGL GT2)
device-ID: 8086:9a49
API: Vulkan v: 1.3.279 surfaces: xcb,xlib device: 0 type: integrated-gpu
driver: mesa intel device-ID: 8086:9a49
Describe the issue
After upgrading from Mesa 24.0.8 to 24.1.0, I hit the attached coredump every time I try to boot/login to my system. The screen flashes black for a bit before showing the GNOME login screen, and allowing me to login. However, it appears that the crash reverts me to using an X11 session instead of a Wayland session. This appears to happen every time I boot my system or log out of an existing GNOME session.
Downgrading back to Mesa 24.0.8 solves the issue. I am able to use a Wayland session again, and I don't see any black screens between booting and the GNOME login screen.
Since downgrading Mesa (and only Mesa) fixes this, and the stacktrace has iris_dri.so at the top, I'm starting with filing an issue here. Let me know if you think this should be moved to gnome-shell's tracker instead.
Regression
This worked fine in 24.0.8, and downgrading Mesa to 24.0.8 works as expected.
Backtrace of suspected thread
#0 0x0000000000000000 in ??? ()
#1 0x0000725e7e30b111 in llvmpipe_resource_from_handle () at ../mesa-24.1.0/src/gallium/drivers/llvmpipe/lp_texture.c:669
#2 0x0000725e7dc3329f in dri2_create_image_from_winsys () at ../mesa-24.1.0/src/gallium/frontends/dri/dri2.c:1034
#3 0x0000725e7dc338ac in dri2_create_image_from_fd () at ../mesa-24.1.0/src/gallium/frontends/dri/dri2.c:1173
#4 0x0000725e7dc33ae9 in dri2_from_fds () at ../mesa-24.1.0/src/gallium/frontends/dri/dri2.c:1657
#5 0x0000725e900737f8 in gbm_dri_bo_import () at ../mesa-24.1.0/src/gbm/backends/dri/gbm_dri.c:785
#6 0x0000725e935ba23c in dmabuf_to_gbm_bo (importer=0x601aa3f73c10, dmabuf_fd=89, width=<optimized out>, height=<optimized out>, stride=<optimized out>, format=<optimized out>)
at ../mutter/src/backends/native/meta-drm-buffer-import.c:130
#7 import_gbm_buffer (buffer_import=0x601aa6f65010 [MetaDrmBufferImport], importer=0x601aa3f73c10, error=0x7ffd6e853d80) at ../mutter/src/backends/native/meta-drm-buffer-import.c:165
#8 meta_drm_buffer_import_new (device_file=<optimized out>, gbm_device=0x601aa3f73c10, buffer_gbm=<optimized out>, error=0x7ffd6e853d80) at ../mutter/src/backends/native/meta-drm-buffer-import.c:209
#9 meta_render_device_gbm_import_dma_buf (render_device=<optimized out>, buffer=<optimized out>, error=0x7ffd6e853d80) at ../mutter/src/backends/native/meta-render-device-gbm.c:99
#10 0x0000725e935bd23e in meta_render_device_import_dma_buf (render_device=0x601aa3f72b00 [MetaRenderDeviceGbm], buffer=0x601aa6f64db0 [MetaDrmBufferGbm], error=0x7ffd6e853d80) at ../mutter/src/backends/native/meta-render-device.c:380
#11 import_shared_framebuffer (onscreen=0x601aa3cc9ca0 [MetaOnscreenNative], secondary_gpu_state=0x601aa4121210, primary_gpu_fb=0x601aa6f64db0 [MetaDrmBufferGbm]) at ../mutter/src/backends/native/meta-onscreen-native.c:784
#12 update_secondary_gpu_state_post_swap_buffers (onscreen=0x601aa3cc9ca0 [MetaOnscreenNative], egl_context_changed=0x7ffd6e853d3c, primary_gpu_fb=0x601aa6f64db0 [MetaDrmBufferGbm], secondary_gpu_fb=<synthetic pointer>)
at ../mutter/src/backends/native/meta-onscreen-native.c:1191
#13 meta_onscreen_native_swap_buffers_with_damage (onscreen=0x601aa3cc9ca0 [MetaOnscreenNative], rectangles=0x7ffd6e853e70, n_rectangles=0, frame_info=0x601aa6f51da0 [CoglFrameInfo], user_data=0x601aa6f50ae0)
at ../mutter/src/backends/native/meta-onscreen-native.c:1374
#14 0x0000725e92ea0a74 in cogl_onscreen_swap_buffers_with_damage
(onscreen=onscreen@entry=0x601aa3cc9ca0 [MetaOnscreenNative], rectangles=rectangles@entry=0x7ffd6e853e70, n_rectangles=n_rectangles@entry=0, info=info@entry=0x601aa6f51da0 [CoglFrameInfo], user_data=user_data@entry=0x601aa6f50ae0)
at ../mutter/cogl/cogl/cogl-onscreen.c:348
#15 0x0000725e93490463 in swap_framebuffer
(stage_window=stage_window@entry=0x601aa4146280, stage_view=stage_view@entry=0x601aa3fc7ae0 [MetaRendererViewNative], swap_region=swap_region@entry=0x601aa6f51390, swap_with_damage=swap_with_damage@entry=0, frame=frame@entry=0x601aa6f50ae0) at ../mutter/src/backends/meta-stage-impl.c:328
#16 0x0000725e934910f6 in meta_stage_impl_redraw_view_primary (stage_impl=0x601aa4146280 [MetaStageNative], stage_view=0x601aa3fc7ae0 [MetaRendererViewNative], frame=0x601aa6f50ae0) at ../mutter/src/backends/meta-stage-impl.c:721
#17 meta_stage_impl_redraw_view (stage_window=0x601aa4146280, stage_view=0x601aa3fc7ae0 [MetaRendererViewNative], frame=0x601aa6f50ae0) at ../mutter/src/backends/meta-stage-impl.c:793
#18 0x0000725e935d4375 in meta_stage_native_redraw_view (stage_window=0x601aa4146280, view=0x601aa3fc7ae0 [MetaRendererViewNative], frame=0x601aa6f50ae0) at ../mutter/src/backends/native/meta-stage-native.c:148
#19 0x0000725e937f210c in _clutter_stage_window_redraw_view (window=0x601aa4146280, view=0x601aa3fc7ae0 [MetaRendererViewNative], frame=0x601aa6f50ae0) at ../mutter/clutter/clutter/clutter-stage-window.c:73
#20 handle_frame_clock_frame (frame_clock=0x601aa40bdab0 [ClutterFrameClock], frame=0x601aa6f50ae0, user_data=0x601aa3fc7ae0) at ../mutter/clutter/clutter/clutter-stage-view.c:899
#21 0x0000725e937b1b04 in clutter_frame_clock_dispatch (frame_clock=0x601aa40bdab0 [ClutterFrameClock], time_us=<optimized out>) at ../mutter/clutter/clutter/clutter-frame-clock.c:977
#22 frame_clock_source_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at ../mutter/clutter/clutter/clutter-frame-clock.c:1026
#23 0x0000725e93f53a89 in g_main_dispatch (context=0x601aa3ce0710) at ../glib/glib/gmain.c:3344
#24 0x0000725e93fb59b7 in g_main_context_dispatch_unlocked (context=0x601aa3ce0710) at ../glib/glib/gmain.c:4152
#25 g_main_context_iterate_unlocked.isra.0 (context=0x601aa3ce0710, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4217
#26 0x0000725e93f54787 in g_main_loop_run (loop=0x601aa4250b40) at ../glib/glib/gmain.c:4419
#27 0x0000725e934ce3dc in meta_context_run_main_loop (context=<optimized out>, error=0x7ffd6e854780) at ../mutter/src/core/meta-context.c:523
#28 0x0000725e928da596 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#29 0x0000725e928d700e in ffi_call_int (cif=cif@entry=0x601aa449c720, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
#30 0x0000725e928d9bd3 in ffi_call (cif=0x601aa449c720, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>) at ../src/x86/ffi64.c:710
#31 0x0000725e938b7fe1 in Gjs::Function::invoke (this=0x601aa449c700, context=0x601aa3d08930, args=..., this_obj=..., r_value=0x0) at ../gjs/gi/function.cpp:1056
#32 0x0000725e938b8688 in Gjs::Function::call (context=0x601aa3d08930, js_argc=<optimized out>, vp=<optimized out>) at ../gjs/gi/function.cpp:1238
#33 0x0000725e91f6280a in CallJSNative (cx=0x601aa3d08930, native=0x725e938b85a0 <Gjs::Function::call(JSContext*, unsigned int, JS::Value*)>, reason=js::CallReason::Call, args=...)
at /usr/src/debug/js115/firefox-115.11.0/js/src/vm/Interpreter.cpp:486
#34 js::InternalCallOrConstruct (cx=0x601aa3d08930, args=..., construct=<optimized out>, reason=js::CallReason::Call) at /usr/src/debug/js115/firefox-115.11.0/js/src/vm/Interpreter.cpp:566
#35 0x0000725e91bd9161 in InternalCall (args=..., cx=<optimized out>, reason=<optimized out>) at /usr/src/debug/js115/firefox-115.11.0/js/src/vm/Interpreter.cpp:647
#36 js::CallFromStack (args=..., cx=<optimized out>, reason=<optimized out>) at /usr/src/debug/js115/firefox-115.11.0/js/src/vm/Interpreter.cpp:652
#37 js::Interpret (cx=<optimized out>, state=...) at /usr/src/debug/js115/firefox-115.11.0/js/src/vm/Interpreter.cpp:3395
#38 0x0000725e91bd4525 in MaybeEnterInterpreterTrampoline (cx=0x601aa3d08930, state=...) at /usr/src/debug/js115/firefox-115.11.0/js/src/vm/Interpreter.cpp:400
#39 js::RunScript (cx=0x601aa3d08930, state=...) at /usr/src/debug/js115/firefox-115.11.0/js/src/vm/Interpreter.cpp:458
#40 js::InternalCallOrConstruct (cx=0x601aa3d08930, args=..., construct=js::NO_CONSTRUCT, reason=<optimized out>) at /usr/src/debug/js115/firefox-115.11.0/js/src/vm/Interpreter.cpp:612
#41 InternalCall (cx=0x601aa3d08930, args=..., reason=<optimized out>) at /usr/src/debug/js115/firefox-115.11.0/js/src/vm/Interpreter.cpp:647
#42 js::Call (cx=0x601aa3d08930, fval=..., thisv=..., args=..., rval=..., reason=<optimized out>) at /usr/src/debug/js115/firefox-115.11.0/js/src/vm/Interpreter.cpp:679
#43 0x0000725e920baa41 in JS::Call (cx=0x601aa3d08930, thisv=..., fval=..., args=..., rval=...) at /usr/src/debug/js115/firefox-115.11.0/js/src/vm/CallAndConstruct.cpp:117
#44 0x0000725e938eef02 in JS::Call (rval=..., args=..., funObj=..., thisv=..., cx=<optimized out>) at /usr/include/mozjs-115/js/RootingAPI.h:1219
#45 GjsContextPrivate::run_main_loop_hook (this=0x601aa3cff350) at ../gjs/gjs/context.cpp:1491
#46 0x0000725e938f717f in GjsContextPrivate::eval_module (error=0x7ffd6e855220, exit_status_p=0x7ffd6e85521b "\223\001", identifier=0x601aa424f650 "resource:///org/gnome/shell/ui/init.js", this=0x601aa3cff350)
at ../gjs/gjs/context.cpp:1608
#47 gjs_context_eval_module (js_context=<optimized out>, identifier=0x601aa424f650 "resource:///org/gnome/shell/ui/init.js", exit_code=0x7ffd6e85521b "\223\001", error=0x7ffd6e855220) at ../gjs/gjs/context.cpp:1387
#48 0x0000725e938f7481 in gjs_context_eval_module_file
(js_context=js_context@entry=0x601aa3cff4f0 [GjsContext], filename=filename@entry=0x601a73a57640 "resource:///org/gnome/shell/ui/init.js", exit_status_p=exit_status_p@entry=0x7ffd6e85521b "\223\001", error=error@entry=0x7ffd6e855220)
at ../gjs/gjs/context.cpp:1692
#49 0x0000601a73a5558c in main (argc=<optimized out>, argv=<optimized out>) at ../gnome-shell/src/main.c:708
Full backtrace of all threads attached, in case it is helpful. I don't see anything relevant in dmesg besides the SIGSEGV message, which is:
[ 1835.975363] gnome-shell[12921]: segfault at 0 ip 0000000000000000 sp 00007ffd6e8537d8 error 14 likely on CPU 7 (core 3, socket 0)
I can also upload this coredump somewhere if you think it would help as well.