[SCM] Samba Shared Repository - branch master updated

Michael Adam obnox at samba.org
Thu Mar 19 13:44:03 MDT 2015


The branch, master has been updated
       via  77ba781 selftest: mark the samba4.blackbox.dbcheck test as flapping.
       via  04d6ef8 selftest: mark the samba4.blackbox.samba_tool_demote test flakey.
       via  90125e6 s3:torture: add samba3.smbtorture_s3.LOCAL-MESSAGING-FDPASS2b test.
       via  a4f7bc5 s3:torture: add samba3.smbtorture_s3.LOCAL-MESSAGING-FDPASS2a test.
       via  bf14864 s3:torture: prepare the FDPASS2 test to be run with variable payload sizes.
       via  57e3eba fix failing fd passing message by passing needed buffer size
       via  7551a4e vfs_ceph: remove cephwrap_init_stat_ex_from_stat()
       via  16956d4 vfs_ceph: fix ntimes_fn callback
      from  5f01bb1 build: Add talloc and samba-debug dep for gensec_external module

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


- Log -----------------------------------------------------------------
commit 77ba781c7ad3f71e1641962f4716165cab0ad20b
Author: Michael Adam <obnox at samba.org>
Date:   Thu Mar 19 16:59:42 2015 +0100

    selftest: mark the samba4.blackbox.dbcheck test as flapping.
    
    This causes frequent autobuild failures recently as follows:
    
    [1730(16550)/1735 at 2h7m43s] samba4.blackbox.dbcheck(ad_dc_ntvfs)
    UNEXPECTED(failure): samba4.blackbox.dbcheck(ad_dc_ntvfs).dbcheck(ad_dc_ntvfs:local)
    REASON: Exception: Exception: Checking 6799 objects
    ERROR: wrong dn[CN=DrsDelObjUser_1426756150,CN=Deleted Objects,DC=samba,DC=example,DC=com] name='DrsDelObjUser_1426756150
    DEL:77ec48cb-06cc-4157-a565-770720c30929' new_dn[CN=DrsDelObjUser_1426756150
    
    FAILED (1 failures, 0 errors and 0 unexpected successes in 0 testsuites)
    
    Has been seen flapping since quite some time:
    
    https://git.samba.org/autobuild.flakey/2012-06-22-0340/samba.stdout
    https://git.samba.org/autobuild.flakey/2012-06-25-2339/samba.stdout
    https://git.samba.org/autobuild.flakey/2012-07-02-1741/samba.stdout
    https://git.samba.org/autobuild.flakey/2012-07-31-1344/samba.stdout
    https://git.samba.org/autobuild.flakey/2012-09-24-1331/samba.stdout
    https://git.samba.org/autobuild.flakey/2012-11-21-0933/samba.stdout
    https://git.samba.org/autobuild.flakey/2012-12-02-0140/samba.stdout
    https://git.samba.org/autobuild.flakey/2012-12-11-1933/samba.stdout
    ...
    https://git.samba.org/autobuild.flakey/2014-08-20-1715/samba.stdout
    https://git.samba.org/autobuild.flakey/2014-09-29-0222/samba.stdout
    https://git.samba.org/autobuild.flakey/2014-12-13-1119/samba.stdout
    https://git.samba.org/autobuild.flakey/2015-03-19-0529/samba.stdout
    https://git.samba.org/autobuild.flakey/2015-03-19-0828/samba.stdout
    https://git.samba.org/autobuild.flakey/2015-03-19-1128/samba.stdout
    
    Possibly related to the failure of tombstone_ranimation,
    drs.delete_object, and blackbox.samba_tool_demote.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>
    
    Autobuild-User(master): Michael Adam <obnox at samba.org>
    Autobuild-Date(master): Thu Mar 19 20:43:32 CET 2015 on sn-devel-104

