The Samba-Bugzilla – Bug 10046
smbd child process dumps core on exit
Last modified: 2013-07-25 08:42:59 UTC
I've had some instances where smbd child process dumps core while closing connection on exit. The culprit seems to be that when it tries to exit cleanly, the share directory is already deleted (this is after the share is removed from the configuration and SIGHUP is sent to smbd to re-read it).
In smbXsrv_tcon_disconnect(), set_current_service() gets called with do_chdir=true, and since the directory is already not there, it fails. This failure bubbles up to exit_server_common(), where it causes dump_core() to be called. Changing the call to set_current_service() with do_chdir=false makes the core dump events disappear.