NetworkManagerDispatcher uses 100% CPU on startup

Bug #123332 reported by NoahY
16
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: network-manager

Upgraded from Feisty to Gutsy, on startup the NetworkManagerDispatcher process is using whatever CPU it can to push the CPU usage up to 100%. Upon stopping the process, there is a wired network connect active (which I don't have) instead of the wireless connection (which I do have). Switching to wireless connection works.

I understand this may have something to do with the file:

/etc/NetworkManager/dispatcher.d/01ifupdown

so I am pasting its contents herein:

#!/bin/sh -e
# Script to dispatch NetworkManager events
#
# Runs ifupdown scripts when NetworkManager fiddles with interfaces.

if [ -z "$1" ]; then
    echo "$0: called with no interface" 1>&2
    exit 1;
fi

# Fake ifupdown environment
export IFACE="$1"
export LOGICAL="$1"
export ADDRFAM="NetworkManager"
export METHOD="NetworkManager"
export VERBOSITY="0"

# Run the right scripts
case "$2" in
    up)
 export MODE="start"
 export PHASE="up"
 exec run-parts /etc/network/if-up.d
 ;;
    down)
 export MODE="stop"
 export PHASE="down"
 exec run-parts /etc/network/if-down.d
 ;;
    pre-up)
 export MODE="start"
 export PHASE="pre-up"
 exec run-parts /etc/network/if-pre-up.d
 ;;
    post-down)
 export MODE="stop"
 export PHASE="post-down"
 exec run-parts /etc/network/if-post-down.d
 ;;
    *)
 echo "$0: called with unknown action \`$2'" 1>&2
 exit 1
 ;;
esac

Revision history for this message
NoahY (noahy) wrote :

Further: Deleting the file mentioned above removes the problem, but the network takes a great amount of time to connect.

Revision history for this message
Nikopol (markboydell) wrote :

Confirmed. I found it had grabbed all my CPU cycles. I had swtiched form wireless to LAN earlier during the day. Could that have been the problem? Here's what I got form top when I ran it;

 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 4740 root 16 0 26656 7136 1720 R 89.4 1.4 177:12.49 NetworkManager

Not sure what else is needed? (I'm running Gutsy fully updated)

Revision history for this message
AnRkey (anrkey) wrote :

Same here on my Dell XPS m170 (has Gbit NIC, Wireless andBluetooth)

When I boot, the NetworkManagerDispatcher process takes 100% CPU for anything from 2 to 5 minutes. I have attached tails and outputs from dmesg, /var/log/syslog and var/log/messages. Network access takes about 30 to 1 min to work after i am logged in.

Please let me know if you need anything more from my system.

AnRkey

Revision history for this message
AnRkey (anrkey) wrote :

Attached is my output from lspci -vv

AnRkey

Matt Vickers (mattyv)
Changed in network-manager:
status: New → Confirmed
Revision history for this message
Alexander Sack (asac) wrote :

do you have your network interfaces configured as auto?

Can you please try to *not* configure your wireless interface in /etc/network/interfaces at all?

Thanks,

 - Alexander

Revision history for this message
AnRkey (anrkey) wrote :

Hi Alexander

This is my /etc/network/interfaces file's contents...

$ cat /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth1
iface eth1 inet dhcp

auto eth2
iface eth2 inet dhcp

auto ath0
iface ath0 inet dhcp

auto wlan0
iface wlan0 inet dhcp

Are you suggesting that I not even have the ath0 or wlan0 on in the file at all?

AnRkey

Revision history for this message
AnRkey (anrkey) wrote :

OK I have now also tried not even listing my wireless card.

$ cat /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth1
iface eth1 inet dhcp

auto eth2
iface eth2 inet dhcp

# auto ath0
# iface ath0 inet dhcp

# auto wlan0
 # iface wlan0 inet dhcp

...and still the same problem. Please me know if you want me to try anything else.

AnRkey

Revision history for this message
Alexander Sack (asac) wrote : Re: [Bug 123332] Re: NetworkManagerDispatcher uses 100% CPU on startup

On Fri, Aug 31, 2007 at 08:15:13PM -0000, John Mitchell wrote:
> OK I have now also tried not even listing my wireless card.
>
> $ cat /etc/network/interfaces
>
> auto lo
> iface lo inet loopback
>
> auto eth1
> iface eth1 inet dhcp
>
> auto eth2
> iface eth2 inet dhcp
>
> # auto ath0
> # iface ath0 inet dhcp
>
> # auto wlan0
> # iface wlan0 inet dhcp
>
> ...and still the same problem. Please me know if you want me to try
> anything else.

Did you restart your system after that?

Further, can you try to restart the dispatcher when it goes nuts?

  sudo /etc/dbus-1/event.d/26NetworkManagerDispatcher restart

Thanks,

 - Alexander

Revision history for this message
AnRkey (anrkey) wrote :

Still same problem no matter how many reboots i do.

sudo /etc/dbus-1/event.d/26NetworkManagerDispatcher restart << fixes the problem instantly.

AnRkey

Revision history for this message
AnRkey (anrkey) wrote :

Just noticed that I need to do a

sudo mount -a

to get my NFS remote share mounted. The network is not up when this share is being mounted so it fails to mount.

AnRkey

Revision history for this message
Brad Crittenden (bac) wrote :

I just experienced the same problem with NetworkManagerDispatcher eating the CPU on reboot. This is on a desktop machine with only an ethernet interface, no wireless.

Restarting NetworkManagerDIspatcher as shown above resulted in it behaving nicely.

This is on Gutsy Tribe 5 with latest updates.

On a previous reboot, mixer_applet2 was going crazy as well as NetworkManagerDispatcher.

Revision history for this message
Lucazade (lucazade) wrote :

Networkmanagerdispatcher hangs also on my box...
This happens both on 386 and 64bit installation.

Luca

Revision history for this message
Lucazade (lucazade) wrote :

After some reinstallation (grrr..) of Ubuntu i've found that
this happens only when I install the LAMP suite:
apache2 php5 libapache2-mod-php5 mysql-server libapache2-mod-auth-mysql php5-mysql phpmyadmin
Without these packages no problems so far... Any theory? :-)

Revision history for this message
Alexander Sack (asac) wrote :

this was probably fixed in 0.6.5-0ubuntu15.

Please reopen this bug if you still see it with that version or any higher version.

Thanks,
 - Alexander

Changed in network-manager:
status: Confirmed → Fix Released
Revision history for this message
unggnu (unggnu) wrote :

Still happens in current Gutsy after resuming from suspend. Had this several times. The only solution is to kill NetworkManager with -9 parameter and restart it through "sudo /etc/dbus-1/event.d/25NetworkManager restart"

Changed in network-manager:
status: Fix Released → Confirmed
Revision history for this message
unggnu (unggnu) wrote :

Since this bug seems NetworkManager Dispatcher related I should use Bug #83623. Sorry.

Changed in network-manager:
status: Confirmed → 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.