• Thomas Haller's avatar
    cli: unsubscribe permission signal from NMClient on exit · 6a9ed0ad
    Thomas Haller authored
    During the libnm rework, we might still emit permissions changed
    signal while destructing the instance. That triggers an assertion.
    
    Backtrace, with a different libnm:
    
      #0  _g_log_abort (breakpoint=1) at ../glib/gmessages.c:554
      #1  0x00007ffff77d09b6 in g_logv (log_domain=0x7ffff7f511cd "libnm", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffffcb80) at ../glib/gmessages.c:1373
      #2  0x00007ffff77d0b83 in g_log
          (log_domain=log_domain@entry=0x7ffff7f511cd "libnm", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff78215df "%s: assertion '%s' failed")
          at ../glib/gmessages.c:1415
      #3  0x00007ffff77d137d in g_return_if_fail_warning
          (log_domain=log_domain@entry=0x7ffff7f511cd "libnm", pretty_function=pretty_function@entry=0x7ffff7f58aa0 <__func__.40223> "nm_client_get_permission_result", expression=expression@entry=0x7ffff7f54830 "NM_IS_CLIENT (client)") at ../glib/gmessages.c:2771
      #4  0x00007ffff7e9de9a in nm_client_get_permission_result (client=0x0, permission=permission@entry=NM_CLIENT_PERMISSION_ENABLE_DISABLE_NETWORK) at libnm/nm-client.c:3816
      #5  0x0000555555593ba3 in got_permissions (nmc=nmc@entry=0x55555562ec20 <nm_cli>) at clients/cli/general.c:587
      #6  0x0000555555593bcb in permission_changed (client=<optimized out>, permission=<optimized out>, result=<optimized out>, nmc=0x55555562ec20 <nm_cli>) at clients/cli/general.c:600
      #7  0x00007ffff73b1aa8 in ffi_call_unix64 () at ../src/x86/unix64.S:76
      #8  0x00007ffff73b12a4 in ffi_call (cif=cif@entry=0x7fffffffced0, fn=fn@entry=0x555555593bbf <permission_changed>, rvalue=<optimized out>, avalue=avalue@entry=0x7fffffffcde0)
          at ../src/x86/ffi64.c:525
      #9  0x00007ffff78b4746 in g_cclosure_marshal_generic_va
          (closure=<optimized out>, return_value=<optimized out>, instance=<optimized out>, args_list=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=<optimized out>) at ../gobject/gclosure.c:1614
      #10 0x00007ffff78b3996 in _g_closure_invoke_va (closure=0x5555556f4330, return_value=0x0, instance=0x55555565a020, args=0x7fffffffd180, n_params=2, param_types=0x555555656f00)
          at ../gobject/gclosure.c:873
      #11 0x00007ffff78d0228 in g_signal_emit_valist (instance=0x55555565a020, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffd180) at ../gobject/gsignal.c:3306
      #12 0x00007ffff78d09d3 in g_signal_emit (instance=instance@entry=0x55555565a020, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3453
      #13 0x00007ffff7e8989a in _emit_permissions_changed (self=self@entry=0x55555565a020, permissions=permissions@entry=0x555555690e40 = {...}, force_unknown=force_unknown@entry=1)
          at libnm/nm-client.c:2874
      #14 0x00007ffff7e9a0c9 in _init_release_all (self=self@entry=0x55555565a020) at libnm/nm-client.c:6092
      #15 0x00007ffff7e9bcde in dispose (object=0x55555565a020 [NMClient]) at libnm/nm-client.c:6838
      #16 0x00007ffff78b8c28 in g_object_unref (_object=<optimized out>) at ../gobject/gobject.c:3344
      #17 g_object_unref (_object=0x55555565a020) at ../gobject/gobject.c:3274
      #18 0x00005555555badcf in nmc_cleanup (nmc=0x55555562ec20 <nm_cli>) at clients/cli/nmcli.c:924
      #19 0x00005555555bbea7 in main (argc=<optimized out>, argv=0x7fffffffd498) at clients/cli/nmcli.c:987
    6a9ed0ad
Name
Last commit
Last update
..
agent.c Loading commit data...
agent.h Loading commit data...
common.c Loading commit data...
common.h Loading commit data...
connections.c Loading commit data...
connections.h Loading commit data...
devices.c Loading commit data...
devices.h Loading commit data...
general.c Loading commit data...
general.h Loading commit data...
meson.build Loading commit data...
nmcli-completion Loading commit data...
nmcli.c Loading commit data...
nmcli.h Loading commit data...
polkit-agent.c Loading commit data...
polkit-agent.h Loading commit data...
settings.c Loading commit data...
settings.h Loading commit data...
utils.c Loading commit data...
utils.h Loading commit data...