GNOME Shell / mutter crash (segfault) when using copy+paste in Kicad 8
Affected version
Archlinux rolling Name : mutter Version : 46.0-1
Using Wayland
Bug summary
KiCAD is able to cause GNOME Shell 46 / mutter 46 to crash and return me to a login screen when doing different operations like copy/paste via ctrl-c / save / sometimes pressing the escape key. Happens most often during copy/paste operations, but is not consistent - sometimes copy+paste works, sometimes save works, sometimes mutter crashes.
This happens when extensions are turned off and on.
Steps to reproduce
Use KiCAD to place symbols in a schematic, copy/paste, a crash of mutter will occur in five to ten minutes of using KiCAD. Have not been able to reproduce in other applications.
What happened
Crash and return to login screen.
What did you expect to happen
No crash. Mutter/GNOME Shell should be able to handle clipboard events more gracefully.
Relevant logs, screenshots, screencasts etc.
Backtrace from coredump:
GNU gdb (GDB) 14.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/gnome-shell...
Reading symbols from /home/carneeki/.cache/debuginfod_client/b272a1a5ca3bfdaa18aa47e1612cc884fefa625b/debuginfo...
[New LWP 1880]
[New LWP 1893]
[New LWP 1895]
[New LWP 1882]
[New LWP 1916]
[New LWP 1901]
[New LWP 1896]
[New LWP 1932]
[New LWP 1927]
[New LWP 1910]
[New LWP 1919]
[New LWP 1883]
[New LWP 1933]
[New LWP 1917]
[New LWP 2011]
[New LWP 2427]
[New LWP 1897]
[New LWP 1894]
[New LWP 1920]
[New LWP 2345]
[New LWP 2426]
[New LWP 1925]
[New LWP 1899]
[New LWP 1926]
[New LWP 1885]
[New LWP 1900]
[New LWP 1934]
[New LWP 2856]
[New LWP 1931]
[New LWP 2548]
[New LWP 2425]
[New LWP 1898]
[New LWP 1918]
[New LWP 1921]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/bin/gnome-shell'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007049902c6899 in owner_changed_cb (selection=0x5804889e2b40,
selection_type=<optimized out>, new_owner=<optimized out>, display=0x5804889cbf00)
at ../mutter/src/core/meta-clipboard-manager.c:158
158 g_warning ("MetaClipboardManager failed to create new MetaSelectionSourceMemory: %s",
[Current thread is 1 (Thread 0x70498c15ad80 (LWP 1880))]
#0 0x00007049902c6899 in owner_changed_cb
(selection=0x5804889e2b40 [MetaSelection], selection_type=<optimized out>, new_owner=<optimized out>, display=0x5804889cbf00 [MetaDisplay]) at ../mutter/src/core/meta-clipboard-manager.c:158
#1 0x000070498f7a0596 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#2 0x000070498f79d00e in ffi_call_int
(cif=cif@entry=0x7ffdb4e4a8e0, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
#3 0x000070498f79fbd3 in ffi_call
(cif=cif@entry=0x7ffdb4e4a8e0, fn=fn@entry=0x7049902c65e0 <owner_changed_cb>, rvalue=rvalue@entry=0x7ffdb4e4a860, avalue=avalue@entry=0x7ffdb4e4a800) at ../src/x86/ffi64.c:710
#4 0x0000704990ecedb4 in g_cclosure_marshal_generic
(closure=<optimized out>, return_gvalue=<optimized out>, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=<optimized out>)
at ../glib/gobject/gclosure.c:1538
#5 0x0000704990ec8730 in g_closure_invoke
(closure=0x5804889e2be0, return_value=0x0, n_param_values=3, param_values=0x7ffdb4e4ab20, invocation_hint=0x7ffdb4e4aa70) at ../glib/gobject/gclosure.c:834
#6 0x0000704990ef7c1b in signal_emit_unlocked_R.isra.0
(node=node@entry=0x7ffdb4e4ac20, detail=detail@entry=0, instance=instance@entry=0x5804889e2b40, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7ffdb4e4ab20) at ../glib/gobject/gsignal.c:3961
#7 0x0000704990ee87a2 in signal_emit_valist_unlocked
(instance=instance@entry=0x5804889e2b40, signal_id=signal_id@entry=245, detail=detail@entry=0, var_args=var_args@entry=0x7ffdb4e4ad80) at ../glib/gobject/gsignal.c:3520
#8 0x0000704990ee89d7 in g_signal_emit_valist
(instance=0x5804889e2b40, signal_id=245, detail=0, var_args=var_args@entry=0x7ffdb4e4ad80)
at ../glib/gobject/gsignal.c:3263
#9 0x0000704990ee8a94 in g_signal_emit
(instance=instance@entry=0x5804889e2b40, signal_id=<optimized out>, detail=detail@entry=0)
at ../glib/gobject/gsignal.c:3583
#10 0x0000704990350594 in meta_selection_unset_owner
(owner=0x580489f07560 [MetaSelectionSourceWayland], selection_type=META_SELECTION_CLIPBOARD, selection=0x5804889e2b40 [MetaSelection]) at ../mutter/src/core/meta-selection.c:157
#11 meta_selection_unset_owner
(owner=0x580489f07560 [MetaSelectionSourceWayland], selection_type=META_SELECTION_CLIPBOARD, selection=0x5804889e2b40 [MetaSelection]) at ../mutter/src/core/meta-selection.c:146
#12 unset_selection_source (selection_type=META_SELECTION_CLIPBOARD, data_device=0x5804889c98a0)
at ../mutter/src/wayland/meta-wayland-data-device.c:186
#13 selection_data_source_destroyed (data=0x5804889c98a0, object_was_here=<optimized out>)
at ../mutter/src/wayland/meta-wayland-data-device.c:846
#14 0x0000704990ed2217 in weak_refs_notify (data=0x58048d625bd0) at ../glib/gobject/gobject.c:3643
#15 0x000070499091f1e2 in g_data_set_internal
(datalist=<optimized out>, key_id=<optimized out>, new_data=<optimized out>, new_destroy_func=<optimized out>, dataset=0x0) at ../glib/glib/gdataset.c:468
#16 0x0000704990ed4505 in g_object_real_dispose (object=0x58048b412580 [MetaWaylandDataSource])
at ../glib/gobject/gobject.c:1752
#17 0x0000704990ed74ee in g_object_unref (_object=0x58048b412580) at ../glib/gobject/gobject.c:4381
#18 0x000070498d6959ba in destroy_resource (element=0x58048944bb90, data=data@entry=0x0, flags=0)
at ../wayland-1.22.0/src/wayland-server.c:732
#19 0x000070498d6977a9 in wl_resource_destroy (resource=<optimized out>)
at ../wayland-1.22.0/src/wayland-server.c:749
#20 0x000070498f7a0596 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#21 0x000070498f79d00e in ffi_call_int
(cif=cif@entry=0x7ffdb4e4b180, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
#22 0x000070498f79fbd3 in ffi_call
(cif=cif@entry=0x7ffdb4e4b180, fn=<optimized out>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7ffdb4e4b250) at ../src/x86/ffi64.c:710
#23 0x000070498d692ada in wl_closure_invoke
(closure=closure@entry=0x58048afb7cd0, target=<optimized out>,
target@entry=0x58048944bb90, opcode=opcode@entry=1, data=<optimized out>,
data@entry=0x58048cb1a3d0, flags=2) at ../wayland-1.22.0/src/connection.c:1025
#24 0x000070498d697180 in wl_client_connection_data
(fd=<optimized out>, mask=<optimized out>, data=<optimized out>)
at ../wayland-1.22.0/src/wayland-server.c:438
#25 0x000070498d695ae2 in wl_event_loop_dispatch (loop=0x5804889c9a70, timeout=timeout@entry=0)
at ../wayland-1.22.0/src/event-loop.c:1027
#26 0x000070499034efcd in wayland_event_source_dispatch
(base=<optimized out>, callback=<optimized out>, data=<optimized out>)
at ../mutter/src/wayland/meta-wayland.c:138
#27 0x0000704990940199 in g_main_dispatch (context=0x58048833f730) at ../glib/glib/gmain.c:3344
#28 0x000070499099f3bf in g_main_context_dispatch_unlocked (context=0x58048833f730)
at ../glib/glib/gmain.c:4152
#29 g_main_context_iterate_unlocked.isra.0
(context=0x58048833f730, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
at ../glib/glib/gmain.c:4217
#30 0x0000704990940dc7 in g_main_loop_run (loop=0x5804887861f0) at ../glib/glib/gmain.c:4419
#31 0x00007049902ca00b in meta_context_run_main_loop
(context=<optimized out>, error=0x7ffdb4e4bc60) at ../mutter/src/core/meta-context.c:523
#32 0x000070498f7a0596 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#33 0x000070498f79d00e in ffi_call_int
(cif=cif@entry=0x580488a73250, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
#34 0x000070498f79fbd3 in ffi_call
(cif=0x580488a73250, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>)
at ../src/x86/ffi64.c:710
#35 0x000070499078dfec in Gjs::Function::invoke
(this=0x580488a73230, context=0x58048836c990, args=..., this_obj=..., r_value=0x0)
at ../gjs/gi/function.cpp:1054
#36 0x000070499078e6b8 in Gjs::Function::call
(context=0x58048836c990, js_argc=<optimized out>, vp=<optimized out>)
at ../gjs/gi/function.cpp:1236
#37 0x000070498ed652da in CallJSNative
(cx=0x58048836c990, native=0x70499078e5d0 <Gjs::Function::call(JSContext*, unsigned int, JS::Value*)>, reason=js::CallReason::Call, args=...)
at /usr/src/debug/js115/firefox-115.9.0/js/src/vm/Interpreter.cpp:486
#38 js::InternalCallOrConstruct
(cx=0x58048836c990, args=..., construct=<optimized out>, reason=js::CallReason::Call)
at /usr/src/debug/js115/firefox-115.9.0/js/src/vm/Interpreter.cpp:566
#39 0x000070498e9d8b01 in InternalCall (args=..., cx=<optimized out>, reason=<optimized out>)
at /usr/src/debug/js115/firefox-115.9.0/js/src/vm/Interpreter.cpp:647
#40 js::CallFromStack (args=..., cx=<optimized out>, reason=<optimized out>)
at /usr/src/debug/js115/firefox-115.9.0/js/src/vm/Interpreter.cpp:652
#41 js::Interpret (cx=<optimized out>, state=...)
at /usr/src/debug/js115/firefox-115.9.0/js/src/vm/Interpreter.cpp:3395
#42 0x000070498e9d3ec5 in MaybeEnterInterpreterTrampoline (cx=0x58048836c990, state=...)
at /usr/src/debug/js115/firefox-115.9.0/js/src/vm/Interpreter.cpp:400
#43 js::RunScript (cx=0x58048836c990, state=...)
at /usr/src/debug/js115/firefox-115.9.0/js/src/vm/Interpreter.cpp:458
#44 js::InternalCallOrConstruct
(cx=0x58048836c990, args=..., construct=js::NO_CONSTRUCT, reason=<optimized out>)
at /usr/src/debug/js115/firefox-115.9.0/js/src/vm/Interpreter.cpp:612
#45 InternalCall (cx=0x58048836c990, args=..., reason=<optimized out>)
at /usr/src/debug/js115/firefox-115.9.0/js/src/vm/Interpreter.cpp:647
#46 js::Call (cx=0x58048836c990, fval=..., thisv=..., args=..., rval=..., reason=<optimized out>)
at /usr/src/debug/js115/firefox-115.9.0/js/src/vm/Interpreter.cpp:679
#47 0x000070498eeba1b1 in JS::Call (cx=0x58048836c990, thisv=..., fval=..., args=..., rval=...)
at /usr/src/debug/js115/firefox-115.9.0/js/src/vm/CallAndConstruct.cpp:117
#48 0x00007049907c4f32 in JS::Call (rval=..., args=..., funObj=..., thisv=..., cx=<optimized out>)
at /usr/include/mozjs-115/js/RootingAPI.h:1219
#49 GjsContextPrivate::run_main_loop_hook (this=0x5804883633b0) at ../gjs/gjs/context.cpp:1491
#50 0x00007049907cd1af in GjsContextPrivate::eval_module
(error=0x7ffdb4e4c710, exit_status_p=0x7ffdb4e4c70b "\220\001", identifier=0x5804889fc810 "resource:///org/gnome/shell/ui/init.js", this=0x5804883633b0) at ../gjs/gjs/context.cpp:1608
#51 gjs_context_eval_module
(js_context=<optimized out>, identifier=0x5804889fc810 "resource:///org/gnome/shell/ui/init.js", exit_code=0x7ffdb4e4c70b "\220\001", error=0x7ffdb4e4c710) at ../gjs/gjs/context.cpp:1387
#52 0x00007049907cd4b1 in gjs_context_eval_module_file
(js_context=js_context@entry=0x580488363550 [GjsContext], filename=filename@entry=0x5804874d5640 "resource:///org/gnome/shell/ui/init.js", exit_status_p=exit_status_p@entry=0x7ffdb4e4c70b "\220\001", error=error@entry=0x7ffdb4e4c710) at ../gjs/gjs/context.cpp:1692
#53 0x00005804874d357f in main (argc=<optimized out>, argv=<optimized out>)
at ../gnome-shell/src/main.c:708