After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 765830 - Ubuntu 16.04 Crash when disconnecting from VPN
Ubuntu 16.04 Crash when disconnecting from VPN
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: IP and DNS config
1.2.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-04-29 23:43 UTC by tim
Modified: 2016-05-19 15:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
An Ubuntu crash file ... is this the same as a stack trace (1.72 MB, text/x-apport)
2016-04-30 07:13 UTC, tim
Details
gdb output (20.98 KB, text/plain)
2016-05-06 11:31 UTC, tim
Details

Description tim 2016-04-29 23:43:33 UTC
I have one openvpn connection and one wired connection.
To reproduce this bug, I use the nm applet to connect to the openvpn connection. This is successful

Later, I use the nm applet to select the wired connection. The applet crashes and disappears.

Ubuntu's error logging shows:

Error: command ['nmcli', '-f', 'all', 'nm'] failed with exit code 2: Error: Object 'nm' is unknown, try 'nmcli help'.

Also, there is a pop up message that the VPN connection failed because the network connection was interrupted.

The VPN connection is terminated. 

The version of network-manager is 1.1.93
Comment 1 Thomas Haller 2016-04-30 00:50:40 UTC
This description is not sufficient to understand the problem.

You say nm-applet is crashing?

If nm-applet crashed, which component showed the pop-up message about the failed connection?

Can you reproduce the problem easily? Can you obtain a stack-trace of the crash?

Thank you.
Comment 2 tim 2016-04-30 07:09:21 UTC
I can reproduce the problem at will, every time.

The warning message must popup before the applet crashes, I guess.

I have stack traces generated by Ubuntu (I guess that's what the .crash file is). I will attach one.
Comment 3 tim 2016-04-30 07:13:46 UTC
Created attachment 327065 [details]
An Ubuntu crash file ... is this the same as a stack trace
Comment 4 tim 2016-04-30 07:15:19 UTC
Also, please note that the log file indicates that if fails with an error like this

Error: command ['nmcli', '-f', 'all', 'nm'] failed with exit code 2: Error: Object 'nm' is unknown, try 'nmcli help'.

which I guess indicates some kind of higher level error, rather than a "crash".
Comment 5 Thomas Haller 2016-04-30 14:54:22 UTC
(In reply to tim from comment #4)
> Also, please note that the log file indicates that if fails with an error
> like this
> 
> Error: command ['nmcli', '-f', 'all', 'nm'] failed with exit code 2: Error:
> Object 'nm' is unknown, try 'nmcli help'.
> 
> which I guess indicates some kind of higher level error, rather than a
> "crash".

No, this is just some debugging scripts that run on ubuntu to collect information about the system state (for debugging). The script is outdated and uses obsolete arguments for nmcli (at that time, nmcli broke API. We don't do that anymore).

you can ignore it, or report the annoyance downstream.


(In reply to tim from comment #2)
> I can reproduce the problem at will, every time.
> 
> The warning message must popup before the applet crashes, I guess.
> 
> I have stack traces generated by Ubuntu (I guess that's what the .crash file
> is). I will attach one.

Unfortunately, not helpful.
Could you run nm-applet in a debugger? This seems like a helpful howto: https://wiki.ubuntu.com/Backtrace#Generation
Comment 6 tim 2016-05-02 10:45:10 UTC
thanks, I will work on this.
Comment 7 tim 2016-05-06 11:31:19 UTC
Created attachment 327384 [details]
gdb output

i followed the instructions for attaching gdb to nm-applet process. it crashed. attached is the output.
Comment 8 Thomas Haller 2016-05-06 12:06:17 UTC
Thank you Tim.


This looks better. Unfortunately, you didn't install debugging symbols, as you see messages like:

  Reading symbols from /usr/bin/nm-applet...(no debugging symbols found)...done.

and below missing information like:

  • #3 g_assertion_message_expr
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #4 ??
  • #5 ??
  • #6 g_main_context_dispatch




To improve on that, please either:

- install debugging symbols and repeat running in debugger (step 1 in https://wiki.ubuntu.com/Backtrace#Generation)

- alternatively: it can be seen that the crash is due to a failed assertion. In this case, you could also just run nm-applet in a terminal, reproduce the crash, and hopefully during the assertion you see a helpful message printed telling where the assertion fails. Post whatever nm-applet writes to the terminal.


Thank you.
Comment 9 tim 2016-05-07 04:09:11 UTC
This is the output from running it in a terminal:

**
nm-applet:ERROR:applet.c:1108:applet_get_first_active_vpn_connection: assertion failed: (s_con)
Aborted (core dumped)
Comment 10 Sebastien Bacher 2016-05-09 15:19:27 UTC
the stacktrace from the launchpad bot https://launchpadlibrarian.net/258145591/Stacktrace.txt
Comment 11 tim 2016-05-13 08:24:42 UTC
Hi, this is still tagged needinfo.
Comment 12 Thomas Haller 2016-05-13 16:55:08 UTC
this should be fixed in libnm/libnm-glib by commit https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=23136ecf89f279479337ead355b7ff5e80465a0b


So, when using 1.1.92 or newer, the crash also should not happen.



Anyway, I removed the assertion from nm-applet too:

master: https://git.gnome.org/browse/network-manager-applet/commit/?id=c3255ed740592a2f23a7ebc47f1acd2dd2d768b3

nm-1-2: https://git.gnome.org/browse/network-manager-applet/commit/?id=1fe93d23fac15bdaaca4c51e526725616a15678d
Comment 13 tim 2016-05-19 12:06:12 UTC
It happens in ubuntu 16.04 with network-manager package version
1.2.0-0ubuntu0.16.04.1 (from the proposed suite).
The assertion is still there, though.
Comment 14 Thomas Haller 2016-05-19 15:51:16 UTC
(In reply to tim from comment #13)
> It happens in ubuntu 16.04 with network-manager package version
> 1.2.0-0ubuntu0.16.04.1 (from the proposed suite).
> The assertion is still there, though.

It is expected that the assertion is still there in the code. With "happens", do you mean the assertion still fails for you at runtime?

I would expect, that a failure depends on your libnm version. What is your libnm version?

But I also would expect, that your libnm version contains is recent too, thus contains https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=23136ecf89f279479337ead355b7ff5e80465a0b . With that fix, the assertion should not be hit anymore... (in theory).