main smbd uses 99% of CPU

Simo Sorce idra at samba.org
Wed Dec 15 22:15:30 GMT 2004


This evening I found out one of my 3.0.9 installations was running very
slow.

The main smbd was on 99% CPU, attached strace gave the following output
in 10-20 seconds.

Unfortunately it's very late here, had no time to check further and
restarted the service.

Any idea?

Simo.

# strace -p 20403
Process 20403 attached - interrupt to quit
select(1024, [18 19 20 21 22], NULL, NULL, NULL) = ? ERESTARTNOHAND (To
be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(-1, NULL, WNOHANG)              = 22926
waitpid(-1, NULL, WNOHANG)              = 0
sigreturn()                             = ? (mask now [FPE USR2 PIPE])
select(1024, [18 19 20 21 22], NULL, NULL, NULL) = 1 (in [18])
time(NULL)                              = 1103148650
stat64("", 0xbfff77a0)                  = -1 ENOENT (No such file or
directory)
umask(022)                              = 0
open("/var/log/samba/smbd.log", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE,
0644) = 24
close(5)                                = 0
umask(0)                                = 022
dup2(24, 2)                             = 2
stat64("/etc/samba/smb.conf", {st_mode=S_IFREG|0644, st_size=4252, ...})
= 0
accept(18, {sa_family=AF_INET, sin_port=htons(37774),
sin_addr=inet_addr("131.175.123.157")}, [16]) = 5
fcntl64(5, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(5, F_SETFL, O_RDWR)             = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb75e6848) = 23227
close(5)                                = 0
select(1024, [18 19 20 21 22], NULL, NULL, NULL) = ? ERESTARTNOHAND (To
be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(-1, NULL, WNOHANG)              = 23227
waitpid(-1, NULL, WNOHANG)              = 0
sigreturn()                             = ? (mask now [FPE USR2 PIPE])
select(1024, [18 19 20 21 22], NULL, NULL, NULL) = 1 (in [19])
time(NULL)                              = 1103148663
accept(19, {sa_family=AF_INET, sin_port=htons(60895),
sin_addr=inet_addr("131.175.127.109")}, [16]) = 5
fcntl64(5, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(5, F_SETFL, O_RDWR)             = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb75e6848) = 23262
close(5)                                = 0
select(1024, [18 19 20 21 22], NULL, NULL, NULL) = ? ERESTARTNOHAND (To
be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(-1, NULL, WNOHANG)              = 23262
waitpid(-1, NULL, WNOHANG)              = 0
sigreturn()                             = ? (mask now [FPE USR2 PIPE])
select(1024, [18 19 20 21 22], NULL, NULL, NULL) = 1 (in [18])
time(NULL)                              = 1103148667
accept(18, {sa_family=AF_INET, sin_port=htons(60265),
sin_addr=inet_addr("131.175.127.80")}, [16]) = 5
fcntl64(5, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(5, F_SETFL, O_RDWR)             = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb75e6848) = 23273
close(5)                                = 0
select(1024, [18 19 20 21 22], NULL, NULL, NULL) = ? ERESTARTNOHAND (To
be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(-1, NULL, WNOHANG)              = 23074
waitpid(-1, NULL, WNOHANG)              = 0
sigreturn()                             = ? (mask now [FPE USR2 PIPE])
select(1024, [18 19 20 21 22], NULL, NULL, NULL) = 1 (in [18])
time(NULL)                              = 1103148689
accept(18, {sa_family=AF_INET, sin_port=htons(54470),
sin_addr=inet_addr("131.175.127.80")}, [16]) = 5
fcntl64(5, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(5, F_SETFL, O_RDWR)             = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb75e6848) = 23332
close(5)                                = 0
select(1024, [18 19 20 21 22], NULL, NULL, NULL) = 1 (in [19])
time(NULL)                              = 1103148696
accept(19, {sa_family=AF_INET, sin_port=htons(34632),
sin_addr=inet_addr("131.175.122.157")}, [16]) = 5
fcntl64(5, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(5, F_SETFL, O_RDWR)             = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb75e6848) = 23352
close(5)                                = 0
select(1024, [18 19 20 21 22], NULL, NULL, NULL) = ? ERESTARTNOHAND (To
be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(-1, NULL, WNOHANG)              = 23133
waitpid(-1, NULL, WNOHANG)              = 0
sigreturn()                             = ? (mask now [FPE USR2 PIPE])


-- 
Simo Sorce    -  idra at samba.org
Samba Team    -  http://www.samba.org
Italian Site  -  http://samba.xsec.it



More information about the samba-technical mailing list