Whamcloud - gitweb
LU-8367 tests: cleanup_orphans hang reproducer 39/46939/7
authorAlexander Boyko <alexander.boyko@hpe.com>
Thu, 12 May 2022 13:49:34 +0000 (09:49 -0400)
committerOleg Drokin <green@whamcloud.com>
Mon, 12 Sep 2022 02:51:40 +0000 (02:51 +0000)
The patch adds recovery-small 144 test to reproduce hang at
osp_precreate_cleanup_orphans().

PID: 49938  TASK: ffff98c63a248000  CPU: 30  COMMAND: "osp-pre-3-1"
__schedule at ffffffff8e54e1d4
schedule at ffffffff8e54e648
osp_precreate_cleanup_orphans at ffffffffc17d00e9 [osp]
osp_precreate_thread at ffffffffc17d18da [osp]

Test-Parameters: trivial testlist=recovery-small env=ONLY=144b
HPE-bug-id: LUS-10793
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: I463c75e63043c71ed0de0c6d08294098099c67e5
Reviewed-on: https://review.whamcloud.com/46939
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sergey Cheremencev <sergey.cheremencev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/recovery-small.sh

index 438b854..9aeb52e 100755 (executable)
@@ -3129,6 +3129,43 @@ test_144a() {
 }
 run_test 144a "MDT failover should stop precreation threads"
 
+test_144b() {
+       [[ $($LCTL get_param mdc.*.import) =~ connect_flags.*overstriping ]] ||
+               skip "server does not support overstriping"
+
+       local pids=""
+       local rc=0
+       local setcount=1000
+       local mds_timeout
+
+       large_xattr_enabled || skip_env "ea_inode feature disabled"
+       test_mkdir -i 0 -c 1 -p $DIR/$tdir
+       stack_trap "rm -rf $DIR/$tdir" EXIT
+
+       mds_timeout=$(do_facet mds1 $LCTL get_param -n timeout)
+       do_nodes $(comma_list $(mdts_nodes)) $LCTL set_param timeout=300
+       stack_trap "do_nodes $(comma_list $(mdts_nodes)) $LCTL set_param timeout=$mds_timeout" EXIT
+
+       $LFS setstripe -i 0 -C $setcount $DIR/$tdir || error "setstripe failed"
+
+       for (( i = 0; i < 50; i++)); do
+               touch $DIR/$tdir/$tfile_$i &
+               pids="$pids $!"
+       done
+
+       fail ost1
+       sleep 60
+
+       for pid in $pids; do
+               ps -p $pid > /dev/null
+               (( $? == 0 )) && rc=1
+               kill -9 $pid >/dev/null 2>&1
+       done
+       echo "rc $rc"
+       (( $rc == 0 )) || { fail mds1; error "Create thread still running"; }
+}
+run_test 144b "orphan cleanup shouldn't be blocked for no objects+failover situation"
+
 test_145() {
        [ $MDSCOUNT -lt 3 ] && skip "needs >= 3 MDTs"
        [ $(facet_active_host mds2) = $(facet_active_host mds3) ] &&