[SCM] Samba Shared Repository - branch v4-10-test updated

Karolin Seeger kseeger at samba.org
Mon Apr 15 14:24:03 UTC 2019


The branch, v4-10-test has been updated
       via  e23fdfe6730 ctdb-common: Avoid race between fd and signal events
       via  8f43d725d36 ctdb-daemon: Revert "We can not assume that just because we could complete a TCP handshake"
      from  182f329f541 torture: Add test for talloc size accounting in memcache

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-10-test


- Log -----------------------------------------------------------------
commit e23fdfe6730afe1ac920a58c94d48aba592c9c7a
Author: Amitay Isaacs <amitay at samba.org>
Date:   Tue Apr 9 14:44:04 2019 +1000

    ctdb-common: Avoid race between fd and signal events
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13895
    
    In run_proc, there was an implicit assumption that when a process exits,
    fd event (pipe between parent and child) would be processed first and
    signal event (SIGCHLD for the child) would be processed later.
    
    However, that is not the case.  SIGCHLD can be received asynchronously
    any time even when the pipe data has not fully been read.  This causes
    run_proc to miss some of the output from child process in tests.
    
    When SIGCHLD is being processed, if the pipe between parent and child is
    still open, then do an explict read from the pipe to ensure we read any
    data still in the pipe before closing the pipe.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    
    Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
    Autobuild-Date(master): Fri Apr 12 08:19:29 UTC 2019 on sn-devel-144
    
    (cherry picked from commit 289201277cd983b27cdfd5376c607eab112b4082)
    
    Autobuild-User(v4-10-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-10-test): Mon Apr 15 14:23:16 UTC 2019 on sn-devel-144

commit 8f43d725d3629daf17a2aaa3006f47021efad72d
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Apr 5 16:17:35 2019 +1100

    ctdb-daemon: Revert "We can not assume that just because we could complete a TCP handshake"
    
    We also can not assume that nodes can be marked as connected via only
    the keepalive mechanism.  Keepalives are not sent to disconnected
    nodes so, in the absence of other packets (e.g. broadcasts), 2 nodes
    may never become marked as connected to each other.
    
    Revert to marking nodes as connected in the TCP transport code.  If a
    connection is to a non(-operational) ctdbd then it will revert to
    disconnected after a short while and may actually flap.  This should
    be rare.
    
    This reverts commit 66919db3d7ab1e091223faf515b183af8bfddc83.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13888
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 38dc6d11a26c2e9a2cae7927321f2216ceb1c5ec)

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

Summary of changes:
 ctdb/common/run_proc.c | 7 +++++++
 ctdb/tcp/tcp_connect.c | 3 +++
 2 files changed, 10 insertions(+)


Changeset truncated at 500 lines:

diff --git a/ctdb/common/run_proc.c b/ctdb/common/run_proc.c
index 97895b383b9..037b6d9651d 100644
--- a/ctdb/common/run_proc.c
+++ b/ctdb/common/run_proc.c
@@ -295,6 +295,13 @@ again:
 		proc->result.sig = WTERMSIG(status);
 	}
 
+	/* Confirm that all data has been read from the pipe */
+	if (proc->fd != -1) {
+		proc_read_handler(ev, proc->fde, 0, proc);
+		TALLOC_FREE(proc->fde);
+		proc->fd = -1;
+	}
+
 	/* Active run_proc request */
 	if (proc->req != NULL) {
 		run_proc_done(proc->req);
diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c
index 13452a5e83b..385547e0e78 100644
--- a/ctdb/tcp/tcp_connect.c
+++ b/ctdb/tcp/tcp_connect.c
@@ -122,6 +122,9 @@ static void ctdb_node_connect_write(struct tevent_context *ev,
 
 	/* the queue subsystem now owns this fd */
 	tnode->fd = -1;
+
+	/* tell the ctdb layer we are connected */
+	node->ctdb->upcalls->node_connected(node);
 }
 
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list