[Samba] Server crashes every hour at mass logout, smbd at 100% CPU

malte.mueller at ewetel.net malte.mueller at ewetel.net
Mon Feb 23 08:55:42 GMT 2009

my server crashes every 90 minutes. There is no helpfull message in  
any logfile, the only thing i can see is that smbd consumes 100% CPU.  
The server hangs completely, no access to console, no networking. This  
might have something to do with user logout. This server stands in a  
school and about 150 pupils log out after each lesson. I assume it has  
nothing to with printing, as printing is done directly over cups. I  
use loglevel 2.
My smb.conf (excluding many shares):
	workgroup = ORG_ANYWHERE
	netbios aliases = fileserver silber
	passdb backend = ldapsam:ldap://localhost
         encrypt passwords = true
         idmap backend = ldap:"ldap://localhost"
	ldap suffix = dc=org_anywhere,dc=schule
	ldap user suffix = ou=accounts
	ldap group suffix = ou=groups
	ldap machine suffix = ou=hardware
	ldap idmap suffix = ou=idmap
	idmap uid = 80000-799999
	idmap gid = 800000-900000
	ldap admin dn = cn=root,dc=org_anywhere,dc=schule
	ldap ssl = off
	invalid users = @wheel, mail, daemon, adt
	interfaces =
	bind interfaces only = yes
	log level = 2
	syslog = 2
	log file = /var/log/samba-%G.log
	getwd cache = yes
	keep alive = 60
	dead time = 50

	share modes = yes
	max xmit = 17384
	locking = yes
	map hidden = yes
	map archive = yes
	map system = yes

	security = user
	encrypt passwords = yes
	domain master = yes
	domain logons = yes
	preferred master = yes
	wins support = yes
	os level = 30
	time server = yes
	logon script = %U.cmd

	logon path =
	logon home =
	logon drive = p:

   	#printing =
   	#printing = cups
	#load printers = yes
	#printcap name = cups

	dos charset = 850
	unix charset = ISO-8859-15
	display charset = ISO-8859-15

	#comment = BBS1-Drucker
	#path = /var/spool/drucker
	##browsable = no
	#browsable = yes
	#public = yes
         #guest ok = yes
	#writable = no
	#printable = yes
	#printer admin = root, administrator, weissmann, @lehrer
	##admin users = @lehrer

	#comment = Druckertreiber
	#path = /samba/druckertreiber
	##browsable = yes
	#browsable = no
	##guest ok = no
	#guest ok = yes
	#read only = no
	#write list = administrator, root

	comment = Anmeldedienst fuer die Domaene
	path = /samba/netlogon/%G
	locking = no
	public = yes
	writable = no
	browsable = no
	guest ok = no
	volume = "Netzwerk"
	#login script %u.bat is created by this process:
	root preexec = /usr/local/src/samba-scripte/netlogon-preexec.sh %u %I  
%m %T %G

	comment = Benutzerprofile
	path = /samba/profile
	create mode = 0600
	#force group = susers
	directory mode = 0700
	writable = yes
	browsable = no
	profile acls = yes

	create mode = 0764
	browseable = no
	valid users = %S
	guest ok = no
	writeable = yes
	path = /home/%G/%U
	volume = home
I compiled Samba3.3.0 on OpenSUSE 11.1 with this flags:
Using FLAGS      =  -O -D_SAMBA_BUILD_=3  
-I/usr/local/src/samba-3.3.0/source/iniparser/src -Iinclude  
-I./include  -I. -I. -I./lib/replace -I./lib/talloc  
-I./lib/tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H   
-I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include  
-I./libaddns -I./librpc -I./popt -DLDAP_DEPRECATED   -I/include  
-I/usr/local/src/samba-3.3.0/source/lib -D_SAMBA_BUILD_=3
       PICFLAG    = -fPIC
       LIBS       = -lcrypt -lresolv -lnsl -ldl
       LDFLAGS    = -pie -Wl,-z,relro -L/usr/lib64 -L./bin
       DYNEXP     = -Wl,--export-dynamic
       LDSHFLAGS  = -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib64 -L./bin
       SHLIBEXT   = so
       SONAMEFLAG = -Wl,-soname=
BTW: I tried to set CFLAGS to -O0 with export CFLAGS="-O0" but "-O"  
isn't the same as "-O0"?

What can I do to reproduce that error? Simply logging out or shutting  
down _one_ PC does not suffice.
What can I do to track down my error?
This error occured after the update to OpenSUSE 11.1. The official  
SuSE version had the same weakness.
The owner of the hanging smbd is root.
I changed from nss-ldapd to nss-ldap but that didn't help me with this  

Any help is appreciated, thanks a lot
M. Mueller

More information about the samba mailing list