NMBD process crashing

Mark Jose M.Jose at bhtafe.edu.au
Thu Mar 1 21:24:56 GMT 2007


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=0
$ if p1 .eqs. "AUTO" then auto=1
$
$ device=f$parse(f$trnlnm("samba_root"),,,"DEVICE") 
$ set proc/priv=world
$ ! 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="sys$scratch:samba_fix.txt"
$   show device 'device' /files /out='scratchfile'
$   gosub FIND_NMBD
$   if items_found .eq. 1
$   then
$	if auto .eq. 0
$	then
$		inquire ask "Stop this process? "
$		ask=f$extract(0,1,f$edit(ask,"UPCASE"))
$		if ask .eqs. "Y"
$		then
$			stop/id='pid'
$		endif
$		inquire ask "Continue? "
$		ask=f$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='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=f$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=CMKRNL
$   run	/detached -
	/input=samba_exe:nmbd_startup.com -
	/output=samba_root:[var]nmbd_startup.log -
	/uic=system -
	/process_name=NMBD -
	sys$system:loginout.exe
$   return
$
$
$ FIND_NMBD:
$   items_found=0
$   open /read infile 'scratchfile'
$   READ_LOOP:
$	read/end_of_file=END_READ_LOOP infile data
$	lgh=f$length(data)
$	if f$locate("NMBD",data) .ne. lgh
$	then
$		items_found=1
$		pid=f$element(1," ",f$edit(data,"COMPRESS"))
$		close infile
$		return
$	endif
$	goto READ_LOOP
$   END_READ_LOOP:
$   close infile
$   return



-----Original Message-----
From: samba-vms-bounces+m.jose=bhtafe.edu.au at lists.samba.org on behalf of King Andrew J
Sent: Fri 3/2/2007 2:01 AM
To: samba-vms at lists.samba.org
Subject: RE: NMBD process crashing
 


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:ajking at dstl.gov.uk
>
To log an IS incident please call the Service Desk on x8787 (internally) or
0870 8718787. Alternatively email mailto:servicedesk at dstl.gov.uk
 

>-----Original Message-----
>From: samba-vms-bounces+ajking=dstl.gov.uk at lists.samba.org 
>[mailto:samba-vms-bounces+ajking=dstl.gov.uk at lists.samba.org] 
>On Behalf Of Albrecht Schlosser
>Sent: 01 March 2007 1:48 pm
>To: samba-vms at lists.samba.org
>Subject: Re: NMBD process crashing
>
>King Andrew J wrote:
>> Can anyone help/explain why the NMBD process on my VMS server is 
>> crashing, I will explain.
>> 
>> 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 
>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 
>> implemented a fix of Stopping and Restarting the whole of 
>Samba over a 
>> weekend to get round the issue.  I saw an article about the NMBD 
>> process crashing and the only answer at that time was as I 
>have already done.
>
>at which time ?

Back late 2005 or early 2006?

>
>> The situation appears to be that NMBD process starts up as 
>normal when 
>> the server is booted or rebooted and runs quite happy for a 
>period of 
>> time.  The NMBD process then appears to crash and I am 
>unable to find 
>> any files or logs that can help with diagnosing why.  I then 
>manually 
>> 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 
>with some system resources, acquiring too many locks without 
>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 
>problem does still exist.
>
>Please have a look at $ monitor lock, and see if you have 
>increasing lock counts. If you have, then you should kill the 
>NMBD process, and watch the lock display. This is what I found 
>(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        
>MIN        MAX
>
>     Total Locks                   33062.00   33204.17   
>33062.00   33250.00
>     Total Resources                7895.00    8064.25    
>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        
>MIN        MAX
>
>     Total Locks                    3103.00   32205.18    
>3103.00   33250.00
>     Total Resources                3034.00    7832.76    
>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        
>MIN        MAX
>     Total Locks                    5426.00   12465.34    
>3101.00   33250.00
>     Total Resources                3123.00    4528.05    
>3032.00    8115.00
>
>
>
>I didn't investigate further, but it seems that this could 
>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. 
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 privacy at bhtafe.edu.au.


More information about the samba-vms mailing list