Skip to content

Segfault on suspend/resume

First of all, thanks for your efforts in developing a great window manager!

To the point. I installed Debian12 on a MacBook 7.1. I have legacy NVidia 340.108-25 driver. And I use XScreenSaver to lock the screen.

Sometimes when I resume the system after suspending, I find that xfwm4 has been restarted. Because of this, I can see my desktop despite the screen being locked by XScreenSaver.

Digging around a bit, I found a segfault message in dmesg:

[ 3549.313106] xfwm4[9766]: segfault at 48 ip 00007fde469332e9 sp 00007ffd4d18df68 error 6 in libnvidia-glcore.so.340.108[7fde45200000+19c2000] likely on CPU 0 (core 0, socket 0)
[ 3549.315387] Code: 00 8b 40 54 89 c1 e9 06 ff ff ff 66 0f 1f 44 00 00 48 8b 87 b8 a6 09 00 48 8d 50 01 48 89 97 b8 a6 09 00 48 8b 97 00 02 00 00 <89> 42 48 c3 90 66 90 48 8b 87 40 a7 09 00 8b 90 68 36 05 00 b8 01

So I got the corresponding coredump. After running DEBUGINFOD_URLS=“https://debuginfod.debian.net” coredumpctl debug, gdb started and I ran the bt command to find where the program was crashing. Here is the output:

(gdb) bt
#0  0x00007fde469332e9 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.340.108
#1  0x00007fde468ef88a in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.340.108
#2  0x00007fde465a95f2 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.340.108
#3  0x00007fde465a9654 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.340.108
#4  0x000055931581bc06 in redraw_glx_texture (buffer=0, screen_info=0x55933524e360) at ./src/compositor.c:1906
#5  paint_all (buffer=0, region=<optimized out>, screen_info=0x55933524e360) at ./src/compositor.c:2649
#6  repair_screen (screen_info=0x55933524e360) at ./src/compositor.c:2761
#7  compositor_timeout_cb (data=0x55933524e360) at ./src/compositor.c:2793
#8  0x00007fde5a09019a in g_timeout_dispatch (source=0x559335605c20, callback=<optimized out>, user_data=<optimized out>) at ../../../glib/gmain.c:5017
#9  0x00007fde5a08f67f in g_main_dispatch (context=0x559334f816f0) at ../../../glib/gmain.c:3454
#10 g_main_context_dispatch (context=context@entry=0x559334f816f0) at ../../../glib/gmain.c:4172
#11 0x00007fde5a08fa38 in g_main_context_iterate (context=0x559334f816f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4248
#12 0x00007fde5a08fcef in g_main_loop_run (loop=loop@entry=0x559334f88150) at ../../../glib/gmain.c:4448
#13 0x00007fde5a608495 in gtk_main () at ../../../gtk/gtkmain.c:1329
#14 0x0000559315810b3d in main (argc=<optimized out>, argv=<optimized out>) at ./src/main.c:764

As far as I can tell from the downloaded sources, the file hasn't changed much since the version used in Debian. And the line that caused the segfault is still here: https://gitlab.xfce.org/xfce/xfwm4/-/blob/master/src/compositor.c?ref_type=heads#L1906

Please let me know if I can do anything else to debug the issue.

Thanks again!

Edited by Arthur D.