commit 04d6ef8fe5f2e4f2b3b71a2572ca3805c1f7bf54
Author: Michael Adam <obnox at samba.org>
Date:   Thu Mar 19 16:55:18 2015 +0100

    selftest: mark the samba4.blackbox.samba_tool_demote test flakey.
    
    This is causing frequent autobuild failures lately like this:
    
    [1695(11293)/1735 at 1h54m54s] samba4.blackbox.samba_tool_demote(promoted_dc)
    Using localdc as partner server for the demotion
    Deactivating inbound replication
    Asking partner server localdc to synchronize from us
    Error while demoting, re-enabling inbound replication
    ERROR(<class 'samba.drs_utils.drsException'>): Error while sending a DsReplicaSync for partion CN=Schema,CN=Configuration,DC=samba,DC=example,DC=com - drsException: DsReplicaSync failed (8442, 'WERR_DS_DRA_INTERNAL_ERROR')
      File "bin/python/samba/netcmd/domain.py", line 712, in run
        sendDsReplicaSync(drsuapiBind, drsuapi_handle, ntds_guid, str(part), drsuapi.DRSUAPI_DRS_WRIT_REP)
      File "bin/python/samba/drs_utils.py", line 83, in sendDsReplicaSync
        raise drsException("DsReplicaSync failed %s" % estr)
    UNEXPECTED(failure): samba4.blackbox.samba_tool_demote(promoted_dc).demote(promoted_dc)
    REASON: Exception: Exception: No reason specified
    
    FAILED (1 failures, 0 errors and 0 unexpected successes in 0 testsuites)
    
    Also seen from time to time in intermittent autobuild failure checks:
    
    https://git.samba.org/autobuild.flakey/2012-07-10-0942/samba.stdout
    https://git.samba.org/autobuild.flakey/2012-07-15-1142/samba.stdout
    https://git.samba.org/autobuild.flakey/2012-08-05-1944/samba.stdout
    https://git.samba.org/autobuild.flakey/2013-01-12-0931/samba.stdout
    https://git.samba.org/autobuild.flakey/2013-01-16-1936/samba.stdout
    https://git.samba.org/autobuild.flakey/2013-01-21-2330/samba.stdout
    https://git.samba.org/autobuild.flakey/2013-01-26-0528/samba.stdout
    ...
    https://git.samba.org/autobuild.flakey/2014-11-13-2305/samba.stdout
    https://git.samba.org/autobuild.flakey/2014-11-15-1710/samba.stdout
    https://git.samba.org/autobuild.flakey/2014-11-21-0505/samba.stdout
    https://git.samba.org/autobuild.flakey/2014-11-27-0810/samba.stdout
    https://git.samba.org/autobuild.flakey/2014-11-30-0215/samba.stdout
    https://git.samba.org/autobuild.flakey/2014-12-04-1409/samba.stdout
    https://git.samba.org/autobuild.flakey/2015-01-14-2008/samba.stdout
    https://git.samba.org/autobuild.flakey/2015-01-31-2010/samba.stdout
    https://git.samba.org/autobuild.flakey/2015-03-19-1415/samba.stdout
    
    Possibly related to the flakeyness of the tombstone_reanimation
    test and the drs.delete_object tests.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 90125e64017b6018f7b96710f343e7992a789588
Author: Michael Adam <obnox at samba.org>
Date:   Thu Mar 19 16:45:09 2015 +0100

    s3:torture: add samba3.smbtorture_s3.LOCAL-MESSAGING-FDPASS2b test.
    
    This variant of the fdpass2 test tests the non-queuing fast path
    by sumbitting sending a message without payload, only sending
    the fds.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit a4f7bc5e39707174007aad901ef095ffb30acf53
Author: Michael Adam <obnox at samba.org>
Date:   Thu Mar 19 12:47:53 2015 +0100

    s3:torture: add samba3.smbtorture_s3.LOCAL-MESSAGING-FDPASS2a test.
    
    This variant of the fdpass2 test tests the non-queuing fast path
    by sending a message with only a very small payload.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit bf14864e269cdbce98142984552f154e03e79e3e
Author: Michael Adam <obnox at samba.org>
Date:   Thu Mar 19 12:40:30 2015 +0100

    s3:torture: prepare the FDPASS2 test to be run with variable payload sizes.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 57e3ebaf8054574b20bde94346ae8003eb675bc4
