Crash in error path of g_dbus_connection_export_menu_model()
glib2-2.80.2-1.1-x86_64
and/or lib32-glib2-2.80.2
are causing mousepad to segfault. For now the only way I can fix the problem is to downgrade back to glib2-2.80.0-4.1-x86_64
and lib32-glib2-2.80.0-4-x86_64
.
Here is the dmesg output from 2 different glib2-2.80.2 segfaults under CachyOS (I also tried the Arch versions):
[ 76.625449] mousepad[6845]: segfault at 0 ip 00007ef064166c0f sp 00007ffcdbe5fd70 error 4 in libgio-2.0.so.0.8000.2[7ef0640ad000+126000] likely on CPU 2 (core 2, socket 0)
[ 76.625458] Code: c2 2d 08 00 ff 15 99 5f 0f 00 ff 15 9b 6a 0f 00 66 66 2e 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 41 54 55 53 48 8b 6f 28 48 89 fb <4c> 8b 65 00 8b 75 08 49 8b 7c 24 10 ff 15 7f 5d 0f 00 49 8b 7c 24
[ 163.927779] mousepad[7138]: segfault at 0 ip 000077ea1820ec0f sp 00007ffc07798050 error 4 in libgio-2.0.so.0.8000.2[77ea18155000+126000] likely on CPU 4 (core 4, socket 0)
[ 163.927789] Code: c2 2d 08 00 ff 15 99 5f 0f 00 ff 15 9b 6a 0f 00 66 66 2e 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 41 54 55 53 48 8b 6f 28 48 89 fb <4c> 8b 65 00 8b 75 08 49 8b 7c 24 10 ff 15 7f 5d 0f 00 49 8b 7c 24
I've tried both the 2.80.0 and 2.80.2 versions of glib2, lib32-glib2, and glib2-docs multiple times. I’ve also uninstalled mousepad with pacman -Rns
, and removed ~/.config/Mousepad
, then reinstalled mousepad, between each test. But no matter what I try mousepad segfaults with 2.80.2. But when I downgrade to 2.80.0 the segfault no longer occurs.
The most interesting thing is that I have two systems running CachyOS with all the latest updates, a media server and a workstation, and the problem only occurs on my workstation.
The media server utilizes an ASRock B550M-ITX motherboard, Ryzen 5 4600G CPU, and 2x8GB CMK16GX4M2Z3200C16 Corsair Vengeance DDR4 DRAM.
My workstation utilizes an ASUS TUF Gaming X570-PLUS motherboard, Ryzen 7 5700X CPU, and 2x16GB CMW32GX4M2D3600C18 Corsair Vengeance DDR4 DRAM.
And of course both motherboards have the latest BIOS.
I’m a retired R&D engineer so before filing this bug I suspected there was some type of hardware error with my workstation, but after running mprime for 2 hours, and memtest86±efi overnight, there were no errors. I also ran most all the software I could on my workstation, including a full passthrough Windows 10 VM, GPU passthrough Windows 11 VM, and console Windows 10 VM with Qemu/KVM and everything runs perfectly. Of course I’ve been checking dmesg for errors as well as visual inspection.
But for some reason mousepad is the only software that segfaults with 2.80.2, and only on my workstation. It’s really baffling.
But I’m more than willing and capable of helping debug the issue in any way you’d like. But for now I’m out of ideas. strace didn’t lead me anywhere but to glib, but maybe gdb could assist? However you'll have to instruct me on the debugging steps as I'm not a Linux developer.