NetworkManager 1.44.0 crashes repeatedly with glib 2.78.0
Summary
The main NetworkManager process crashes repeatedly with glib 2.78.0. It no longer reproduces after downgrading glib to 2.76.5. I'm reporting it here too because it remains unclear to me whether it's a problem in GLib or NetworkManager itself.
There are multiple reports for the same issue in my local Arch Linux user group.
Version affected
- NetworkManager 1.44.0
- GLib 2.78.0
- Arch Linux x86_64
Steps to reproduce
- Start NetworkManager service
- It crashes randomly. The fastest one being a crash of 3 seconds after started and successfully connected to Wi-Fi.
Relevant logs
g_mutex_clear() called on uninitialised or locked mutex
Backtrace:
(gdb) bt full
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
tid = <optimized out>
ret = 0
pd = <optimized out>
old_mask = {__val = {140517133380192}}
ret = <optimized out>
#1 0x00007fccb148e8a3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2 0x00007fccb143e668 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#3 0x00007fccb14264b8 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x20, sa_sigaction = 0x20}, sa_mask = {__val = {56, 140517133380192, 56, 56, 140517124362049, 4, 140517126173920, 56, 56, 1, 140517133380192, 140517125771824, 140517124311762, 94657017546753, 94657010334544, 94656992549056}}, sa_flags = 216955008, sa_restorer = 0x56170de80868}
#4 0x00007fccb1caab23 in g_mutex_clear (mutex=<optimized out>) at ../glib/glib/gthread-posix.c:1450
#5 g_mutex_clear (mutex=mutex@entry=0x56170cee78a8) at ../glib/glib/gthread-posix.c:1445
#6 0x00007fccb1e4ebe0 in lookup_data_free (data=0x56170cee7880) at ../glib/gio/gthreadedresolver.c:251
__func__ = "lookup_data_free"
#7 0x00007fccb1e5232f in g_task_finalize (object=0x56170de80860) at ../glib/gio/gtask.c:773
task = 0x56170de80860
#8 0x00007fccb1d658b4 in g_object_unref (_object=0x56170de80860) at ../glib/gobject/gobject.c:3941
weak_locations = <optimized out>
nqueue = 0x56170d19e6b0
old_ref = <optimized out>
object = 0x56170de80860
__func__ = "g_object_unref"
#9 g_object_unref (_object=0x56170de80860) at ../glib/gobject/gobject.c:3805
object = 0x56170de80860
__func__ = "g_object_unref"
#10 0x00007fccb1c4b92d in g_source_callback_unref (cb_data=0x7fcc98001bc0) at ../glib/glib/gmain.c:1758
callback = 0x7fcc98001bc0
#11 g_source_callback_unref (cb_data=0x7fcc98001bc0) at ../glib/glib/gmain.c:1751
callback = 0x7fcc98001bc0
#12 0x00007fccb1c4ff50 in g_source_destroy_internal (source=0x7fcc98017020, context=0x56170c6a9770, have_lock=1) at ../glib/glib/gmain.c:1423
tmp_list = <optimized out>
old_cb_data = 0x7fcc98001bc0
old_cb_funcs = 0x7fccb1d41380 <g_source_callback_funcs>
#13 0x00007fccb1c51021 in g_main_dispatch (context=0x56170c6a9770) at ../glib/glib/gmain.c:3506
dispatch = <optimized out>
prev_source = 0x0
begin_time_nsec = 14448646124337
was_in_call = 0
user_data = 0x56170de80860
callback = 0x7fccb1e4ed10 <complete_in_idle_cb>
cb_funcs = 0x7fccb1d41380 <g_source_callback_funcs>
cb_data = 0x7fcc98001bc0
need_destroy = 1
source = 0x7fcc98017020
current = 0x56170c6b2d40
i = 0
__func__ = "g_main_dispatch"
#14 0x00007fccb1caf2b7 in g_main_context_dispatch_unlocked (context=0x56170c6a9770) at ../glib/glib/gmain.c:4284
max_priority = 2147483647
timeout = 403
some_ready = 1
nfds = 10
allocated_nfds = 11
fds = 0x56170c6ebee0
begin_time_nsec = 14448597199357
#15 g_main_context_iterate_unlocked.isra.0 (context=0x56170c6a9770, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4349
max_priority = 2147483647
timeout = 403
some_ready = 1
nfds = 10
allocated_nfds = 11
fds = 0x56170c6ebee0
begin_time_nsec = 14448597199357
#16 0x00007fccb1c51b47 in g_main_loop_run (loop=0x56170c6a9830) at ../glib/glib/gmain.c:4551
__func__ = "g_main_loop_run"
#17 0x000056170c089f28 in main (argc=<optimized out>, argv=<optimized out>) at ../NetworkManager/src/core/main.c:519
success = 1
manager = 0x56170c79eeb0
config = <optimized out>
error = 0x0
wrote_pidfile = <optimized out>
bad_domains = 0x0
config_cli = 0x0
sd_id = 324
error_invalid_logging_config = 0x0
warnings = <optimized out>
errsv = <optimized out>
has_logging = <optimized out>