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.
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.
net/samba48 expired today, is this relevant for net/samba410?
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.
It appears this is a bad interaction between QEMU/libslirp and samba. Fixed in https://gitlab.freedesktop.org/slirp/libslirp/-/merge_requests/61 Should hopefully arrive in upstream QEMU soon.