From 841fceae68098160627066dd6bd180948c048d96 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 15 Aug 2019 11:09:47 +0200 Subject: 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 (cherry picked from commit 2ec9e93a7aac2706b4a5931495d56a7b64f8d894) --- selftest/knownfail.d/lock9 | 1 + source3/smbd/blocking.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 selftest/knownfail.d/lock9 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); } -- cgit v1.2.1