Bug 6476 - more then 3000 smbd-zomies in memory
Summary: more then 3000 smbd-zomies in memory
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.4
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: x86 Linux
: P3 normal
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-14 17:23 UTC by Dieter Ferdinand
Modified: 2009-06-19 06:54 UTC (History)
1 user (show)

See Also:
jra: review+


Attachments
Patch for 3.3 (2.19 KB, patch)
2009-06-16 08:17 UTC, Volker Lendecke
no flags Details
Fix for 3.4.0 (817 bytes, patch)
2009-06-17 15:33 UTC, Jeremy Allison
no flags Details
Patch for 3.3 (1.13 KB, patch)
2009-06-17 16:59 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dieter Ferdinand 2009-06-14 17:23:03 UTC
hello,
i have installed samba 3.3.4 on some linux-systems last week and today, i have problems with one system, because i have more then 4000 processes in memory.

i find out, that there are many zombie-processes from smbd und after i kill all smbd-processes, i have less then 200 processes in memory!

i check this on the other systems and i find also smbd-zombies:
 2408 ?        Ss     1:54 smbd -l /var/log/samba -s /etc/samba/smb.conf
 2410 ?        Z      0:00 [smbd] <defunct>
 2844 ?        Z      0:00 [smbd] <defunct>
14278 ?        Z      0:00 [smbd] <defunct>
24234 ?        Z      0:00 [smbd] <defunct>
29970 ?        Z      0:00 [smbd] <defunct>
 3666 ?        Z      0:00 [smbd] <defunct>
14151 ?        Z      0:00 [smbd] <defunct>
 2364 ?        Z      0:00 [smbd] <defunct>

with this pstree:
-smbd(2408)-+-smbd(2410)
            |-smbd(2844)
            |-smbd(14278)
            |-smbd(24234)
            |-smbd(29970)
            |-smbd(3666)
            |-smbd(14151)
            `-smbd(2364)

if i don't kill this zombies by killing the root-daemon, then they kill my system!

at the moment, i compile some older version, to find out, which version produce this error.

goodby
Comment 1 Volker Lendecke 2009-06-15 01:00:20 UTC
What kernel is this?

Can you start an strace -p <parent-pid>, and do a

kill -CHLD <parent-pid>

and see what happens? And, while doing the strace, can you do a 

smbclient -L <server> -U%

please upload that strace output.

Thanks,

Volker
Comment 2 Dieter Ferdinand 2009-06-15 04:34:28 UTC
hello,
i have compiled all version from 3.2.0 to 3.3.4 to test which produce zombies.

since version 3.2.6 i got zombies.

with version 3.2.5 it works. but i will make a longer test, to be sure.

goodby
Comment 3 Volker Lendecke 2009-06-15 04:56:02 UTC
Okay... you have a fast box, don't you? Compiling takes a while.

If you *really* want to nail the patch that broke it for you, you can use git bisect: Download the git tree according to

http://wiki.samba.org/index.php/Using_Git_for_Samba_Development

Then do:

git bisect start
git bisect good release-3-2-5
git bisect bad release-3-2-6

git bisect then leaves you with a source tree that you can compile and test. If the test is ok, say "git bisect good", if it gives you zomies, say "git bisect bad". Then it will give you the next source tree until you arrive at the one that is the culprit. It should get you there with at most 7-8 tests.

Volker
Comment 4 Dieter Ferdinand 2009-06-15 12:32:35 UTC
hello,
i can't make this trace for you, because i use samba as service with xinetd.

but i have run it for test as daemon and after some hours, i have no zombie.

i think, smbd produce this zombies only, if it is used as service with xinetd
(or inetd ?).

i will try, to get a trace for you for this configuration as soon as possible.

goodby
Comment 5 Dieter Ferdinand 2009-06-15 13:16:44 UTC
hello,
i have one strace for the access with smbclient.
but i can't upload it, because bugzilla send me an error-message from cgi-script.

you can download it here for some time:
http://vnc.dieter-ferdinand.de/download/linux/smbd.22121.log.gz

but i can't check, if there was two zombies, because i can't check this with ps.
my system is too fast for this.

i can make you a strace with regular access to the fileserver if needed.
this produce two zombies every time.

goodby
Comment 6 Volker Lendecke 2009-06-15 13:21:03 UTC
Ok, ok. That's a different situation. I think the xinetd configuration hasn't been tested for a while. Can you retry with the standard standalone smbd?

Thanks,

Volker
Comment 7 Volker Lendecke 2009-06-15 13:23:44 UTC
Yes, a trace that does produce zombies would be helpful
Comment 8 Dieter Ferdinand 2009-06-16 03:38:17 UTC
hello,
i have a trace for you with two zombies:
http://vnc.dieter-ferdinand.de/download/linux/smbd.528.log.gz

i hope, this will help you.
the trace is from version 3.3.4.

i have some problems with git bisect. i can only compile the first version, all others, i get errors with lost files or existing files.

goodby
Comment 9 Volker Lendecke 2009-06-16 08:17:21 UTC
Created attachment 4296 [details]
Patch for 3.3

Can you try the attached patch? It fixes some zombies for me.

Jeremy, this has to do with the async cups printcap updater. Please also take a look.

Thanks,

Volker
Comment 10 Jeremy Allison 2009-06-17 15:33:00 UTC
Created attachment 4301 [details]
Fix for 3.4.0

This fixes the [x]inetd zombies problem for me. Backports soon to 3.3.x and 3.2.x.
Jeremy.
Comment 11 Jeremy Allison 2009-06-17 16:59:56 UTC
Created attachment 4303 [details]
Patch for 3.3

This fixes the problem using 3.3 with [x]inetd here - please test.
Jeremy
Comment 12 Jeremy Allison 2009-06-17 17:16:57 UTC
The patch for 3.3 also applies cleanly to 3.2.
Volker can you please review ? Thanks !
Jeremy.
Comment 13 Volker Lendecke 2009-06-18 04:02:59 UTC
Tested both the 3.3 and 3.4 patches. Work fine for me. Thanks!

Volker
Comment 14 Karolin Seeger 2009-06-18 04:58:27 UTC
Pushed to v3-4-test, v3-3-test and v3-2-test. Will be included in the next releases.
Closing out bug report.

Thanks!
Comment 15 Dieter Ferdinand 2009-06-19 06:54:27 UTC
hello,
patch works.

no more zombies on connect.

goodby