From 4e419975cc35abb46ebbd70bc129e345b420efa3 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 26 Aug 2024 14:42:12 +0200 Subject: [PATCH] s3:tests: let test_durable_handle_reconnect.sh run smb2.durable-v2-regressions.durable_v2_reconnect_bug15624 This demonstrates the dead lock after a durable reconnect failed because the stat info changed, the file can't be accessed anymore as we leak the incomplete share mode entry in a still running process. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15624 Signed-off-by: Stefan Metzmacher Reviewed-by: Guenther Deschner (cherry picked from commit 14875448ca06a3a28800343a3a326f1a66bccec0) --- .../samba3.blackbox.durable_v2_delay | 1 + .../tests/test_durable_handle_reconnect.sh | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 selftest/knownfail.d/samba3.blackbox.durable_v2_delay diff --git a/selftest/knownfail.d/samba3.blackbox.durable_v2_delay b/selftest/knownfail.d/samba3.blackbox.durable_v2_delay new file mode 100644 index 00000000000..88e29960797 --- /dev/null +++ b/selftest/knownfail.d/samba3.blackbox.durable_v2_delay @@ -0,0 +1 @@ +^samba3.blackbox.durable_v2_delay.durable-v2-regressions.durable_v2_reconnect_bug15624 diff --git a/source3/script/tests/test_durable_handle_reconnect.sh b/source3/script/tests/test_durable_handle_reconnect.sh index 0ab32974824..fd5c156956f 100755 --- a/source3/script/tests/test_durable_handle_reconnect.sh +++ b/source3/script/tests/test_durable_handle_reconnect.sh @@ -33,4 +33,22 @@ testit "durable_v2_delay.durable_v2_reconnect_delay_msec" $VALGRIND \ rm $delay_inject_conf +error_inject_conf=$(dirname $SMB_CONF_PATH)/error_inject.conf + +cat > $error_inject_conf << _EOF + kernel share modes = no + kernel oplocks = no + posix locking = no + error_inject:durable_reconnect = st_ex_nlink +_EOF + +testit "durable-v2-regressions.durable_v2_reconnect_bug15624" \ + $VALGRIND $BINDIR/smbtorture //$SERVER_IP/error_inject \ + -U$USERNAME%$PASSWORD \ + --option=torture:bug15624=yes \ + smb2.durable-v2-regressions.durable_v2_reconnect_bug15624 || + failed=$(expr $failed + 1) + +rm $error_inject_conf + testok $0 $failed