[Samba] runaway smbd hogging system & ethernet cable bandwidth

Gene Heskett gene.heskett at verizon.net
Tue Jan 27 23:14:03 GMT 2004


Greetings all;

I've probably got something miss-configured, but I have an 
intermittent smbd problem, where it will use 15% or so of this 
machine and nearly all the much slower firewall box.

I'll try to give enough data here, so my apologies about the length of 
this post.

The installed samba versions on this very heavily patched RH8.0 
machine are:
---
[root at coyote root]# rpm -qa|grep samba
samba-2.2.7-5.8.0
samba-common-2.2.7-5.8.0
samba-client-2.2.7-5.8.0
---

ssh'ing into the firewall, a RH7.3 with updates I get this:
---
[root at gene root]# rpm -qa|grep samba
samba-client-2.2.7-3.7.3
samba-2.2.7-3.7.3
samba-common-2.2.7-3.7.3
samba-swat-2.2.7-3.7.3
---
I have a script on each machine what is started at bootup from a link 
in the rc3.d dir that looks like this on the firewall:
---/etc/init.d/asmb---
#!/bin/sh

# chkconfig: 345 35 65
# description: The local samba shares starter
start()
{	echo Starting share coyote:
	mount -t smbfs -o 
username=root,password=xxxxxxxxx //coyote.coyote.den/public /mnt/coyote
	mount -t smbfs -o 
username=root,password=xxxxxxxxx //coyote.coyote.den/root /mnt/coyoteroot
	mount -t smbfs -o 
username=root,password=xxxxxxxxx //coyote.coyote.den/home /mnt/coyotehome
	mount -t smbfs -o 
username=root,password=xxxxxxxxx //coyote.coyote.den/usr /mnt/coyoteusr
	mount -t smbfs -o 
username=root,password=xxxxxxxxx //coyote.coyote.den/opt /mnt/coyoteopt
}

stop()
{
	echo Stopping share coyote:
	umount /mnt/coyote
	umount /mnt/coyoteroot
	umount /mnt/coyotehome
	umount /mnt/coyoteusr
	umount /mnt/coyoteopt
}

restart()
{
	stop
	start
}

case "$1" in
  start)
  	start
	;;
  stop)
  	stop
	;;
  restart)
  	restart
	;;
*)
	echo $"Usage: $0 {start|stop|restart}"
	exit 1
esac

exit
---
passwords blanked for obvious reasons.  FQDN's are in the hosts file 
of course.

The equivalent script on this machine is:
---
#!/bin/sh

start()
{ echo Starting share gene:
  mount -t smbfs -o 
username=root,password=xxxxxxxxx //gene.coyote.den/public /mnt/gene
  echo Starting share dlds:
  mount -t smbfs -o 
username=root,password=xxxxxxxxx //gene.coyote.den/dlds /mnt/dlds
}

stop()
{ echo Stopping share gene:
  umount /mnt/gene
  echo Stopping share dlds:
  umount /mnt/dlds
}

restart()
{ 
  stop
  start
}

case "$1" in
  start)
  	start
	;;
  stop)
  	stop
	;;
  restart)
  	restart
	;;
  *)
	echo $"Usage: $0 {start|stop|restart"
	exit 1
esac

exit $?
---
The problem was finally found when I tried to restart these scripts on 
both ends, and kept getting a message that "coyoteroot" was busy, 
this while ksysguard was showing smbd as using quite a few percent of 
the cpu.

While it was busy a 2 second run of tcpdump got 1132 packets!  A few 
of them are here:
---
17:07:23.137632 gene.coyote.den.netbios-ssn > 
coyote.coyote.den.33032: . 105351:106791(1440) ack 88591 win 5760 
<nop,nop,timestamp 46044383 40014948>NBT Packet (DF)
17:07:23.137711 coyote.coyote.den.33032 > 
gene.coyote.den.netbios-ssn: . ack 106791 win 8640 <nop,nop,timestamp 
40015059 46044383> (DF)
17:07:23.137752 gene.coyote.den.netbios-ssn > 
coyote.coyote.den.33032: . 106791:108231(1440) ack 88591 win 5760 
<nop,nop,timestamp 46044383 40014948>NBT Packet (DF)
17:07:23.137874 gene.coyote.den.netbios-ssn > 
coyote.coyote.den.33032: . 108231:109671(1440) ack 88591 win 5760 
<nop,nop,timestamp 46044383 40014948>NBT Packet (DF)
17:07:23.137885 coyote.coyote.den.33032 > 
gene.coyote.den.netbios-ssn: . ack 109671 win 8640 <nop,nop,timestamp 
40015059 46044383> (DF)
17:07:23.137997 gene.coyote.den.netbios-ssn > coyote.coyote.den.33032: 
P 109671:111111(1440) ack 88591 win 5760 <nop,nop,timestamp 46044383 
40014948>NBT Packet (DF)
---

What sort of a feedback loop do I have here?,

and how to prevent it in the future?

I've been using these scripts for about 2 years, and this hog the 
machine thing has been going on for about 4 or 5 months.
The problem has not re-asserted itself when I restarted the scripts, 
but no doubt will in due time.

Any hints will be gleefully chased at this point although I may need 
some hand-holding.  This thing is eating enough cpu that when its not 
doing it for a whole day, I can do 5 packets of seti, but when its 
acting up, only 3 on really bad days.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty: soap,
ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.22% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attornies please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.


More information about the samba mailing list