Author: Noel Power <noel.power at suse.com>
Date:   Wed Mar 18 18:15:17 2015 +0000

    fix failing fd passing message by passing needed buffer size
    
    Signed-off-by: Noel Power <noel.power at suse.com>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit 7551a4edb596f47020560c9c44d582500691c80c
Author: Yan, Zheng <zyan at redhat.com>
Date:   Wed Mar 18 11:34:25 2015 +0800

    vfs_ceph: remove cephwrap_init_stat_ex_from_stat()
    
    cephwrap_init_stat_ex_from_stat() lacks code that makes 'create'
    timestamp. Besides that, it's identical to init_stat_ex_from_stat().
    
    Signed-off-by: Yan, Zheng <zyan at redhat.com>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Ira Cooper <ira at samba.org>

commit 16956d4eb18196a7b867423b8f403312361bdf80
Author: Yan, Zheng <zyan at redhat.com>
Date:   Thu Mar 19 09:58:45 2015 +0800

    vfs_ceph: fix ntimes_fn callback
    
    add null timespec check for atime/mtime. Also add code that stores
    create_time by EA.
    
    Signed-off-by: Yan, Zheng <zyan at redhat.com>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Ira Cooper <ira at samba.org>

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

Summary of changes:
 selftest/flapping                           |  2 ++
 source3/lib/unix_msg/unix_msg.c             |  2 +-
 source3/modules/vfs_ceph.c                  | 54 ++++++++++++++++-------------
 source3/selftest/tests.py                   |  2 ++
 source3/torture/proto.h                     |  2 ++
 source3/torture/test_messaging_fd_passing.c | 34 +++++++++++++++---
 source3/torture/torture.c                   |  2 ++
 7 files changed, 68 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/flapping b/selftest/flapping
index 0195487..8e13dc3 100644
--- a/selftest/flapping
+++ b/selftest/flapping
@@ -27,3 +27,5 @@
 ^samba3.raw.samba3closeerr.samba3closeerr\(ad_dc\) # Seems to flap - succeeds on sn-devel, fails on Fedora 16
 ^samba4.tombstone_reanimation.python # flakey on sn-devel
 ^samba4.drs.delete_object.python # flakey on sn-devel
+^samba4.blackbox.samba_tool_demote # flakey on sn-devel
+^samba4.blackbox.dbcheck # flakey on sn-devel
diff --git a/source3/lib/unix_msg/unix_msg.c b/source3/lib/unix_msg/unix_msg.c
index f242249..7cb1936 100644
--- a/source3/lib/unix_msg/unix_msg.c
+++ b/source3/lib/unix_msg/unix_msg.c
@@ -627,7 +627,7 @@ static int unix_dgram_send(struct unix_dgram_ctx *ctx,
 
 	{
 		uint8_t buf[fdlen];
-		msghdr_prep_fds(&msg, buf, 0, fds, num_fds);
+		msghdr_prep_fds(&msg, buf, fdlen, fds, num_fds);
 
 		ret = sendmsg(ctx->sock, &msg, 0);
 	}
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index d53a2de..b3e334e 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -520,26 +520,6 @@ static int cephwrap_fsync(struct vfs_handle_struct *handle, files_struct *fsp)
 	WRAP_RETURN(result);
 }
 
-static void cephwrap_init_stat_ex_from_stat(struct stat_ex *dst, const struct stat *src)
-{
-	ZERO_STRUCT(*dst);
-
-	dst->st_ex_dev = src->st_dev;
-	dst->st_ex_ino = src->st_ino;
-	dst->st_ex_mode = src->st_mode;
-	dst->st_ex_nlink = src->st_nlink;
-	dst->st_ex_uid = src->st_uid;
-	dst->st_ex_gid = src->st_gid;
-	dst->st_ex_rdev = src->st_rdev;
-	dst->st_ex_size = src->st_size;
-	dst->st_ex_atime.tv_sec = src->st_atime;
-	dst->st_ex_mtime.tv_sec = src->st_mtime;
-	dst->st_ex_ctime.tv_sec = src->st_ctime;
-	dst->st_ex_btime.tv_sec = src->st_mtime;
-	dst->st_ex_blksize = src->st_blksize;
-	dst->st_ex_blocks = src->st_blocks;
-}
-
 static int cephwrap_stat(struct vfs_handle_struct *handle,
 			struct smb_filename *smb_fname)
 {
@@ -565,7 +545,9 @@ static int cephwrap_stat(struct vfs_handle_struct *handle,
 			   stbuf.st_uid, stbuf.st_gid, llu(stbuf.st_rdev), llu(stbuf.st_size), llu(stbuf.st_blksize),
 			   llu(stbuf.st_blocks), llu(stbuf.st_atime), llu(stbuf.st_mtime), llu(stbuf.st_ctime)));
 	}
