[NTLUG:Discuss] SMB desperation

Kelledin kelledin+NTLUG at skarpsey.dyndns.org
Thu Jul 25 21:26:46 CDT 2002


On Thursday 25 July 2002 02:56 pm, Brad Christian wrote:
> I have a samba pdc with 2 file servers,
> 1 nt print server. On my main file server,
> doing /etc/service smb restart keeps
> failing, listing a different pid each time,
> "No such PID".
>
> The result is crashing workstations
> everytime sometime browses the network.
>
> SMBD now has 40-odd pids running. This
> machine has been running a few months with
> no problem, except startx always crashes
> the box. I don't use it, so no big deal.
>
> Tcpdump, smbstatus and msbrowse -AM - all
> return good. Any ideas?
>
> Thanks,
> Brad

This would probably be because samba services miswrite their PID 
files.  An LSB-compliant service is supposed to atomically lock 
and write a PID file (/var/run/`basename servicepath`.pid) 
containing only one line that holds the human-readable PID of 
the currently running service.  Samba does something like this, 
but unfortunately, it prints some garbage in the file as well.

This command you're running to restart the service is probably 
relying on the miswritten pid file, and doesn't know what to 
make of the garbage.

The attached patch should fix samba, if you're up for recompiling 
it.

-- 
Kelledin
"If a server crashes in a server farm and no one pings it, does 
it still cost four figures to fix?"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: samba-2.2.5-pidfile.patch
Type: text/x-diff
Size: 536 bytes
Desc: not available
Url : http://ntlug.org/pipermail/discuss/attachments/20020725/fbc2b9a6/samba-2.2.5-pidfile.bin


More information about the Discuss mailing list