[Samba] Samba 3.0.x and high processor utilication caused by
/etc/passwd access
Böringer, Heiko
heiko.boeringer at epost.de
Thu Jul 29 18:18:22 GMT 2004
Hello together,
since upgrading on samba 3.0.x (issue happens with all 3.0. release) the
cpu-load on my samba PDC ist constantly near 100%. The cpu power ist
consumed by all running smb-processes. Systrace shows me that the smb
processes tried to access to /etc/passwd on a permanent basis. My question
is: Why tries samba to access etc/passwd so often and produces this high
cpu-load?
Regards,
Heiko Böringer
Rights for smbpasswd are set as following
################################################################
-rw-r--r-- 1 root root 5540 Jul 27 15:15 passwd
Systemconfiguration
################################################################
- Debian 3.0 (Woddy)
- Samba with an the samba3.0.5.deb from the unstable tree (but happends
with
all other versions too)
- Configured als PDC with SMBPASSWD Authentification (no windbind, kerberos,
ldap..)
TOP shows the following
################################################################
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
19094 nobody 18 0 3872 3872 3440 R 8.7 0.7 43:22 smbd
5213 nobody 18 0 3784 3784 3400 R 8.7 0.7 29:43 smbd
9345 nobody 17 0 4100 4100 3628 R 8.7 0.7 29:24 smbd
10237 nobody 19 0 3772 3772 3400 R 8.7 0.7 29:06 smbd
17121 nobody 17 0 4140 4140 3632 R 8.7 0.8 28:02 smbd
20776 nobody 18 0 3668 3668 3324 R 8.7 0.7 27:48 smbd
17915 nobody 18 0 3768 3768 3388 R 8.7 0.7 46:35 smbd
18441 nobody 17 0 4128 4128 3640 R 8.5 0.7 45:16 smbd
25605 nobody 18 0 3784 3784 3400 R 8.5 0.7 6:38 smbd
1065 root 16 0 5504 5504 3928 R 7.1 1.0 0:59 smbd
28475 root 9 0 4280 4280 3700 S 0.3 0.8 0:02 smbd
Systrace on one of the smbd processes shows the following:
################################################################
open("/etc/passwd", O_RDONLY) = 26
fcntl64(26, F_GETFD) = 0
fcntl64(26, F_SETFD, FD_CLOEXEC) = 0
_llseek(26, 0, [0], SEEK_CUR) = 0
fstat64(26, {st_mode=S_IFREG|0644, st_size=5540, ...}) = 0
mmap2(NULL, 5540, PROT_READ, MAP_SHARED, 26, 0) = 0x40510000
_llseek(26, 5540, [5540], SEEK_SET) = 0
fstat64(26, {st_mode=S_IFREG|0644, st_size=5540, ...}) = 0
munmap(0x40510000, 5540) = 0
close(26) = 0
open("/etc/passwd", O_RDONLY) = 26
fcntl64(26, F_GETFD) = 0
fcntl64(26, F_SETFD, FD_CLOEXEC) = 0
_llseek(26, 0, [0], SEEK_CUR) = 0
fstat64(26, {st_mode=S_IFREG|0644, st_size=5540, ...}) = 0
mmap2(NULL, 5540, PROT_READ, MAP_SHARED, 26, 0) = 0x40510000
_llseek(26, 5540, [5540], SEEK_SET) = 0
fstat64(26, {st_mode=S_IFREG|0644, st_size=5540, ...}) = 0
munmap(0x40510000, 5540) = 0
close(26) = 0
open("/etc/passwd", O_RDONLY) = 26
fcntl64(26, F_GETFD) = 0
fcntl64(26, F_SETFD, FD_CLOEXEC) = 0
_llseek(26, 0, [0], SEEK_CUR) = 0
fstat64(26, {st_mode=S_IFREG|0644, st_size=5540, ...}) = 0
mmap2(NULL, 5540, PROT_READ, MAP_SHARED, 26, 0) = 0x40510000
_llseek(26, 5540, [5540], SEEK_SET) = 0
fstat64(26, {st_mode=S_IFREG|0644, st_size=5540, ...}) = 0
munmap(0x40510000, 5540) = 0
close(26) = 0
socket(PF_UNIX, SOCK_STREAM, 0) = 26
connect(26, {sin_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = -1
ECONNREFUSED (Connection refused)
close(26) = 0
open("/etc/passwd", O_RDONLY) = 26
fcntl64(26, F_GETFD) = 0
fcntl64(26, F_SETFD, FD_CLOEXEC) = 0
_llseek(26, 0, [0], SEEK_CUR) = 0
fstat64(26, {st_mode=S_IFREG|0644, st_size=5540, ...}) = 0
mmap2(NULL, 5540, PROT_READ, MAP_SHARED, 26, 0) = 0x40510000
_llseek(26, 5540, [5540], SEEK_SET) = 0
fstat64(26, {st_mode=S_IFREG|0644, st_size=5540, ...}) = 0
munmap(0x40510000, 5540) = 0
close(26) = 0
open("/etc/passwd", O_RDONLY) = 26
fcntl64(26, F_GETFD) = 0
fcntl64(26, F_SETFD, FD_CLOEXEC) = 0
_llseek(26, 0, [0], SEEK_CUR) = 0
fstat64(26, {st_mode=S_IFREG|0644, st_size=5540, ...}) = 0
mmap2(NULL, 5540, PROT_READ, MAP_SHARED, 26, 0) = 0x40510000
_llseek(26, 5540, [5540], SEEK_SET) = 0
fstat64(26, {st_mode=S_IFREG|0644, st_size=5540, ...}) = 0
munmap(0x40510000, 5540) = 0
close(26) = 0
And here?s the smb.conf
##################################################################
[global]
unix charset = ISO8859-1
display charset = ISO8859-1
workgroup = RVMO.DE
server string = %h
obey pam restrictions = Yes
# unix password sync = false
# encrypt passwords = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n
*Retype\snew\sUNIX\spassword:* %n\n .
#For verbose debug: 5
log level = 3
syslog = 3
# End logging section
log file = /var/log/samba/log.%m
log file = /var/log/samba/log.%m
max log size = 1000
logon script = netlogon.cmd
logon path =
logon drive = L:
logon home =
domain logons = Yes
os level = 40
preferred master = Yes
domain master = Yes
dns proxy = No
ldap ssl = no
panic action = /usr/share/samba/panic-action %d
idmap uid = 100-20000
idmap gid = 100-20000
admin users = @smb-o-admin-it
hosts allow = 127.0.0.1, 192.168.1.0/255.255.0.0
printing = cups
printer admin = @smb-o-basisarbeitsplatz
printcap name = /etc/printcap.cups
# print command = lpr-cups -P %p -o raw %s -r
load printers = Yes
use client driver = No
the rest are share definitions....
________________________________________
http://www.epost.de - das Kommunikationsportal der Deutschen Post
More information about the samba
mailing list