From nobody Thu Jul 04 07:15:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WF7Gf05Mzz5PGGr; Thu, 04 Jul 2024 07:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WF7Gd6hNXz4mkF; Thu, 4 Jul 2024 07:15:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720077353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L7sSWvkb+EkYEFzh+av/VQJTqjUXczhUeOIkDyOZPrw=; b=RSwp5rCXngGPttgXjgQUgBt3uyhqaZDFs0StkcZV6vqBN/3OD/oqco/2NC1EygRx6POjZ0 IP6USR9bFANkBlXq4t3lJOsDz57k2oqsTCS6Ac6wRygUwKwdyaLNLLb+d1q/kbhMXKeQ35 efDSiBgxSvQh2GG8uNSqvFw8kmjqyRY69bnRiWyx8dBma+HADo8wiPU4GPApsFCcBBWOsq vqb32F/3i+7zJLZqx+//w1Psz1Ym7IRJy+toF23JbaPRl5MNFo9Gz4r8X9sPTuX/7FAhNp tkLDtOVRDWJ0bFOW8zsKy3NIcSp4AsCKCaQOUEz1TRId12oNnHW3MOwSczmihA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720077353; a=rsa-sha256; cv=none; b=IC9MaRFiDqkjBE+Cs++MDg8qEc44rlEXECglYwgfdXKP0kFNhmh389gTm3Qc6LKLk4D9mf pYNtwMAHXOqr9Dco1Zvm7lj4xrk8BIql8RLBnhKLYmRwefnEaB/DHB964XYcR9Bl7M5tgv SfwmwJ1Ewqv5BiUjnj/x/IhQl7KHRnbp3uYA2twohITMCG5NTeFYkHGRT3QF5GiAYchVqf up/MjuqO8wqV2DaqDtqdh6eTHKNtTL8JDzk+jahfxmuWpYwtcwpLD5BpB9+s1EFo1Rcp5c VvBt8F/UTT4LSQHrKGz46/zkzjh6fmq0P2HKY/zyeTwMXEt4rmzBL2AQe/Syxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720077353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L7sSWvkb+EkYEFzh+av/VQJTqjUXczhUeOIkDyOZPrw=; b=cGiUyCWXP56PkMe1luZny5jFTxLa6Mk1LrZkFnJimQn/zmNIqEog7XswthgZtlxTMt7MHu 5fsU7icl5AgRYjaqKhCVC3XMUaS1oudLelRnCzvOTDtGVMWNPhkZ5ozDgbJm7ImzULAEv0 S4D4eC675DjyvcCwpEKU0De3JVFf5HUbmLML14kXWJMChyy4HNGYqWrwyOOTprb5AVAoSs R8j23OqfuqmajsH8jHq8KB2tURfm0DfePlqsBswcEgj8H+NPtYjHDvlbmHmkQ0dXl52abW 2a13egGvSqkjnYwG+hPQS4FaFrwpL8cGPDgz2z2QI/MAsHkiM1IvYn0SZwW4Xw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WF7Gd6HYVz14gN; Thu, 4 Jul 2024 07:15:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4647FrdK060102; Thu, 4 Jul 2024 07:15:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4647FrsM060099; Thu, 4 Jul 2024 07:15:53 GMT (envelope-from git) Date: Thu, 4 Jul 2024 07:15:53 GMT Message-Id: <202407040715.4647FrsM060099@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: ad99f0062b34 - main - stress2: Added a new unionfs test scenario List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad99f0062b34b7060381a48b89212fc3a3b3fa2e Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=ad99f0062b34b7060381a48b89212fc3a3b3fa2e commit ad99f0062b34b7060381a48b89212fc3a3b3fa2e Author: Peter Holm AuthorDate: 2024-07-04 07:13:39 +0000 Commit: Peter Holm CommitDate: 2024-07-04 07:13:39 +0000 stress2: Added a new unionfs test scenario --- tools/test/stress2/misc/unionfs19.sh | 74 ++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/tools/test/stress2/misc/unionfs19.sh b/tools/test/stress2/misc/unionfs19.sh new file mode 100755 index 000000000000..a4e31ad0857e --- /dev/null +++ b/tools/test/stress2/misc/unionfs19.sh @@ -0,0 +1,74 @@ +#!/bin/sh + +# +# Copyright (c) 2024 Peter Holm +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# umount FS with memory mapped file +# "panic: general protection fault" seen: +# https://people.freebsd.org/~pho/stress/log/log0519.txt + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg + +prog=$(basename "$0" .sh) +here=`pwd` +log=/tmp/$prog.log +md1=$mdstart +md2=$((md1 + 1)) +mp1=/mnt$md1 +mp2=/mnt$md2 + +set -e +mdconfig -l | grep -q md$md && mdconfig -d -u $md1 +mdconfig -l | grep -q md$u2 && mdconfig -d -u $md2 + +mdconfig -s 2g -u $md1 +newfs $newfs_flags /dev/md$md1 > /dev/null +mdconfig -s 2g -u $md2 +newfs $newfs_flags /dev/md$md2 > /dev/null + +mkdir -p $mp1 $mp2 +mount /dev/md$md1 $mp1 +mount /dev/md$md2 $mp2 +mount -t unionfs -o noatime $mp1 $mp2 +mount | grep -E "$mp1|$mp2" +set +e + +export RUNDIR=$mp2/stressX +export runRUNTIME=2m +export LOAD=70 +export mmapLOAD=100 +export TESTPROGS="testcases/mmap/mmap testcases/swap/swap" + +(cd ..; ./testcases/run/run $TESTPROGS > /dev/null 2>&1) & rpid=$! +sleep 5 + +tail -F -n 0 /var/log/messages > $log & lpid=$! + +start=`date +%s` +while [ $((`date +%s` - start)) -lt 120 ]; do + umount -f $mp2 && + mount -t unionfs -o noatime $mp1 $mp2 + sleep 5 + mount | grep -q unionfs || break + pgrep -q mmap || break +done +pkill run swap mmap +while pgrep -q swap; do pkill swap; done +wait $rpid + +umount $mp2 # The unionfs mount +umount $mp2 +umount $mp1 + +mdconfig -d -u $md1 +mdconfig -d -u $md2 + +kill $lpid && wait $lpid +grep -m 1 "pager read error" $log && s=1 || s=0 +rm $log +exit $s