adhoc (and some other wifi actions) freezes NetworkManager in pthread/recvmsg (via nl_recvmsgs())

Bug #956349 reported by Mathieu Trudel-Lapierre
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Creating a adhoc network manually via nm-applet, NetworkManager seizes up and becomes hard to stop via upstart. At that point all client actions timeout, because NM is stuck in an endless loop in pthread's recvmsg. That's triggered by some state changes, which end up calling libnl's nl_recvmsgs, though the information required to break free of the loop is, in the case of adhoc, never available.

Much simpler to explain via a stack trace:

#0 0x00007ffff750722d in recvmsg () at ../sysdeps/unix/syscall-template.S:82
No locals.
#1 0x00007ffff6c98fbf in nl_recv () from /lib/libnl-3.so.200
No symbol table info available.
#2 0x00007ffff6c995bd in nl_recvmsgs () from /lib/libnl-3.so.200
No symbol table info available.
#3 0x000000000048b333 in _nl80211_send_and_recv (nl_sock=0x701500, nl_cb=<optimized out>, msg=0x7b42d0,
    valid_handler=0x48bdf0 <nl80211_station_handler>, valid_data=0x7fffffffded0) at wifi-utils-nl80211.c:131
        cb = 0x7b4d40
        err = 0
        done = -2
        __PRETTY_FUNCTION__ = "_nl80211_send_and_recv"
#4 0x000000000048bb6b in nl80211_send_and_recv (valid_data=0x7fffffffded0, valid_handler=0x48bdf0 <nl80211_station_handler>, msg=0x7b42d0,
    nl80211=<optimized out>) at wifi-utils-nl80211.c:151
No locals.
#5 nl80211_get_ap_info (nl80211=0x789290, sta_info=0x7fffffffded0) at wifi-utils-nl80211.c:495
        msg = 0x7b42d0
        bss_info = {freq = 2412, bssid = "n\341h3+\017",
          ssid = "TOTO123", '\000' <se r\377\377\377\377\377\377\377烿\000\377\377\377\377\377\377\377瓿攀 ㈀㐀 昀漀椀猀㸀,
          ssid_len = 7, beacon_signal = 100, valid = 1}
#6 0x000000000048bbcc in wifi_nl80211_get_rate (data=<optimized out>) at wifi-utils-nl80211.c:515
        nl80211 = <optimized out>
        sta_info = {txrate = 0, txrate_valid = 0, signal = 0 '\000', signal_valid = 0}
#7 0x0000000000433c4e in periodic_update (self=0x798030) at nm-device-wifi.c:761
        priv = 0x798220
        new_ap = 0x0
        new_rate = <optimized out>
        percent = <optimized out>
        __PRETTY_FUNCTION__ = "periodic_update"
#8 0x0000000000433d95 in nm_device_wifi_periodic_update (data=<optimized out>) at nm-device-wifi.c:790
        self = 0x798030
        priv = 0x798220
        state = <optimized out>
#9 0x00007ffff6014a1b in g_timeout_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>)
    at /build/buildd/glib2.0-2.31.20/./glib/gmain.c:3854
        timeout_source = 0x7013f0
        again = <optimized out>

You'll get a stacktrace similar to this, especially the first three or four frames are important.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: network-manager 0.9.3.995+git201203081848.bba834f-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-18.29-generic 3.2.9
Uname: Linux 3.2.0-18-generic x86_64
ApportVersion: 1.94.1-0ubuntu2
Architecture: amd64
Date: Thu Mar 15 15:34:48 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120209.2)
IpRoute:
 default via 192.168.5.1 dev wlan0 proto static
 169.254.0.0/16 dev wlan0 scope link metric 1000
 192.168.5.0/24 dev wlan0 proto kernel scope link src 192.168.5.203 metric 2
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
 WimaxEnabled=true
ProcEnviron:
 LANGUAGE=fr_CA:fr
 TERM=xterm
 PATH=(custom, user)
 LANG=fr_CA.UTF-8
 SHELL=/bin/zsh
SourcePackage: network-manager
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.NetworkManager.NetworkManager.conf: [modified]
mtime.conffile..etc.NetworkManager.NetworkManager.conf: 2012-03-05T11:45:59.646530
nmcli-dev:
 DEVICE TYPE STATE DBUS-PATH
 64:A7:69:BC:E6:FE bluetooth disconnected /org/freedesktop/NetworkManager/Devices/2
 wlan0 802-11-wireless connected /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.3.995 connected enabled enabled enabled enabled disabled

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

This bug was fixed in the package network-manager - 0.9.3.995+git201203152001.04b2a74-0ubuntu1

---------------
network-manager (0.9.3.995+git201203152001.04b2a74-0ubuntu1) precise; urgency=low

  * upstream snapshot 2012-03-15 20:01:30 (GMT)
    + 04b2a7433662540c87b5b5e58c7b1b5f9314f253
    + Bugfix only snapshot.
    - wifi: yet another nl80211 processing fix (LP: #956349)
    - docs: libnm-glib docs fixes for recent additions
    - docs: fix 'make distcheck' API doc xslt paths
    - core: fix carrier-triggered state re-entrancy issue (rh #800690)
    - core: fix queued state change debug message
    - cli: use nm_device_connection_valid() function from libnm-glib
    - libnm-glib: two object uniqueness fixes
    - libnm-util: don't assert on buggy drivers with no WEP cipher capabilities
    - libnm-glib: fix leaked NMDevice objects due to circular refcounting
    - libnm-glib: ensure nm_device_set_device_type() stays private
    - libnm-glib: prevent possible access of freed memory
    - Fix names of error enum values
    - po: updated Slovenian translation (bgo #671242)
    - trivial: fix completed VLAN connection name
    - cli: fix VLAN priority map listing
    - build: make VLAN code compatible with older kernels
    - wifi: fix typo in wifi detection code (bgo #671276)
  * debian/patches/git_nm_device_set_device_type_private.patch,
    debian/patches/git_libnm-util_wep_caps_assert_bb6da99.patch,
    debian/patches/git_glib_enum_dbus_nicks_54ef8f3.patch: dropped, applied
    upstream and included in this snapshot.
 -- Mathieu Trudel-Lapierre <email address hidden> Fri, 16 Mar 2012 14:32:19 -0400

Changed in network-manager (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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