[Samba] smbd processes 99% cpu and end-user locks up

Martin Zielinski mz at seh.de
Wed Oct 19 14:51:20 GMT 2005


On Linux the syntax is gdb -p <pid>.
                            ^^^
The "..39389: No such file..." message seems to tell, that you didn't 
attach to the process but tried to debug a file called 39389.



Nathan Vidican wrote:
> Okay, re-compiled with -g, (I think), assuming the -g was to CFLAGS, I 
> attached the output of ./configure --prefix=/usr/samba CFLAGS=-g, the 
> output of make, and the warnings reported by make.
> 
> When I run a `top` and get an output similar to this (pardon the 
> word-wrap mangling):
> 
> last pid: 39681;  load averages:  1.04,  1.02,  0.88   up 3+17:11:28 
> 10:06:34
> 67 processes:  1 running, 66 sleeping
> CPU states:  6.9% user,  0.0% nice, 43.1% system,  0.0% interrupt, 50.0% 
> idle
> Mem: 56M Active, 1530M Inact, 228M Wired, 59M Cache, 213M Buf, 9144K Free
> Swap: 4087M Total, 48K Used, 4087M Free
> 
>   PID USERNAME       THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU 
> COMMAND
> 39389 root             1 114    0 30716K  8704K CPU0   0  33:04 99.17% smbd
>   494 ldap             4  20    0   118M  7768K kserel 0   0:20  0.00% 
> slapd
>  7249 root             1  96    0 21460K  4188K select 0   0:07  0.00% 
> cupsd
>   318 root             1  96    0  3532K   940K select 0   0:03  0.00% 
> syslogd
> 39470 root             1  96    0 30852K  8836K select 0   0:03  0.00% smbd
> 39505 pcarlini         1  96    0 31256K  9292K select 1   0:03  0.00% smbd
> 
> 
> I then tried a 'gdb 39389', which gave me a prompt something like this:
> 
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you 
> are
> welcome to change it and/or distribute copies of it under certain 
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "amd64-marcel-freebsd"...39389: No such file 
> or directory.
> 
> (gdb)
> 
> Where I then tried 'bt' as you instructed and got:
> 
> (gdb) bt
> No stack.
> (gdb)
> 
> What am I doing wrong? Admittedly never done anything before with gdb 
> and not too sure of what I'm doing here... assuming CFLAGS=-g was what 
> you meant by compile smbd with -g, and I didn't get any warnings running 
> gdb <pid>, so assuming it worked... what next?
> 
> 


-- 
Martin Zielinski             mz at seh.de
Software Development
SEH Computertechnik GmbH     www.seh.de


More information about the samba mailing list