RE: NMBD process crashing

"Mark Jose" <[email protected]> Fri, 2 Mar 2007 08:24:56 +1100
Newsgroups gmane.network.samba.vms
Message-ID <[email protected]>
Andrew,

Our problems with nmbd were also lock related and our only solution was =
the constant killing and restart of the nmbd process. We have moderate =
to heavy use, transfer of large amounts of small files etc.

Here's the command:

Run this with a p1 of AUTO means it will not query you for an answer =
(suitable for a batch job)


$! Find the nmbd/smbd process and kill them.
$! set ver
$ auto=3D0
$ if p1 .eqs. "AUTO" then auto=3D1
$
$ device=3Df$parse(f$trnlnm("samba_root"),,,"DEVICE")=20
$ set proc/priv=3Dworld
$ ! First disable the services that could spawn nmbd into action:
$ tcpip disable service smbd
$ tcpip disable service swat
$ MAIN_LOOP:
$   say "Wait... Scanning for the NMBD process on device ''device'
$   scratchfile=3D"sys$scratch:samba_fix.txt"
$   show device 'device' /files /out=3D'scratchfile'
$   gosub FIND_NMBD
$   if items_found .eq. 1
$   then
$	if auto .eq. 0
$	then
$		inquire ask "Stop this process? "
$		ask=3Df$extract(0,1,f$edit(ask,"UPCASE"))
$		if ask .eqs. "Y"
$		then
$			stop/id=3D'pid'
$		endif
$		inquire ask "Continue? "
$		ask=3Df$extract(0,1,f$edit(ask,"UPCASE"))
$		if ask .nes. "Y" then goto END_MAIN_LOOP
$	else
$		say "Process found."
$		say "Stopping process: ''pid'"
$		stop/id=3D'pid'
$		say "Pausing for 10 seconds."
$		wait 00:00:10
$	endif
$	goto MAIN_LOOP
$   endif
$ END_MAIN_LOOP:
$! close infile
$
$ say "The NMBD process has been stopped."
$ if auto .eq. 0
$ then
$	inquire ask "Start up NMBD? "
$	ask=3Df$extract(0,1,f$edit(ask,"UPCASE"))
$	if ask .eqs. "Y" gosub start_nmbd
$ else
$	gosub start_nmbd
$ endif
$ tcpip enable service smbd
$ tcpip enable service swat
$ ! SEND MAIL OR SOMETHING HERE, IF YOU WISH !!
$ exit
$
$!------------------ SUBROUTINES --------------------
$ START_NMBD: ! FROM SAMBA STARTUP
$   say "Starting the NMBD process."
$   set proc/priv=3DCMKRNL
$   run	/detached -
	/input=3Dsamba_exe:nmbd_startup.com -
	/output=3Dsamba_root:[var]nmbd_startup.log -
	/uic=3Dsystem -
	/process_name=3DNMBD -
	sys$system:loginout.exe
$   return
$
$
$ FIND_NMBD:
$   items_found=3D0
$   open /read infile 'scratchfile'
$   READ_LOOP:
$	read/end_of_file=3DEND_READ_LOOP infile data
$	lgh=3Df$length(data)
$	if f$locate("NMBD",data) .ne. lgh
$	then
$		items_found=3D1
$		pid=3Df$element(1," ",f$edit(data,"COMPRESS"))
$		close infile
$		return
$	endif
$	goto READ_LOOP
$   END_READ_LOOP:
$   close infile
$   return



-----Original Message-----
From: [email protected] on behalf =
of King Andrew J
Sent: Fri 3/2/2007 2:01 AM
To: [email protected]
Subject: RE: NMBD process crashing
=20


Andrew King
Snet NT/VMS Systems Administrator (FRN)
>Dstl Business Systems, Service & Support
>Building A2, Room G053
>T: 01252 45 6256 or (9) 6800 6256
>F: 01252 45 5271 or (9) 6800 5271
>P: +44 (0)7659 172 140
>E: mailto:[email protected]
>
To log an IS incident please call the Service Desk on x8787 (internally) =
or
0870 8718787. Alternatively email mailto:[email protected]
=20

>-----Original Message-----
>From: [email protected]=20
>[mailto:[email protected]]=20
>On Behalf Of Albrecht Schlosser
>Sent: 01 March 2007 1:48 pm
>To: [email protected]
>Subject: Re: NMBD process crashing
>
>King Andrew J wrote:
>> Can anyone help/explain why the NMBD process on my VMS server is=20
>> crashing, I will explain.
>>=20
>> VMS 7.3-2, with TCP 5.4 on Alpha ES47 7/1150 SAMBA 2.2.8
>
>There are (or have been) multiple releases of Samba 2.2.8 on=20
>http://www.pi-net.dyndns.org/anonymous/jyc/
>
>Which one are you using.