-	cephwrap_init_stat_ex_from_stat(&(smb_fname->st), &stbuf);
+	init_stat_ex_from_stat(
+			&smb_fname->st, &stbuf,
+			lp_fake_directory_create_times(SNUM(handle->conn)));
 	DEBUG(10, ("[CEPH] mode = 0x%x\n", smb_fname->st.st_ex_mode));
 	return result;
 }
@@ -589,7 +571,9 @@ static int cephwrap_fstat(struct vfs_handle_struct *handle, files_struct *fsp, S
 			   llu(stbuf.st_blocks), llu(stbuf.st_atime), llu(stbuf.st_mtime), llu(stbuf.st_ctime)));
 	}
 
-	cephwrap_init_stat_ex_from_stat(sbuf, &stbuf);
+	init_stat_ex_from_stat(
+			sbuf, &stbuf,
+			lp_fake_directory_create_times(SNUM(handle->conn)));
 	DEBUG(10, ("[CEPH] mode = 0x%x\n", sbuf->st_ex_mode));
 	return result;
 }
@@ -612,7 +596,9 @@ static int cephwrap_lstat(struct vfs_handle_struct *handle,
 	if (result < 0) {
 		WRAP_RETURN(result);
 	}
-	cephwrap_init_stat_ex_from_stat(&(smb_fname->st), &stbuf);
+	init_stat_ex_from_stat(
+			&smb_fname->st, &stbuf,
+			lp_fake_directory_create_times(SNUM(handle->conn)));
 	return result;
 }
 
