nm-applet crashes when switching between devices

Bug #1185330 reported by joshiss
60
This bug affects 14 people
Affects Status Importance Assigned to Milestone
network-manager-applet (Ubuntu)
Fix Released
High
Mathieu Trudel-Lapierre
Raring
Fix Released
High
Mathieu Trudel-Lapierre
Saucy
Fix Released
High
Mathieu Trudel-Lapierre

Bug Description

[Impact]
Users of broadband (ModemManager1, new version of ModemManager), Bluetooth PAN, CDMA devices, and other such connection methods.

[Test Case]
1. Restart NetworkManager while an affected device is present and/or connected:
sudo restart network-manager

Alternate test case:
1. Switch between devices: disconnect wifi and connect a CDMA dongle to the mobile network, or vice versa.

Without the fix, nm-applet should crash. With the fix, there should be no crash.

[Regression Potential]
Since this changes the memory management of some pointers in nm-applet/network-manager code, there is a potential to introduce a memory leak if this code is left in place while other parts of the patch (such as how the connection ID string is built) is changed. Otherwise, since this was attempting an action which was obviously wrong, the potential for regressions is quite low.

---

1. network manager crashes while switching between wifi to reliance dongle and vice a versa
i also experienced the same in wifi to lan wired connection
the network manager icon in top right corner vanishes and the network manager starts behaving weirdly

2. i have configured reliance dongle and given it a name reliance connection 1
when i first insert the dongle and it gets detected it shows proper name of the available connection in network manager drop down list
then when i disconnect the network and join wifi and then again disconnect wifi and come back to reliance network it shows weird names or no title in the drop down list

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: network-manager-gnome 0.9.8.0-1ubuntu2
ProcVersionSignature: Ubuntu 3.8.0-22.33-generic 3.8.11
Uname: Linux 3.8.0-22-generic i686
ApportVersion: 2.9.2-0ubuntu8
Architecture: i386
Date: Wed May 29 14:55:26 2013
IfupdownConfig:
 auto lo
 iface lo inet loopback
