[Samba] Strange crashes and disconnection from PDC?
Richard Sharpe
rsharpe at ns.aus.com
Sun Jul 28 10:00:31 GMT 2002
On Sun, 28 Jul 2002, Nir Soffer wrote:
Hmmm, so you do not get core files on your platform either? Is this
FreeBSD or something else?
I am experiencing the same on FreeBSD, and
haven't had time to look into this, as other techniques could give me the
info I wanted, but corefiles will be needed for customer installs.
>
> Cc:'d to samba-technical
>
> ( Background - I'm trying to see how I can get smbd to dump core,
> with a user supplied option to allow tell it where to dump it, I'm
> poring over the related code)
>
> > A 'corefile directory' option might be nice - but we will have to be
> > careful. Look into smb_panic() and exit_server() for somewhere to
> > start.
>
> Err. Okay. Can anyone explain me what's up here? From server.c
>
> #if DUMP_CORE
> /*******************************************************************
> Prepare to dump a core file - carefully !
> ********************************************************************/
>
> static BOOL dump_core(void)
> {
> char *p;
> pstring dname;
> pstrcpy(dname,lp_logfile());
> if ((p=strrchr(dname,'/'))) *p=0;
> pstrcat(dname,"/corefiles");
> mkdir(dname,0700);
> sys_chown(dname,getuid(),getgid());
> chmod(dname,0700);
> if (chdir(dname)) return(False);
> umask(~(0700));
>
> dump_core is already there, DUMP_CORE is set to 1 (it looks like this
> is the default one shipped, btw), yet nothing bloody happens.
>
> The above snippet appears to create a corefiles directory above the log
> dir, (which is, I assume, what you want to change using the core
> directory
> option), but it doesn't create it anywhere I can see after killing a
> process with
> sig11. What am I missing here?
>
> Also - from what I see, the execution flow of a panic is something like:
>
> exit_servers is set is a fault handler, however in fault_setup (fault.c)
> a
> SIGSEGV handler is set to sig_fault which calls fault_report which
> calls smb_panic which calls abort().
>
> When the heck is exit_servers called, then? And what function does
> dump_core perform if there's no one to call it?
>
> I'm probably missing something fundamental here, enlightment will
> be appreciated.
>
>
> Thanks,
> Nir.
>
>
> --
> Nir Soffer -=- Software Engineer, Exanet Inc. -=-
> "Father, why are all the children weeping? / They are merely crying son
> O, are they merely crying, father? / Yes, true weeping is yet to come"
> -- Nick Cave and the Bad Seeds, The Weeping Song>
>
--
Regards
-----
Richard Sharpe, rsharpe at ns.aus.com, rsharpe at samba.org,
sharpe at ethereal.com
More information about the samba-technical
mailing list