@@ -753,8 +739,26 @@ static int cephwrap_ntimes(struct vfs_handle_struct *handle,
 {
 	struct utimbuf buf;
 	int result;
-	buf.actime = ft->atime.tv_sec;
-	buf.modtime = ft->mtime.tv_sec;
+
+	if (null_timespec(ft->atime)) {
+		buf.actime = smb_fname->st.st_ex_atime.tv_sec;
+	} else {
+		buf.actime = ft->atime.tv_sec;
+	}
+	if (null_timespec(ft->mtime)) {
+		buf.modtime = smb_fname->st.st_ex_mtime.tv_sec;
+	} else {
+		buf.modtime = ft->mtime.tv_sec;
+	}
+	if (!null_timespec(ft->create_time)) {
+		set_create_timespec_ea(handle->conn, smb_fname,
+				       ft->create_time);
+	}
+	if (buf.actime == smb_fname->st.st_ex_atime.tv_sec &&
+	    buf.modtime == smb_fname->st.st_ex_mtime.tv_sec) {
+		return 0;
+	}
+
 	result = ceph_utime(handle->data, smb_fname->base_name, &buf);
 	DEBUG(10, ("[CEPH] ntimes(%p, %s, {%ld, %ld, %ld, %ld}) = %d\n", handle, smb_fname_str_dbg(smb_fname),
 				ft->mtime.tv_sec, ft->atime.tv_sec, ft->ctime.tv_sec,
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index deed6e6..a60e711 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -111,6 +111,8 @@ local_tests = [
     "LOCAL-MESSAGING-READ4",
     "LOCAL-MESSAGING-FDPASS1",
     "LOCAL-MESSAGING-FDPASS2",
+    "LOCAL-MESSAGING-FDPASS2a",
+    "LOCAL-MESSAGING-FDPASS2b",
     "LOCAL-hex_encode_buf",
     "LOCAL-sprintf_append",
     "LOCAL-remove_duplicate_addrs2"]
diff --git a/source3/torture/proto.h b/source3/torture/proto.h
index b12c8be..5f1cdcc 100644
--- a/source3/torture/proto.h
+++ b/source3/torture/proto.h
@@ -119,6 +119,8 @@ bool run_messaging_read3(int dummy);
 bool run_messaging_read4(int dummy);
 bool run_messaging_fdpass1(int dummy);
 bool run_messaging_fdpass2(int dummy);
+bool run_messaging_fdpass2a(int dummy);
+bool run_messaging_fdpass2b(int dummy);
 bool run_oplock_cancel(int dummy);
 
 #endif /* __TORTURE_H__ */
diff --git a/source3/torture/test_messaging_fd_passing.c b/source3/torture/test_messaging_fd_passing.c
index 7bee41b..465ee28 100644
--- a/source3/torture/test_messaging_fd_passing.c
+++ b/source3/torture/test_messaging_fd_passing.c
@@ -214,7 +214,7 @@ static void child_done_cb(struct tevent_context *ev,
 	state->done = true;
 }
 
-static bool fdpass2_parent(pid_t child_pid, int ready_fd)
+static bool fdpass2_parent(pid_t child_pid, int ready_fd, size_t payload_size)
 {
 	struct tevent_context *ev = NULL;
 	struct messaging_context *msg_ctx = NULL;
@@ -285,8 +285,11 @@ static bool fdpass2_parent(pid_t child_pid, int ready_fd)
 	 * Send a certain payload with the fds, to test to test
 	 * that fd-passing works when we have fragmentation and
 	 * re-assembly of the datagrams.
+	 *
+	 * Fragmentation/queuing is triggered by a certain payload
+	 * size. Payloads below that size use the fast path.
 	 */
-	blob = data_blob_talloc_zero(frame, 1000*1000);
+	blob = data_blob_talloc_zero(frame, payload_size);
 	iov.iov_base = blob.data;
 	iov.iov_len  = blob.length;
 
@@ -343,7 +346,7 @@ done:
 	return retval;
 }
 
-bool run_messaging_fdpass2(int dummy)
+static bool run_messaging_fdpass2_int(int dummy, size_t payload_size)
 {
 	bool retval = false;
 	pid_t child_pid;
@@ -364,8 +367,31 @@ bool run_messaging_fdpass2(int dummy)
 		retval = fdpass2_child(ready_pipe[1]);
 	} else {
 		close(ready_pipe[1]);
-		retval = fdpass2_parent(child_pid, ready_pipe[0]);
+		retval = fdpass2_parent(child_pid, ready_pipe[0], payload_size);
 	}
 
 	return retval;
 }
+
+bool run_messaging_fdpass2(int dummy)
+{
+	return run_messaging_fdpass2_int(dummy, 1000*1000);
+}
+
+/**
+ * Variant of the FDPASS2 test that tests the non-queuing fast path
+ * with a small payload.
+ */
+bool run_messaging_fdpass2a(int dummy)
+{
+	return run_messaging_fdpass2_int(dummy, 1);
+}
+
+/**
+ * Variant of the FDPASS2 test that tests the non-queuing fast path
+ * without a payload.
+ */
+bool run_messaging_fdpass2b(int dummy)
+{
+	return run_messaging_fdpass2_int(dummy, 0);
+}
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 4b957af..f33b6e5 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -9605,6 +9605,8 @@ static struct {
 	{ "LOCAL-MESSAGING-READ4", run_messaging_read4, 0 },
 	{ "LOCAL-MESSAGING-FDPASS1", run_messaging_fdpass1, 0 },
 	{ "LOCAL-MESSAGING-FDPASS2", run_messaging_fdpass2, 0 },
+	{ "LOCAL-MESSAGING-FDPASS2a", run_messaging_fdpass2a, 0 },
+	{ "LOCAL-MESSAGING-FDPASS2b", run_messaging_fdpass2b, 0 },
 	{ "LOCAL-BASE64", run_local_base64, 0},
 	{ "LOCAL-RBTREE", run_local_rbtree, 0},
 	{ "LOCAL-MEMCACHE", run_local_memcache, 0},


-- 
Samba Shared Repository


More information about the samba-cvs mailing list