Bug 236715 - net/samba48: samba leaves lots of zombie processes around
Summary: net/samba48: samba leaves lots of zombie processes around
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Timur I. Bakeyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-22 14:02 UTC by Alex Richardson
Modified: 2019-12-16 10:10 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (timur)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Richardson freebsd_committer 2019-03-22 14:02:40 UTC
I am using samba in QEMU (with the -net smb=/path/to/hostdir) to share directories between QEMU and the host.
It seems like samba is spawning a new process every 30 minutes and not reaping it. 

alr48       1066    0.0  0.0       0      0  -  Z    11:51         0:00.00 <defunct>
alr48       1092    0.0  0.0       0      0  -  Z    11:51         0:00.00 <defunct>
alr48       1095    0.0  0.0       0      0  -  Z    11:51         0:00.00 <defunct>
alr48       1697    0.0  0.0       0      0  -  Z    12:06         0:00.00 <defunct>
alr48       2206    0.0  0.0       0      0  -  Z    12:06         0:00.00 <defunct>
alr48       2663    0.0  0.0       0      0  -  Z    12:06         0:00.00 <defunct>
alr48      21569    0.0  0.0       0      0  -  Z    12:21         0:00.00 <defunct>
alr48      22064    0.0  0.0       0      0  -  Z    12:21         0:00.00 <defunct>
alr48      22233    0.0  0.0       0      0  -  Z    12:21         0:00.00 <defunct>
alr48      26734    0.0  0.0       0      0  -  Z    12:36         0:00.00 <defunct>
alr48      26737    0.0  0.0       0      0  -  Z    12:36         0:00.00 <defunct>
alr48      26783    0.0  0.0       0      0  -  Z    12:36         0:00.00 <defunct>
alr48      33804    0.0  0.0       0      0  -  Z    12:51         0:00.00 <defunct>
alr48      33835    0.0  0.0       0      0  -  Z    12:51         0:00.00 <defunct>
alr48      33872    0.0  0.0       0      0  -  Z    12:51         0:00.00 <defunct>
alr48      37798    0.0  0.0       0      0  -  Z    13:06         0:00.00 <defunct>
alr48      37836    0.0  0.0       0      0  -  Z    13:06         0:00.01 <defunct>
alr48      37859    0.0  0.0       0      0  -  Z    13:06         0:00.00 <defunct>
alr48      39687    0.0  0.0       0      0  -  Z    13:21         0:00.00 <defunct>
alr48      39717    0.0  0.0       0      0  -  Z    13:21         0:00.01 <defunct>
alr48      39744    0.0  0.0       0      0  -  Z    13:21         0:00.00 <defunct>
alr48      46892    0.0  0.0       0      0  -  Z    13:36         0:00.01 <defunct>
alr48      46893    0.0  0.0       0      0  -  Z    13:36         0:00.01 <defunct>
alr48      46894    0.0  0.0       0      0  -  Z    13:36         0:00.00 <defunct>
alr48      47110    0.0  0.0       0      0  -  Z    13:51         0:00.00 <defunct>
alr48      47111    0.0  0.0       0      0  -  Z    13:51         0:00.00 <defunct>
alr48      47112    0.0  0.0       0      0  -  Z    13:51         0:00.00 <defunct>
alr48      98399    0.0  0.0       0      0  -  Z    11:36         0:00.01 <defunct>
alr48      98414    0.0  0.0       0      0  -  Z    11:36         0:00.01 <defunct>

All of these processes are children of the smbd process: `/usr/local/sbin/smbd -l /tmp/qemu-smb.7LGXYZ -s /tmp/qemu-smb.7LGXYZ/smb.conf`
I haven't tried building a newer version of samba to see if that bug has been fixed. I will report back once I have done.
Comment 1 Alex Richardson freebsd_committer 2019-03-22 15:05:07 UTC
I just tried buiding samba 4.10 from source and it seems to have the same problem.

When I run the same command on Linux or macOS I don't see the zombie processes so this must be due to some #ifdefs / configuration options in the samba port that cause processes to be spawned every 30 minutes without reaping them.
Comment 2 Rene Ladan freebsd_committer 2019-12-15 17:25:10 UTC
net/samba48 expired today, is this relevant for net/samba410?
Comment 3 Alex Richardson freebsd_committer 2019-12-16 10:10:50 UTC
Yes still present. I've reported it upstream and they can confirm it happens for 4.10: https://bugzilla.samba.org/show_bug.cgi?id=13887#c2.