This there an easy way to find out?

>
>> I have had this issue ever since Samba was installed and have=20
>> implemented a fix of Stopping and Restarting the whole of=20
>Samba over a=20
>> weekend to get round the issue.  I saw an article about the NMBD=20
>> process crashing and the only answer at that time was as I=20
>have already done.
>
>at which time ?

Back late 2005 or early 2006?

>
>> The situation appears to be that NMBD process starts up as=20
>normal when=20
>> the server is booted or rebooted and runs quite happy for a=20
>period of=20
>> time.  The NMBD process then appears to crash and I am=20
>unable to find=20
>> any files or logs that can help with diagnosing why.  I then=20
>manually=20
>> start up the whole of Samba to get the NMBD process up and running.
>
>I'm not aware of a crash, but I know that NMBD had problems=20
>with some system resources, acquiring too many locks without=20
>releasing, or other resources.
>You should at least have the newest release of Aug. 17, 2005:
>
>http://www.pi-net.dyndns.org/anonymous/jyc/samba-2_2_8-src-20050817.zip
>
>and related files.
>
>However, I just looked on our system and saw that the lock=20
>problem does still exist.
>
>Please have a look at $ monitor lock, and see if you have=20
>increasing lock counts. If you have, then you should kill the=20
>NMBD process, and watch the lock display. This is what I found=20
>(only the "Total" parts shown):
>

With no SMBD
Total locks 2516
Total resources 1997

With 1 SMBD
Toal locks 3366
Total resources 2813

>
>NMBD (and about 10 SMBD processes) still running:
>-------------------------------------------------
>
>                             OpenVMS Monitor Utility
>                            LOCK MANAGEMENT STATISTICS
>                              1-MAR-2007 14:18:53.75
>
>                                        CUR        AVE       =20
>MIN        MAX
>
>     Total Locks                   33062.00   33204.17  =20
>33062.00   33250.00
>     Total Resources                7895.00    8064.25   =20
>7895.00    8115.00
>
>
>
>After killing all NMBD and SMBD processes:
>------------------------------------------
>
>                             OpenVMS Monitor Utility
>                            LOCK MANAGEMENT STATISTICS
>                              1-MAR-2007 14:20:29.78
>
>                                        CUR        AVE       =20
>MIN        MAX
>
>     Total Locks                    3103.00   32205.18   =20
>3103.00   33250.00
>     Total Resources                3034.00    7832.76   =20
>3034.00    8115.00
>
>
>Some time later:
>----------------
>                             OpenVMS Monitor Utility
>                            LOCK MANAGEMENT STATISTICS
>                                  on node ALPHA1
>                              1-MAR-2007 14:45:12.12
>
>                                        CUR        AVE       =20
>MIN        MAX
>     Total Locks                    5426.00   12465.34   =20
>3101.00   33250.00
>     Total Resources                3123.00    4528.05   =20
>3032.00    8115.00
>
>
>
>I didn't investigate further, but it seems that this could=20
>also be your problem.
>
>Any ideas, anybody? JYC ?
>
>Albrecht
>
>PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING:
>
>http://www.catb.org/~esr/faqs/smart-questions.html
>

"This e-mail is intended for the recipient only.  If you are not the
intended recipient you must not use, disclose, distribute, copy, print,
or rely upon this e-mail. If an addressing or transmission error has
misdirected this e-mail, please notify the author by replying to this =
e-mail."

"Recipients should note that all e-mail traffic on MOD systems is
subject to monitoring and auditing."
PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING:

http://www.catb.org/~esr/faqs/smart-questions.html




Confidentiality and Privacy Statement

This message is intended only for the use of the individual or entity =
named above and may contain information that is confidential and =
privileged. If you are not the intended recipient, you are hereby =
notified that any dissemination, distribution or copying of this =
communication is strictly prohibited. If you have received this =
communication in error, please notify us immediately by telephone and =
destroy the original message.=20
Box Hill Institute of TAFE is committed to protecting your privacy and =
the confidentiality and security of personal information provided by you =
to us. For further information visit www.bhtafe.edu.au or email =
[email protected].
PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING:

http://www.catb.org/~esr/faqs/smart-questions.html