nmbd -D uses 95% processor when there is not lan conection.

Bug #292548 reported by jbradi
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

In a laptop Toshiba Qosmio with Ubuntu 8.10 Intrepid Ibex, when lan is switched off, the process "nmbd -D" procuces quite high temperature in processor (intel centrino) caused for the high use of processor. This behabiour can lead to a future problem with the laptop because of the big use of the coolers for long time.

This problem did not happen in Ubuntu 8.04 Hardy Heron.

I have checked if the problem appears if i unplug the net from network manager, and it appears too.

I have seen a fix by restarting samba, but it is a temporary solution, I
will hope an updating for Ubuntu 8.10 that solve the problem.

To restart samba:

sudo /etc/init.d/samba restart

If someone has a better idea, it would be great.

jbradi (jbradi)
description: updated
jbradi (jbradi)
description: updated
jbradi (jbradi)
description: updated
description: updated
jbradi (jbradi)
description: updated
Revision history for this message
jbradi (jbradi) wrote :

Today update seems to have solved the problem. Thanks.

Revision history for this message
Andreas Olsson (andol) wrote :

Still no signs of this bug? Can I mark it as resolved?

Looked at the update from the 26th of november. While it does not mention anything about nmbd it does fix a memory leak, which I guess could cause all kinds of trouble.

Changed in samba:
status: New → Incomplete
Revision history for this message
jbradi (jbradi) wrote :

I have achieved to reproduce the error again.
If I am connected in a wireless network and I swich off the card from the laptop, nmbd -D process takes 90-98% of processor use.
As long as I have wireless network allways connected, it is not a problem for me, but the problem with nmbd is still there.
Thanks.

Revision history for this message
Janaka Perera (janakaclk) wrote :

I am also having the same problem with Ubuntu 8.10. I even removed the samba demons from auto start up list but somehow it's getting started in OS startup may be after an update. This problem drains my laptop battery so fast because of the CPU usage.

Thierry Carrez (ttx)
Changed in samba:
status: Incomplete → New
Revision history for this message
Ben Hodgens (ben-hodgens) wrote :
Download full text (3.2 KiB)

I seem to repeatedly trigger this bug, just in my house (laptop w/ wifi/ethernet, on Ubuntu 8.10, samba package 2:3.2.3-1ubuntu3.4). It happens if the interface itself is lost, and it -may- also happen if the IP is unassociated - I believe it depends on how your samba is configured (subnet vs. interface name for interfaces = directive), though I've not tested this 'solution'.

In my configuration (which Ubuntu was so kind to set up for me), that configuration line looks like: interfaces = 127.0.0.1/8 192.168.0.0/24

I believe it might be possible to avoid this problem by changing that to interfaces = lo eth0 (or what have you), provided your eth0 is always assigned. Alternatively, I believe that if you were to simply comment out, remove, or set the interfaces option null (just 'interfaces =').

Here is log outout from when this happens (nmbd.log) if anyone cares:

  create_subnets: Unable to create any subnet from given interfaces. Is your interface line in smb.conf correct ?
[2009/03/10 17:09:33, 0] nmbd/nmbd_subnetdb.c:create_subnets(277)
  create_subnets: Unable to create any subnet from given interfaces. Is your interface line in smb.conf correct ?
[2009/03/10 17:40:13, 0] libsmb/nmblib.c:send_udp(839)
  Packet send failed to 192.168.0.255(138) ERRNO=Invalid argument
[2009/03/10 19:10:04, 0] libsmb/nmblib.c:send_udp(839)
  Packet send failed to 192.168.0.255(138) ERRNO=Invalid argument
[2009/03/10 20:16:04, 0] libsmb/nmblib.c:send_udp(839)
  Packet send failed to 192.168.0.255(138) ERRNO=Invalid argument
[2009/03/10 22:01:04, 0] libsmb/nmblib.c:send_udp(839)
  Packet send failed to 192.168.0.255(138) ERRNO=Invalid argument
[2009/03/10 23:58:04, 0] libsmb/nmblib.c:send_udp(839)
  Packet send failed to 192.168.0.255(138) ERRNO=Invalid argument
[2009/03/10 23:58:04, 0] nmbd/nmbd.c:reload_interfaces(285)
  reload_interfaces: No subnets to listen to. Waiting..
[2009/03/11 00:21:13, 0] libsmb/nmblib.c:send_udp(839)
  Packet send failed to 192.168.0.255(138) ERRNO=Invalid argument
[2009/03/11 00:21:13, 0] nmbd/nmbd.c:reload_interfaces(285)
  reload_interfaces: No subnets to listen to. Waiting..
[2009/03/11 00:26:44, 0] libsmb/nmblib.c:send_udp(839)
  Packet send failed to 192.168.0.255(138) ERRNO=Invalid argument
[2009/03/11 03:22:44, 0] libsmb/nmblib.c:send_udp(839)
  Packet send failed to 192.168.0.255(138) ERRNO=Invalid argument
[2009/03/11 03:24:45, 0] libsmb/nmblib.c:send_udp(839)
  Packet send failed to 192.168.0.255(138) ERRNO=Invalid argument
[2009/03/11 03:25:44, 0] libsmb/nmblib.c:send_udp(839)
  Packet send failed to 192.168.0.255(138) ERRNO=Invalid argument
[2009/03/11 03:25:44, 0] libsmb/nmblib.c:send_udp(839)
  Packet send failed to 192.168.0.255(137) ERRNO=Network is unreachable
[2009/03/11 03:25:44, 0] nmbd/nmbd_packets.c:send_netbios_packet(160)
  send_netbios_packet: send_packet() to IP 192.168.0.255 port 137 failed
[2009/03/11 03:25:44, 0] nmbd/nmbd_namequery.c:query_name(244)
  query_name: Failed to send packet trying to query name GEEK<1d>
[2009/03/11 03:25:44, 0] nmbd/nmbd.c:reload_interfaces(285)
  reload_interfaces: No subnets to listen to. Waiting..

I am uncertain at which stage in that error lo...

Read more...

Revision history for this message
Ben Hodgens (ben-hodgens) wrote :

Janaka - I would suggest going into /etc/rc#.d and moving the S20samba to K20samba, if you have not done so already. This should stop samba from starting on boot.

Revision history for this message
Ben Hodgens (ben-hodgens) wrote :

This bug is easily reproducible with a fairly stock Ubuntu install of Samba if one switches networks.

Changed in samba:
status: New → Confirmed
Revision history for this message
jbradi (jbradi) wrote :

I have installed Ubuntu 9.04 and the problem is solved on this release.

Revision history for this message
Ben Hodgens (ben-hodgens) wrote :

I should note that this or a similar problem is noticeable on Debian Lenny - ie, high CPU usage by samba. This may or may not be related to CUPS on Debian: restarting samba alone doesn't fix it on the debian machine, but restarting cups -then- samba does.

I've not noticed the problem in Ubuntu 9.04 yet, but the only machine I've got it on is connected via ethernet.

Revision history for this message
Björn Jacke (bjoern-j3e) wrote :

can you please test if https://bugzilla.samba.org/attachment.cgi?id=4850 helps?

Thanks
Björn

Revision history for this message
Chuck Short (zulcss) wrote :

This should be resolved for lucid, please re-open if it isnt.

Regards
chuck

Changed in samba (Ubuntu):
status: Confirmed → Fix Committed
status: Fix Committed → 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.