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

Karolin Seeger kseeger at samba.org
Mon Apr 15 12:56:03 UTC 2019

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


- Log -----------------------------------------------------------------
commit 945a41d38415ca273fb62f0dc3cea66d1fa29991
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-9-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-9-test): Mon Apr 15 12:55:46 UTC 2019 on sn-devel-144

commit d9c47cb86e0a3200cb8de9581596a24fbeb5b3e1
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) {
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