Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault in XrmDestroyDatabase in dunst 1.9.2 #1258

Closed
fwsmit opened this issue Jan 15, 2024 Discussed in #1256 · 2 comments
Closed

Segfault in XrmDestroyDatabase in dunst 1.9.2 #1258

fwsmit opened this issue Jan 15, 2024 Discussed in #1256 · 2 comments

Comments

@fwsmit
Copy link
Member

fwsmit commented Jan 15, 2024

Discussed in #1256

Originally posted by cdown April 28, 2023
Didn't debug further yet since I'm going to be away for a bit, but I figure you'd like to know:

(gdb) bt
#0  ___pthread_mutex_lock (mutex=0x0) at pthread_mutex_lock.c:80
#1  0x00007f292eeb1733 in XrmDestroyDatabase (db=0x7f2918003860) at /usr/src/debug/libx11/libX11-1.8.4/src/Xrm.c:2653
#2  0x00007f292eeab8c6 in XrmSetDatabase (display=0x5560554e43c0, database=0x5560555675c0) at /usr/src/debug/libx11/libX11-1.8.4/src/Xrm.c:354
#3  0x00005560546707b1 in XRM_update_db () at src/x11/x.c:493
#4  0x0000556054670c38 in x_mainloop_fd_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at src/x11/x.c:354
#5  0x00007f292eac853b in g_main_dispatch (context=0x5560554c90d0) at ../glib/glib/gmain.c:3460
#6  g_main_context_dispatch (context=0x5560554c90d0) at ../glib/glib/gmain.c:4200
#7  0x00007f292eb25219 in g_main_context_iterate.constprop.0 (context=0x5560554c90d0, block=1, dispatch=1, self=<optimized out>) at ../glib/glib/gmain.c:4276
#8  0x00007f292eac7c7f in g_main_loop_run (loop=0x5560554d4820) at ../glib/glib/gmain.c:4479
#9  0x000055605466063d in dunst_main (argv=<optimized out>, argc=<optimized out>) at src/dunst.c:227
#10 main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/dunst/dunst-1.9.2/main.c:5

So somehow ___pthread_mutex_lock is getting NULL.

This only happens immediately after starting X/wm/etc, so my guess is something is racing.

@bynect
Copy link
Member

bynect commented Feb 19, 2024

This is an interesting issue, maybe it has to do with the way the xrm database is first initialized with the static variable? I'll try looking into it

@bynect
Copy link
Member

bynect commented Mar 1, 2024

Fixed in #1291

@bynect bynect closed this as completed Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants