From: Stefan Metzmacher Date: Thu, 15 Aug 2019 09:09:47 +0000 (+0200) Subject: s3:blocking: demonstrate the posix lock retry fails X-Git-Tag: talloc-2.3.1~975 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2ec9e93a7aac2706b4a5931495d56a7b64f8d894;p=thirdparty%2Fsamba.git s3:blocking: demonstrate the posix lock retry fails This is just a temporary commit that shows the bug and its fix. It will be reverted once the problem is fixed. The posix lock retry fails if the client specified timeout is smaller than the hardcoded 1 second retry. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113 Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke --- diff --git a/selftest/knownfail.d/lock9 b/selftest/knownfail.d/lock9 new file mode 100644 index 00000000000..044622586eb --- /dev/null +++ b/selftest/knownfail.d/lock9 @@ -0,0 +1 @@ +^samba3.smbtorture_s3.*.LOCK9B diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c index cdc4613270e..91438fe4486 100644 --- a/source3/smbd/blocking.c +++ b/source3/smbd/blocking.c @@ -236,7 +236,7 @@ struct tevent_req *smbd_smb1_do_locks_send( DBG_DEBUG("Blocked on a posix lock. Retry in one second\n"); - tmp = timeval_current_ofs(1, 0); + tmp = timeval_current_ofs(15, 0); endtime = timeval_min(&endtime, &tmp); } @@ -381,7 +381,7 @@ static void smbd_smb1_do_locks_retry(struct tevent_req *subreq) DBG_DEBUG("Blocked on a posix lock. Retry in one second\n"); - tmp = timeval_current_ofs(1, 0); + tmp = timeval_current_ofs(15, 0); endtime = timeval_min(&endtime, &tmp); }