Bug 10046 - smbd child process dumps core on exit
Summary: smbd child process dumps core on exit
Status: NEW
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-25 07:55 UTC by Daniel Gan-Levi (dead mail address)
Modified: 2013-07-25 08:42 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Gan-Levi (dead mail address) 2013-07-25 07:55:12 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.