[Samba] 3.0.7: PANIC: deferred_open_entries_identical: logic error

Jeremy Allison jra at samba.org
Sun Sep 19 01:12:55 GMT 2004


On Sat, Sep 18, 2004 at 09:23:41AM -0400, Matt Phillips wrote:
> After upgrading to 3.0.7 we've had 4 panics, all within seconds of each other.
> Unfortunately I'm not sure what users were doing at that time.  I didn't
> notice this until reviewing the logs later.  From the time, I would guess this
> happened as people were logging in.
> 
> Here's a copy of one of the logs.  The other three are identical except for the
> time and PID.

Arggg. Stupid, stupid, stupid me ! I added a paranoia test
case when I was developing the deferred open case and made it
too tight. It will fire (incorrectly) and panic when a client
does a second open for a file with a different mid (multiplex-id)
request. Doh ! This is a perfectly valid thing for a client to
do (have two pending opens with different mids outstanding on
the same file) and currently when the first pending open expires
with a share violation the paranoia code will panic smbd.

It's a rare condition, but obvious now I'lve looked at the
code.

Here is the patch. Sorry for that bug.

Jeremy.
-------------- next part --------------
Index: locking/locking.c
===================================================================
--- locking/locking.c	(revision 2411)
+++ locking/locking.c	(working copy)
@@ -1043,18 +1043,6 @@
 
 static BOOL deferred_open_entries_identical( deferred_open_entry *e1, deferred_open_entry *e2)
 {
-#if 1 /* JRA PARANOIA TEST - REMOVE LATER */
-	if (e1->pid == e2->pid &&
-		e1->port == e2->port &&
-		e1->dev == e2->dev &&
-		e1->inode == e2->inode &&
-		((e1->time.tv_sec != e2->time.tv_sec) ||
-		 (e1->time.tv_usec != e2->time.tv_usec) ||
-		 (e1->mid != e2->mid))) {
-		smb_panic("PANIC: deferred_open_entries_identical: logic error.\n");
-	}
-#endif
-
 	return (e1->pid == e2->pid &&
 		e1->mid == e2->mid &&
 		e1->port == e2->port &&
@@ -1064,7 +1052,6 @@
 		e1->time.tv_usec == e2->time.tv_usec);
 }
 
-
 /*******************************************************************
  Delete a specific deferred open entry.
  Ignore if no entry deleted.


More information about the samba mailing list