[SCM] Samba Shared Repository - branch master updated
Tim Beale
timbeale at samba.org
Thu Nov 15 07:16:04 UTC 2018
The branch, master has been updated
via c1dd6382e32 ctdb-tests: Make the debug hung script test cope with unreadable stacks
from e3b6402b8b6 third_party: Update socket_wrapper to version 1.2.1
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit c1dd6382e3211792e313f7d559b943f55c9cb0e1
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Nov 14 14:09:42 2018 +1100
ctdb-tests: Make the debug hung script test cope with unreadable stacks
Ideally this would just involve using "test -r". However, operating
system security features may mean that kernel stacks are not readable
even though they appear to be.
Instead, try reading that stack of a process on the test node. If
that succeeds then so should reading the stack of the "stuck" sleep
process in the test.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13684
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Tim Beale <timbeale at catalyst.net.nz>
Autobuild-User(master): Tim Beale <timbeale at samba.org>
Autobuild-Date(master): Thu Nov 15 08:15:32 CET 2018 on sn-devel-144
-----------------------------------------------------------------------
Summary of changes:
ctdb/tests/simple/90_debug_hung_script.sh | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/ctdb/tests/simple/90_debug_hung_script.sh b/ctdb/tests/simple/90_debug_hung_script.sh
index 40f3f47480d..9e2072c98b6 100755
--- a/ctdb/tests/simple/90_debug_hung_script.sh
+++ b/ctdb/tests/simple/90_debug_hung_script.sh
@@ -58,9 +58,21 @@ wait_until 60 onnode $test_node test -s "$debug_output"
echo "Checking output of hung script debugging..."
try_command_on_node -v $test_node cat "$debug_output"
+hung_script_output="$out"
+
+# Can we actually read kernel stacks
+if try_command_on_node $test_node "cat /proc/$$/stack >/dev/null 2>&1" ; then
+ stackpat='
+---- Stack trace of interesting process [0-9]*\\[sleep\\] ----
+[<[0-9a-f]*>] .*sleep+.*
+'
+else
+ stackpat=''
+fi
while IFS="" read pattern ; do
- if grep -- "^${pattern}\$" <<<"$out" >/dev/null ; then
+ [ -n "$pattern" ] || continue
+ if grep -- "^${pattern}\$" <<<"$hung_script_output" >/dev/null ; then
printf 'GOOD: output contains "%s"\n' "$pattern"
else
printf 'BAD: output does not contain "%s"\n' "$pattern"
@@ -72,8 +84,7 @@ done <<EOF
pstree -p -a .*:
00\\\\.test\\\\.script,.*
*\`-sleep,.*
----- Stack trace of interesting process [0-9]*\\\\[sleep\\\\] ----
-[<[0-9a-f]*>] .*sleep+.*
+${stackpat}
---- ctdb scriptstatus monitor: ----
00\\.test *TIMEDOUT.*
*OUTPUT: Sleeping for [0-9]* seconds\\\\.\\\\.\\\\.
--
Samba Shared Repository
More information about the samba-cvs
mailing list