printing, locking, etc in 2.2.0

Jeremy Allison jeremy at valinux.com
Tue May 22 05:32:28 GMT 2001


On Tue, May 22, 2001 at 06:13:02AM +0100, Neil Hoggarth wrote:
> On Mon, 21 May 2001, Jeremy Allison wrote:
> 
> > What is the process id that smbstatus claims to still
> > exist ? Does it still exist ? If not, then let me know
> > and I'll send you a quick patch to add debug statements
> > that will help track this down.
> 
> 29514, and it no such process exists - it doesn't appear in
> a ps listing, and kill(29514,0) does return ESRCH (I wrote
> a little test program to make sure that the check in
> lib/util.c:process_exists() was working properly).

Ok, please add the following patch and re-run smbd at debug
level 10 so I can see what's going on. An strace would help
also.

Thanks,

		Jeremy.

Index: locking/brlock.c
===================================================================
RCS file: /data/cvs/samba/source/locking/brlock.c,v
retrieving revision 1.15.4.3
diff -u -r1.15.4.3 brlock.c
--- locking/brlock.c    9 Mar 2001 00:39:43 -0000   1.15.4.3
+++ locking/brlock.c    22 May 2001 05:28:36 -0000
@@ -128,7 +128,14 @@
    for (i=0; i<count; i++) {
	        struct lock_struct *lock = &locks[i];
			 
-       if (process_exists(lock->context.pid)) continue;
+       if (process_exists(lock->context.pid)) {
+           DEBUG(10,("locking : delete_fn. pid %u exists.\n",
+                   (unsigned int)lock->context.pid ));
+           continue;
+       }
+
+       DEBUG(10,("locking : delete_fn. Deleting record for process %u\n",
+               (unsigned int)lock->context.pid ));
	  
		if (count > 1 && i < count-1) {
				memmove(&locks[i], &locks[i+1],
-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------




More information about the samba-technical mailing list