GNOME Bugzilla – Bug 758625
segfault when running nmcli agent
Last modified: 2015-11-30 08:33:29 UTC
When I run "nmcli agent" (under GNOME Shell) the tool segfaults: $ nmcli a nmcli successfully registered as a NetworkManager's secret agent. ** (process:18372): CRITICAL **: polkit_agent_listener_register_with_options: assertion 'POLKIT_IS_SUBJECT (subject)' failed (process:18372): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed (process:18372): GLib-GIO-CRITICAL **: g_dbus_error_strip_remote_error: assertion 'error != NULL' failed Segmentation fault There should be a nicer fallback if a secret agent is already active.
First, I can't reproduce that. But I can see where the problem appeared. It is not an issue with the secret agent, but with the polkit agent. polkit_unix_session_new_for_process_sync() failed for some reason and nmcli did not check the error and passed NULL to polkit_agent_listener_register(). http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/clients/common/nm-polkit-listener.c#n324 Fixed: master: 542200f clients: check errors of polkit_unix_session_new_for_process_sync() nm-1-0: c7cb2e8 clients: check errors of polkit_unix_session_new_for_process_sync() Michael, could you try with the fix again. $ nmcli agent polkit We would see why polkit_unix_session_new_for_process_sync() failed. And if you are only interested in NM secret agent, you can/should run 'nmcli agent secret'. Note: There can be multiple NM secret agent registered. For polkit, only one agent can be registered. If a polkit agent is active and another polkit agent tries to register, polkit prints ** (process:948): WARNING **: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject which is not nice, especially if there is no way to find out that an agent is already registered (or is it?).
The crash is fixed. Thanks.