[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Wed May 30 20:45:04 MDT 2012


The branch, master has been updated
       via  5d1a8d2 Stop spamming the logs with "Could not remove pid XX from serverid.tdb" messages and initiating the cleanup function on every process death.
      from  5e5f569 lib/dbwrap: make it possible to delete/store the current record during traverse

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 5d1a8d2a31390762c471229c2b115147ad0857fe
Author: Jeremy Allison <jra at samba.org>
Date:   Wed May 30 17:12:10 2012 -0700

    Stop spamming the logs with "Could not remove pid XX from serverid.tdb" messages and initiating the cleanup function on every process death.
    
    We now have many sub-processes from smbd that don't serve SMB1/SMB2 requests and
    don't register themselves in the serverid.tdb. Only initiate the cleanup
    from processes that were explicitly in the child list.
    
    Autobuild-User: Jeremy Allison <jra at samba.org>
    Autobuild-Date: Thu May 31 04:44:09 CEST 2012 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/server.c |   33 ++++++++++++++++++---------------
 1 files changed, 18 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index ab4e971..f71235f 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -416,6 +416,24 @@ static void remove_child_pid(struct smbd_parent_context *parent,
 	struct smbd_child_pid *child;
 	struct server_id child_id;
 
+	child_id = pid_to_procid(pid);
+
+	for (child = parent->children; child != NULL; child = child->next) {
+		if (child->pid == pid) {
+			struct smbd_child_pid *tmp = child;
+			DLIST_REMOVE(parent->children, child);
+			TALLOC_FREE(tmp);
+			parent->num_children -= 1;
+			break;
+		}
+	}
+
+	if (child == NULL) {
+		/* not all forked child processes are added to the children list */
+		DEBUG(2, ("Could not find child %d -- ignoring\n", (int)pid));
+		return;
+	}
+
 	if (unclean_shutdown) {
 		/* a child terminated uncleanly so tickle all
 		   processes to see if they can grab any of the
@@ -435,25 +453,10 @@ static void remove_child_pid(struct smbd_parent_context *parent,
 		}
 	}
 
-	child_id = pid_to_procid(pid);
-
 	if (!serverid_deregister(child_id)) {
 		DEBUG(1, ("Could not remove pid %d from serverid.tdb\n",
 			  (int)pid));
 	}
-
-	for (child = parent->children; child != NULL; child = child->next) {
-		if (child->pid == pid) {
-			struct smbd_child_pid *tmp = child;
-			DLIST_REMOVE(parent->children, child);
-			TALLOC_FREE(tmp);
-			parent->num_children -= 1;
-			return;
-		}
-	}
-
-	/* not all forked child processes are added to the children list */
-	DEBUG(2, ("Could not find child %d -- ignoring\n", (int)pid));
 }
 
 /****************************************************************************


-- 
Samba Shared Repository


More information about the samba-cvs mailing list