From owner-svn-src-user@FreeBSD.ORG Wed Oct 30 07:51:09 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3FC022D5; Wed, 30 Oct 2013 07:51:09 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2E8512B3A; Wed, 30 Oct 2013 07:51:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9U7p9DL070724; Wed, 30 Oct 2013 07:51:09 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9U7p9dU070723; Wed, 30 Oct 2013 07:51:09 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201310300751.r9U7p9dU070723@svn.freebsd.org> From: Peter Holm Date: Wed, 30 Oct 2013 07:51:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r257374 - 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.14 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: Wed, 30 Oct 2013 07:51:09 -0000 Author: pho Date: Wed Oct 30 07:51:08 2013 New Revision: 257374 URL: http://svnweb.freebsd.org/changeset/base/257374 Log: Do not loop forever trying to unmount a busy file system. Detach from the controlling terminal to ignore SIGSTOP. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/syscall4.sh Modified: user/pho/stress2/misc/syscall4.sh ============================================================================== --- user/pho/stress2/misc/syscall4.sh Wed Oct 30 06:18:54 2013 (r257373) +++ user/pho/stress2/misc/syscall4.sh Wed Oct 30 07:51:08 2013 (r257374) @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2011 Peter Holm +# Copyright (c) 2011-2013 Peter Holm # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -59,17 +59,24 @@ chmod 777 $mntpoint sleeptime=${sleeptime:-12} for i in `jot 10`; do -echo "Loop #$i" (cd $mntpoint; /tmp/syscall4 $* < /dev/null) & - [ $# -eq 1 ] && sleep $sleeptime || sleep 180 - killall -9 syscall4 + [ $# -eq 1 ] && sleep $sleeptime || sleep 120 + killall -9 syscall4 > /dev/null 2>&1 + wait ipcs | awk '/^(q|m|s)/ {print " -" $1, $2}' | xargs -L 1 ipcrm done -while mount | grep $mntpoint | grep -q /dev/md; do - umount $mntpoint || sleep 1 + +for i in `jot 10`; do + mount | grep -q md${mdstart}$part && \ + umount $mntpoint && mdconfig -d -u $mdstart && break + sleep 10 done -mdconfig -d -u $mdstart +if mount | grep -q md${mdstart}$part; then + fstat $mntpoint + echo "umount $mntpoint failed" + exit 1 +fi rm -f /tmp/syscall4 exit EOF @@ -276,6 +283,9 @@ main(int argc, char **argv) errx(0, "syscall #%d is on the ignore list.", syscallno); } + if (daemon(0, 0) == -1) + err(1, "daemon()"); + start = time(NULL); while ((time(NULL) - start) < 120) { if (fork() == 0) {