InstallationDate: Installed on 2012-03-24 (430 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha i386 (20120324)
IpRoute:
 default via 220.224.141.129 dev ppp0 proto static
 169.254.0.0/16 dev ppp0 scope link metric 1000
 220.224.141.129 dev ppp0 proto kernel scope link src 101.63.85.225
MarkForUpload: True
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
 WimaxEnabled=true
SourcePackage: network-manager-applet
UpgradeStatus: Upgraded to raring on 2013-01-25 (124 days ago)
nmcli-dev:
 DEVICE TYPE STATE DBUS-PATH
 ttyUSB0 cdma connected /org/freedesktop/NetworkManager/Devices/4
 eth0 802-3-ethernet unavailable /org/freedesktop/NetworkManager/Devices/1
 wlan0 802-11-wireless unavailable /org/freedesktop/NetworkManager/Devices/0
nmcli-nm:
 RUNNING VERSION STATE NET-ENABLED WIFI-HARDWARE WIFI WWAN-HARDWARE WWAN
 running 0.9.8.0 connected enabled disabled disabled enabled enabled

Revision history for this message
joshiss (joshiss) wrote :
Revision history for this message
nlionheart (nitin-nbhor) wrote :

I am also facing the same issue. However in my case the applet disappears in between of a running session and I am disconnected from the internet.
I tried running nm-applet through terminal. It fails with the following error :

ERROR:applet-device-cdma.c:437:cdma_get_icon: assertion failed: (info)

I hope that helps.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager-applet (Ubuntu):
status: New → Confirmed
Revision history for this message
nlionheart (nitin-nbhor) wrote : apport information

ApportVersion: 2.9.2-0ubuntu8.1
Architecture: i386
DistroRelease: Ubuntu 13.04
IfupdownConfig:
 auto lo
 iface lo inet loopback
 iface wlan0 inet manual
IpRoute:
 default via 172.29.145.65 dev ppp0 proto static
 169.254.0.0/16 dev ppp0 scope link metric 1000
 172.29.145.65 dev ppp0 proto kernel scope link src 14.97.31.147
MarkForUpload: True
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=false
 WWANEnabled=true
 WiMAXEnabled=false
Package: network-manager-applet (not installed)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_IN
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic-pae 3.2.14
Tags: raring
Uname: Linux 3.2.0-23-generic-pae i686
UpgradeStatus: Upgraded to raring on 2013-05-14 (29 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare vboxusers
WpaSupplicantLog:

nmcli-con:
 NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT READONLY DBUS-PATH
 Tata Indicom (Photon+) connection 5b360a1e-d620-4d49-a7fc-50c63be057e8 cdma 1371120720 Thursday 13 June 2013 04:22:00 PM IST yes no /org/freedesktop/NetworkManager/Settings/1
 MTNL Delhi 1 791fe96d-a3d8-4353-b23d-d80241784446 gsm 0 never no no /org/freedesktop/NetworkManager/Settings/0
nmcli-dev:
 DEVICE TYPE STATE DBUS-PATH
 ttyUSB0 cdma connected /org/freedesktop/NetworkManager/Devices/2
 wlan0 802-11-wireless unmanaged /org/freedesktop/NetworkManager/Devices/1
 eth0 802-3-ethernet unavailable /org/freedesktop/NetworkManager/Devices/0
nmcli-nm:
 RUNNING VERSION STATE NET-ENABLED WIFI-HARDWARE WIFI WWAN-HARDWARE WWAN
 running 0.9.8.0 connected enabled enabled disabled enabled enabled

tags: added: apport-collected
Revision history for this message
nlionheart (nitin-nbhor) wrote : CRDA.txt

apport information

Revision history for this message
nlionheart (nitin-nbhor) wrote : HookError_cloud_archive.txt

apport information

Revision history for this message
nlionheart (nitin-nbhor) wrote : IpAddr.txt

apport information

Revision history for this message
nlionheart (nitin-nbhor) wrote : IwConfig.txt

apport information

Revision history for this message
nlionheart (nitin-nbhor) wrote : NetDevice.eth0.txt

apport information

Revision history for this message
nlionheart (nitin-nbhor) wrote : NetDevice.lo.txt

apport information

Revision history for this message
nlionheart (nitin-nbhor) wrote : NetDevice.ppp0.txt

apport information

Revision history for this message
nlionheart (nitin-nbhor) wrote : NetDevice.wlan0.txt

apport information

Revision history for this message
nlionheart (nitin-nbhor) wrote : NetworkManager.conf.txt

apport information

Revision history for this message
nlionheart (nitin-nbhor) wrote : PciNetwork.txt

apport information

Revision history for this message
nlionheart (nitin-nbhor) wrote : RfKill.txt

apport information

Revision history for this message
nlionheart (nitin-nbhor) wrote : WifiSyslog.txt

apport information

Revision history for this message
Jean-Pierre Rupp (xenog) wrote : Re: network manager error

I have discovered the cause of this problem. There are some bad g_free() calls in the code. I will submit patch.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Apply patch to source obtained from apt-get source ntework-manager-applet" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Jean-Pierre Rupp (xenog) wrote :

I found this revision in which code that formerly duplicated the string was replaced with code that copies a pointer to the relevant settings data structure "id" value.

http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/saucy/network-manager-applet/saucy/revision/105.1.1#src/applet-device-cdma.c

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Indeed, that patch is correct. I wonder why I forgot to remove the g_free() calls there for so long.

Changed in network-manager-applet (Ubuntu Saucy):
status: New → Triaged
Changed in network-manager-applet (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
Changed in network-manager-applet (Ubuntu Saucy):
importance: Undecided → High
Changed in network-manager-applet (Ubuntu):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Changed in network-manager-applet (Ubuntu Saucy):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
description: updated
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Unsubscribing the Reviewers team since I confirmed the patch is fine, and it's not really applicable to be upstreamed (given that it's rather changes to another patch, which we'll handle upstreaming for separately).

I also targetted Saucy and Raring for SRU of this fix.

Changed in network-manager-applet (Ubuntu Raring):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
summary: - network manager error
+ nm-applet crashes when switching between devices
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package network-manager-applet - 0.9.8.0-1ubuntu6

---------------
network-manager-applet (0.9.8.0-1ubuntu6) trusty; urgency=low

  * debian/patches/lp330608_dxteam_gsm_connect_text.patch: refresh patch:
    remove some additional g_free() calls that were being made on a const
    string for a NM internal pointer containing the connection ID, which should
    not be freed. Thanks to Jean-Pierre Rupp for the fix. (LP: #1185330)
 -- Mathieu Trudel-Lapierre <email address hidden> Sun, 01 Dec 2013 09:07:04 -0500

Changed in network-manager-applet (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello jo, or anyone else affected,

Accepted network-manager-applet into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/network-manager-applet/0.9.8.0-1ubuntu5.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in network-manager-applet (Ubuntu Saucy):
status: Triaged → Fix Committed
tags: added: verification-needed
Changed in network-manager-applet (Ubuntu Raring):
status: Triaged → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello jo, or anyone else affected,

Accepted network-manager-applet into raring-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/network-manager-applet/0.9.8.0-1ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
rrich1974 (richardsdma) wrote :

hi there
can i go to:
https://launchpad.net/ubuntu/+source/network-manager-applet/0.9.8.0-1ubuntu5.1/+build/5305334
and install all those built files from the bottom of the page?
and then, if they fail, is it easy to revert back to old version?

Revision history for this message
rrich1974 (richardsdma) wrote :

i just took my chance and installed all those 6 packeges.
i can tell that it works. now, the network manager applet shows right characters for CDMA network.
i even connected and disconnected multiple times to see that nm-applet is crashing, it does not!
thanx guys! keep up the good work!

Revision history for this message
rohit_kalhans (rohit-kalhans) wrote :

Just updated & tested. The patch works.
Thank u all

Miklos Juhasz (mjuhasz)
tags: added: verification-done
removed: verification-needed
tags: added: verification-done-saucy verification-needed
removed: verification-done
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package network-manager-applet - 0.9.8.0-1ubuntu5.1

---------------
network-manager-applet (0.9.8.0-1ubuntu5.1) saucy-proposed; urgency=low

  * debian/patches/lp330608_dxteam_gsm_connect_text.patch: refresh patch:
    remove some additional g_free() calls that were being made on a const
    string for a NM internal pointer containing the connection ID, which should
    not be freed. Thanks to Jean-Pierre Rupp for the fix. (LP: #1185330)
 -- Mathieu Trudel-Lapierre <email address hidden> Sun, 01 Dec 2013 09:07:04 -0500

Changed in network-manager-applet (Ubuntu Saucy):
status: Fix Committed → Fix Released
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Can anyone test/confirm that the fix is good for Raring? Thanks!

Revision history for this message
Jean-Pierre Rupp (xenog) wrote :

I can confirm it works fine for me.

tags: added: verification-done-raring
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package network-manager-applet - 0.9.8.0-1ubuntu2.1

---------------
network-manager-applet (0.9.8.0-1ubuntu2.1) raring-proposed; urgency=low

  * debian/patches/lp330608_dxteam_gsm_connect_text.patch: refresh patch:
    remove some additional g_free() calls that were being made on a const
    string for a NM internal pointer containing the connection ID, which should
    not be freed. Thanks to Jean-Pierre Rupp for the fix. (LP: #1185330)
 -- Mathieu Trudel-Lapierre <email address hidden> Mon, 02 Dec 2013 08:56:17 -0500

Changed in network-manager-applet (Ubuntu Raring):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for network-manager-applet has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.