From owner-svn-src-user@freebsd.org Sat Jun 10 06:32:46 2017 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 282F6D86369 for ; Sat, 10 Jun 2017 06:32:46 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3CBC68E23; Sat, 10 Jun 2017 06:32:45 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5A6WiVD018781; Sat, 10 Jun 2017 06:32:44 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5A6WibN018780; Sat, 10 Jun 2017 06:32:44 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201706100632.v5A6WibN018780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Sat, 10 Jun 2017 06:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r319771 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jun 2017 06:32:46 -0000 Author: pho Date: Sat Jun 10 06:32:44 2017 New Revision: 319771 URL: https://svnweb.freebsd.org/changeset/base/319771 Log: Added a timeout. Style fixes. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/pcatch.sh Modified: user/pho/stress2/misc/pcatch.sh ============================================================================== --- user/pho/stress2/misc/pcatch.sh Sat Jun 10 06:28:41 2017 (r319770) +++ user/pho/stress2/misc/pcatch.sh Sat Jun 10 06:32:44 2017 (r319771) @@ -33,10 +33,13 @@ # when fs is suspended, and process is signaled. # Test scenario mostly by kib. - # Fixed in r275744. +# Deadlock seen: +# https://people.freebsd.org/~pho/stress/log/pcatch.txt + [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +[ -z "$DEBUG" ] && exit 0 # Waiting for fix . ../default.cfg @@ -50,12 +53,15 @@ cd $here mount | grep -q "$mntpoint" && umount $mntpoint mdconfig -l | grep -q $mdstart && mdconfig -d -u $mdstart mdconfig -a -t swap -s 1g -u $mdstart -bsdlabel -w md${mdstart} auto +bsdlabel -w md$mdstart auto newfs $newfs_flags md${mdstart}$part > /dev/null mount /dev/md${mdstart}$part $mntpoint -/tmp/pcatch $mntpoint +start=`date '+%s'` +while [ $((`date '+%s'` - start)) -lt 120 ]; do + /tmp/pcatch $mntpoint +done while mount | grep -q "on $mntpoint "; do umount $mntpoint || sleep 1 @@ -80,12 +86,12 @@ EOF #include #include -void +static void hand_sigaction(int signo __unused, siginfo_t *si __unused, void *c __unused) { } -void +static void suspend(char *path) { struct statfs s; @@ -104,7 +110,7 @@ suspend(char *path) } } -void +static void test(char *mp) { pid_t pid;