Samba sometimes does not dump core on a SIGSEGV etc

Richard Sharpe realrichardsharpe at gmail.com
Fri Oct 14 04:00:18 MDT 2011


On Thu, Oct 13, 2011 at 9:38 PM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
> Hi folks,
>
> When I was working on the Ceph VFS I noticed that Samba would not dump
> core in the VFS when I caused a SIGSEGV.
>
> In looking at this same problem elsewhere, it seems that this might be
> because in the VFS Samba has done a setreuid to the mapped user, and
> the Linux kernel will not allow a core dump under those circumstances.
>
> Should the Samba SIGSEGV handler return to root before trying to dump core?

Hmmm, is it possible that something like this in the signal handler
might solve this problem:

+#ifdef __linux__
+  /* inform kernel that process is dumpable */
+  prctl(PR_SET_DUMPABLE,1,0,0,0);
+#endif /* __linux__ */

-- 
Regards,
Richard Sharpe


More information about the samba-technical mailing list