From owner-svn-src-user@FreeBSD.ORG Sun May 10 12:41:35 2015 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44E418F6; Sun, 10 May 2015 12:41:35 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34032194E; Sun, 10 May 2015 12:41:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ACfZMN009539; Sun, 10 May 2015 12:41:35 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ACfZEa009538; Sun, 10 May 2015 12:41:35 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201505101241.t4ACfZEa009538@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Sun, 10 May 2015 12:41:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r282724 - 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.20 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: Sun, 10 May 2015 12:41:35 -0000 Author: pho Date: Sun May 10 12:41:34 2015 New Revision: 282724 URL: https://svnweb.freebsd.org/changeset/base/282724 Log: Added a regression test. Sponsored by: EMC / Isilon storage division Added: user/pho/stress2/misc/execve.sh (contents, props changed) Added: user/pho/stress2/misc/execve.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/execve.sh Sun May 10 12:41:34 2015 (r282724) @@ -0,0 +1,132 @@ +#!/bin/sh + +# +# Copyright (c) 2015 EMC Corp. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# Test of execve(2) from a threaded program. +# "load: 5.40 cmd: bash 24517 [vmmaps] 2.45r 0.00u 0.00s 0% 3448k" seen. +# Fixed by r282708. + +. ../default.cfg + +here=`pwd` +cd /tmp +sed '1,/^EOF/d' < $here/$0 > execve.c +mycc -o execve -Wall -Wextra -O2 execve.c -lpthread || exit 1 +rm -f execve.c + +daemon sh -c "(cd $here/../testcases/swap; ./swap -t 20m -i 20 -l 100)" > \ + /dev/null 2>&1 +sleep `jot -r 1 1 9` +for i in `jot 2`; do + /tmp/execve +done +while pgrep -q swap; do + pkill -9 swap +done + +rm -f /tmp/execve /tmp/execve.core +exit 0 +EOF +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define LOOPS 50 +#define PARALLEL 50 + +volatile int go; + +void * +texecve(void *arg __unused) +{ + char *cmdline[] = { "/usr/bin/true", NULL }; + + while (go == 0) + usleep(100); + if (execve(cmdline[0], cmdline, NULL) == -1) + err(1, "execve"); + + return (NULL); +} + +void +test(void) +{ + pthread_t tid[5]; + int i, rc; + + go = 0; + + for (i = 0; i < 5; i++) { + if ((rc = pthread_create(&tid[i], NULL, texecve, NULL)) != 0) + errc(1, rc, "texecve()"); + } + + usleep(arc4random() % 2000); + go = 1; + + for (i = 0; i < 5; i++) + if ((rc = pthread_join(tid[i], NULL)) != 0) + errc(1, rc, "pthread_join(%d)", i); + _exit(0); +} + +int +main(void) +{ + struct rlimit rl; + int i, j; + + rl.rlim_max = rl.rlim_cur = 0; + if (setrlimit(RLIMIT_CORE, &rl) == -1) + warn("setrlimit"); + + for (i = 0; i < LOOPS; i++) { + for (j = 0; j < PARALLEL; j++) { + if (fork() == 0) + test(); + } + + for (j = 0; j < PARALLEL; j++) + wait(NULL); + } + + return (0); +} From owner-svn-src-user@FreeBSD.ORG Thu May 14 04:17:59 2015 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B55303CE; Thu, 14 May 2015 04:17:59 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4438167A; Thu, 14 May 2015 04:17:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4E4Hxls028369; Thu, 14 May 2015 04:17:59 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4E4HxQj028368; Thu, 14 May 2015 04:17:59 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505140417.t4E4HxQj028368@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 14 May 2015 04:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r282876 - user/gjb/thermite 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.20 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: Thu, 14 May 2015 04:17:59 -0000 Author: gjb Date: Thu May 14 04:17:58 2015 New Revision: 282876 URL: https://svnweb.freebsd.org/changeset/base/282876 Log: Send output log for all architectures. This script needs a serious rewrite. Sponsored by: The FreeBSD Foundation Modified: user/gjb/thermite/thermite.sh Modified: user/gjb/thermite/thermite.sh ============================================================================== --- user/gjb/thermite/thermite.sh Thu May 14 04:05:34 2015 (r282875) +++ user/gjb/thermite/thermite.sh Thu May 14 04:17:58 2015 (r282876) @@ -262,6 +262,8 @@ build_release() { -c ${_conf} >> ${logdir}/${_build}.log ;; *) + ls -1 ${CHROOTDIR}/R/* >> ${logdir}/${_build}.log + send_logmail ${logdir}/${_build}.log ${_build} return 0 ;; esac From owner-svn-src-user@FreeBSD.ORG Thu May 14 19:49:00 2015 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 422ACF80; Thu, 14 May 2015 19:49:00 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30B5A1A1D; Thu, 14 May 2015 19:49:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EJn0Xc013943; Thu, 14 May 2015 19:49:00 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EJmwXj013925; Thu, 14 May 2015 19:48:58 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201505141948.t4EJmwXj013925@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Thu, 14 May 2015 19:48:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r282919 - 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.20 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: Thu, 14 May 2015 19:49:00 -0000 Author: pho Date: Thu May 14 19:48:57 2015 New Revision: 282919 URL: https://svnweb.freebsd.org/changeset/base/282919 Log: Trim back the VM pressure if no swap disk is used, Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/crossmp3.sh user/pho/stress2/misc/crossmp4.sh user/pho/stress2/misc/crossmp5.sh user/pho/stress2/misc/mlockall2.sh user/pho/stress2/misc/pfl.sh user/pho/stress2/misc/pfl2.sh user/pho/stress2/misc/tmpfs.sh user/pho/stress2/misc/tmpfs13.sh Modified: user/pho/stress2/misc/crossmp3.sh ============================================================================== --- user/pho/stress2/misc/crossmp3.sh Thu May 14 19:48:15 2015 (r282918) +++ user/pho/stress2/misc/crossmp3.sh Thu May 14 19:48:57 2015 (r282919) @@ -41,7 +41,9 @@ . ../default.cfg N=`sysctl -n hw.ncpu` -size=$((`sysctl -n hw.usermem` / 1024 / 1024 / N)) +usermem=`sysctl -n hw.usermem` +[ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80)) +size=$((usermem / 1024 / 1024 / N)) mounts=$N # Number of parallel scripts Modified: user/pho/stress2/misc/crossmp4.sh ============================================================================== --- user/pho/stress2/misc/crossmp4.sh Thu May 14 19:48:15 2015 (r282918) +++ user/pho/stress2/misc/crossmp4.sh Thu May 14 19:48:57 2015 (r282919) @@ -39,7 +39,9 @@ . ../default.cfg N=`sysctl -n hw.ncpu` -size=$((`sysctl -n hw.usermem` / 1024 / 1024)) +usermem=`sysctl -n hw.usermem` +[ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80)) +size=$((usermem / 1024 / 1024 / N)) mounts=$N # Number of parallel scripts Modified: user/pho/stress2/misc/crossmp5.sh ============================================================================== --- user/pho/stress2/misc/crossmp5.sh Thu May 14 19:48:15 2015 (r282918) +++ user/pho/stress2/misc/crossmp5.sh Thu May 14 19:48:57 2015 (r282919) @@ -35,7 +35,9 @@ . ../default.cfg N=`sysctl -n hw.ncpu` -size=$((`sysctl -n hw.usermem` / 1024 / 1024 / N)) +usermem=`sysctl -n hw.usermem` +[ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80)) +size=$((usermem / 1024 / 1024 / N)) mounts=$N # Number of parallel scripts Modified: user/pho/stress2/misc/mlockall2.sh ============================================================================== --- user/pho/stress2/misc/mlockall2.sh Thu May 14 19:48:15 2015 (r282918) +++ user/pho/stress2/misc/mlockall2.sh Thu May 14 19:48:57 2015 (r282919) @@ -35,7 +35,8 @@ # core dumps seen in watchdogd after mlockall() was added. # This scenario demonstrates the problem. Fixed in r242012. -mem=`sysctl hw.usermem | awk '{print $NF}'` +mem=`sysctl -n hw.usermem` +[ `swapinfo | wc -l` -eq 1 ] && mem=$((mem/100*60)) here=`pwd` cd /tmp Modified: user/pho/stress2/misc/pfl.sh ============================================================================== --- user/pho/stress2/misc/pfl.sh Thu May 14 19:48:15 2015 (r282918) +++ user/pho/stress2/misc/pfl.sh Thu May 14 19:48:57 2015 (r282919) @@ -47,10 +47,17 @@ mp2=${mntpoint}2 md1=$mdstart md2=$((mdstart + 1)) +usermem=`sysctl -n hw.usermem` +[ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80)) +size=$((2 * 1024 * 1024 * 1024)) # Ideal disk size is 2G +[ $((size * 2)) -gt $usermem ] && size=$((usermem / 2)) +size=$((size / 1024 / 1024)) + opt=$([ $((`date '+%s'` % 2)) -eq 0 ] && echo "-j" || echo "-U") +[ "$newfs_flags" = "-U" ] || opt="" mount | grep "on $mp1 " | grep -q /dev/md && umount -f $mp1 mdconfig -l | grep -q md$md1 && mdconfig -d -u $md1 -mdconfig -a -t swap -s 2g -u $md1 +mdconfig -a -t swap -s ${size}m -u $md1 bsdlabel -w md$md1 auto newfs $opt md${md1}$part > /dev/null mount /dev/md${md1}$part $mp1 @@ -58,7 +65,7 @@ chmod 777 $mp1 mount | grep "on $mp2 " | grep -q /dev/md && umount -f $mp2 mdconfig -l | grep -q md$md2 && mdconfig -d -u $md2 -mdconfig -a -t swap -s 2g -u $md2 +mdconfig -a -t swap -s ${size}m -u $md2 bsdlabel -w md$md2 auto newfs $opt md${md2}$part > /dev/null mount /dev/md${md2}$part $mp2 Modified: user/pho/stress2/misc/pfl2.sh ============================================================================== --- user/pho/stress2/misc/pfl2.sh Thu May 14 19:48:15 2015 (r282918) +++ user/pho/stress2/misc/pfl2.sh Thu May 14 19:48:57 2015 (r282919) @@ -36,16 +36,24 @@ . ../default.cfg +[ `swapinfo | wc -l` -eq 1 ] && exit 0 + mp1=$mntpoint mp2=${mntpoint}2 [ -d $mp2 ] || mkdir -p $mp2 md1=$mdstart md2=$((mdstart + 1)) +usermem=`sysctl -n hw.usermem` +size=$((2 * 1024 * 1024 * 1024)) # Ideal disk size is 2G +[ $((size * 2)) -gt $usermem ] && size=$((usermem / 2)) +size=$((size / 1024 / 1024)) + opt=$([ $((`date '+%s'` % 2)) -eq 0 ] && echo "-j" || echo "-U") +[ "$newfs_flags" = "-U" ] || opt="" mount | grep "on $mp1 " | grep -q /dev/md && umount -f $mp1 mdconfig -l | grep -q md$md1 && mdconfig -d -u $md1 -mdconfig -a -t swap -s 2g -u $md1 +mdconfig -a -t swap -s ${size}m -u $md1 bsdlabel -w md$md1 auto newfs $opt md${md1}$part > /dev/null mount /dev/md${md1}$part $mp1 @@ -53,7 +61,7 @@ chmod 777 $mp1 mount | grep "on $mp2 " | grep -q /dev/md && umount -f $mp2 mdconfig -l | grep -q md$md2 && mdconfig -d -u $md2 -mdconfig -a -t swap -s 2g -u $md2 +mdconfig -a -t swap -s ${size}m -u $md2 bsdlabel -w md$md2 auto newfs $opt md${md2}$part > /dev/null mount /dev/md${md2}$part $mp2 Modified: user/pho/stress2/misc/tmpfs.sh ============================================================================== --- user/pho/stress2/misc/tmpfs.sh Thu May 14 19:48:15 2015 (r282918) +++ user/pho/stress2/misc/tmpfs.sh Thu May 14 19:48:57 2015 (r282919) @@ -35,7 +35,10 @@ . ../default.cfg mount | grep "$mntpoint" | grep -q tmpfs && umount $mntpoint -mount -t tmpfs tmpfs $mntpoint +usermem=`sysctl -n hw.usermem` +[ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80)) +size=$((usermem / 1024 / 1024 / 2)) +mount -o size=${size}m -t tmpfs tmpfs $mntpoint export RUNDIR=$mntpoint/stressX export runRUNTIME=10m # Run tests for 10 minutes Modified: user/pho/stress2/misc/tmpfs13.sh ============================================================================== --- user/pho/stress2/misc/tmpfs13.sh Thu May 14 19:48:15 2015 (r282918) +++ user/pho/stress2/misc/tmpfs13.sh Thu May 14 19:48:57 2015 (r282919) @@ -39,7 +39,9 @@ . ../default.cfg N=`sysctl -n hw.ncpu` -size=$((`sysctl -n hw.usermem` / 1024 / 1024 / N)) +usermem=`sysctl -n hw.usermem` +[ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80)) +size=$((usermem / 1024 / 1024 / 2)) export runRUNTIME=15m export RUNDIR=$mp1/stressX From owner-svn-src-user@FreeBSD.ORG Fri May 15 05:41:31 2015 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52A97106; Fri, 15 May 2015 05:41:31 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27C1B16E5; Fri, 15 May 2015 05:41:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F5fVhR011640; Fri, 15 May 2015 05:41:31 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F5fVB7011639; Fri, 15 May 2015 05:41:31 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201505150541.t4F5fVB7011639@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Fri, 15 May 2015 05:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r282935 - 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.20 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: Fri, 15 May 2015 05:41:31 -0000 Author: pho Date: Fri May 15 05:41:30 2015 New Revision: 282935 URL: https://svnweb.freebsd.org/changeset/base/282935 Log: Added an old regression test. Sponsored by: EMC / Isilon storage division Added: user/pho/stress2/misc/ffs_syncvnode.sh (contents, props changed) Added: user/pho/stress2/misc/ffs_syncvnode.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/ffs_syncvnode.sh Fri May 15 05:41:30 2015 (r282935) @@ -0,0 +1,61 @@ +#!/bin/sh + +# +# Copyright (c) 2012 Peter Holm +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# "panic: flush_newblk_deps: Bad newblk 0xc8d2ac00" seen. + +# "panic: softdep_deallocate_dependencies: dangling deps" seen with +# /mnt: out of inodes. 20130627. + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg + +mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint +mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart + +mdconfig -a -t swap -s 2g -u $mdstart || exit 1 +bsdlabel -w md$mdstart auto + +newfs $newfs_flags md${mdstart}$part > /dev/null + +mount /dev/md${mdstart}$part $mntpoint +chmod 777 $mntpoint + +export runRUNTIME=30m +export RUNDIR=$mntpoint/stressX + +find -x / -type f > /dev/null 2>&1 & +su $testuser -c 'cd ..; ./run.sh disk.cfg' +wait + +while mount | grep $mntpoint | grep -q /dev/md; do + umount $mntpoint || sleep 1 +done +mdconfig -d -u $mdstart From owner-svn-src-user@FreeBSD.ORG Fri May 15 05:42:40 2015 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C90E1F9; Fri, 15 May 2015 05:42:40 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BA7D16EB; Fri, 15 May 2015 05:42:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F5gd3M011830; Fri, 15 May 2015 05:42:39 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F5gdJW011829; Fri, 15 May 2015 05:42:39 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201505150542.t4F5gdJW011829@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Fri, 15 May 2015 05:42:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r282936 - 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.20 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: Fri, 15 May 2015 05:42:40 -0000 Author: pho Date: Fri May 15 05:42:39 2015 New Revision: 282936 URL: https://svnweb.freebsd.org/changeset/base/282936 Log: Code cleanup. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/core3.sh Modified: user/pho/stress2/misc/core3.sh ============================================================================== --- user/pho/stress2/misc/core3.sh Fri May 15 05:41:30 2015 (r282935) +++ user/pho/stress2/misc/core3.sh Fri May 15 05:42:39 2015 (r282936) @@ -49,7 +49,6 @@ mount | grep -q "on $mntpoint " && umoun mdconfig -a -t swap -s 1g -u $mdstart bsdlabel -w md$mdstart auto newfs $newfs_flags md${mdstart}$part > /dev/null -chmod 755 /mnt mount /dev/md${mdstart}$part $mntpoint mkdir $mntpoint/d chmod 777 $mntpoint/d From owner-svn-src-user@FreeBSD.ORG Fri May 15 05:45:09 2015 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE844310; Fri, 15 May 2015 05:45:09 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83AF41702; Fri, 15 May 2015 05:45:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F5j9Me012258; Fri, 15 May 2015 05:45:09 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F5j8JN012255; Fri, 15 May 2015 05:45:08 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201505150545.t4F5j8JN012255@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Fri, 15 May 2015 05:45:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r282937 - 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.20 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: Fri, 15 May 2015 05:45:09 -0000 Author: pho Date: Fri May 15 05:45:08 2015 New Revision: 282937 URL: https://svnweb.freebsd.org/changeset/base/282937 Log: Reduce disk size on hosts with limited memory. Modified: user/pho/stress2/misc/graid0.sh user/pho/stress2/misc/graid1.sh user/pho/stress2/misc/graid3.sh Modified: user/pho/stress2/misc/graid0.sh ============================================================================== --- user/pho/stress2/misc/graid0.sh Fri May 15 05:42:39 2015 (r282936) +++ user/pho/stress2/misc/graid0.sh Fri May 15 05:45:08 2015 (r282937) @@ -38,9 +38,13 @@ md1=$mdstart md2=$((mdstart + 1)) md3=$((mdstart + 2)) +size=1g +[ $((`sysctl -n hw.usermem` / 1024 / 1024 / 1024)) -le 4 ] && + size=512m + for u in $md1 $md2 $md3; do mdconfig -l | grep -q md$u && mdconfig -d -u $u - mdconfig -a -t swap -s 1g -u $u + mdconfig -a -t swap -s $size -u $u done gstripe load > /dev/null 2>&1 Modified: user/pho/stress2/misc/graid1.sh ============================================================================== --- user/pho/stress2/misc/graid1.sh Fri May 15 05:42:39 2015 (r282936) +++ user/pho/stress2/misc/graid1.sh Fri May 15 05:45:08 2015 (r282937) @@ -38,9 +38,13 @@ md1=$mdstart md2=$((mdstart + 1)) md3=$((mdstart + 2)) +size=1g +[ $((`sysctl -n hw.usermem` / 1024 / 1024 / 1024)) -le 4 ] && + size=512m + for u in $md1 $md2 $md3; do mdconfig -l | grep -q md$u && mdconfig -d -u $u - mdconfig -a -t swap -s 1g -u $u + mdconfig -a -t swap -s $size -u $u done gmirror load > /dev/null 2>&1 Modified: user/pho/stress2/misc/graid3.sh ============================================================================== --- user/pho/stress2/misc/graid3.sh Fri May 15 05:42:39 2015 (r282936) +++ user/pho/stress2/misc/graid3.sh Fri May 15 05:45:08 2015 (r282937) @@ -39,9 +39,13 @@ md1=$mdstart md2=$((mdstart + 1)) md3=$((mdstart + 2)) +size=1g +[ $((`sysctl -n hw.usermem` / 1024 / 1024 / 1024)) -le 4 ] && + size=512m + for u in $md1 $md2 $md3; do mdconfig -l | grep -q md$u && mdconfig -d -u $u - mdconfig -a -t swap -s 1g -u $u + mdconfig -a -t swap -s $size -u $u done graid3 load > /dev/null 2>&1 From owner-svn-src-user@FreeBSD.ORG Fri May 15 06:05:31 2015 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C2255E6; Fri, 15 May 2015 06:05:31 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61A9818E1; Fri, 15 May 2015 06:05:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F65VkO022222; Fri, 15 May 2015 06:05:31 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F65VlZ022221; Fri, 15 May 2015 06:05:31 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201505150605.t4F65VlZ022221@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Fri, 15 May 2015 06:05:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r282938 - user/ed/newcons 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.20 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: Fri, 15 May 2015 06:05:31 -0000 Author: ed Date: Fri May 15 06:05:30 2015 New Revision: 282938 URL: https://svnweb.freebsd.org/changeset/base/282938 Log: Remove the Newcons branch. This code has been integrated into HEAD. Deleted: user/ed/newcons/ From owner-svn-src-user@FreeBSD.ORG Fri May 15 08:29:25 2015 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9F00BA9; Fri, 15 May 2015 08:29:25 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E81C19FC; Fri, 15 May 2015 08:29:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F8TPgK093075; Fri, 15 May 2015 08:29:25 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F8TPOR093074; Fri, 15 May 2015 08:29:25 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201505150829.t4F8TPOR093074@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Fri, 15 May 2015 08:29:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r282946 - 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.20 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: Fri, 15 May 2015 08:29:25 -0000 Author: pho Date: Fri May 15 08:29:24 2015 New Revision: 282946 URL: https://svnweb.freebsd.org/changeset/base/282946 Log: Added description of two out of *many* problems found by this scenario, use pgrep(1), added en extra search directory to fts(2) and added the possibility to run the test as root. 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 Fri May 15 07:57:47 2015 (r282945) +++ user/pho/stress2/misc/syscall4.sh Fri May 15 08:29:24 2015 (r282946) @@ -31,6 +31,15 @@ # Threaded syscall(2) fuzz test inspired by the iknowthis test suite # by Tavis Ormandy +# Sample problems found: +# Thread stuck in stopprof. +# http://people.freebsd.org/~pho/stress/log/kostik732.txt +# Fixed by r275121. + +# panic: td 0xcbe1ac40 is not suspended. +# https://people.freebsd.org/~pho/stress/log/kostik807.txt +# Fixed by r282944. + [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 . ../default.cfg @@ -64,7 +73,8 @@ while [ $((`date '+%s'` - st)) -lt $((10 (cd $mntpoint; /tmp/syscall4 $* ) & start=`date '+%s'` while [ $((`date '+%s'` - start)) -lt $sleeptime ]; do - ps aux | grep -v grep | egrep -q "syscall4$" || break +# ps aux | grep -v grep | egrep -q "syscall4$" || break + pgrep syscall4 > /dev/null || break sleep .5 done while pkill -9 syscall4; do @@ -192,15 +202,16 @@ test(void *arg __unused) FTS *fts; FTSENT *p; int ftsoptions; - char *args[5]; + char *args[6]; int i; ftsoptions = FTS_PHYSICAL; args[0] = "/dev"; args[1] = "/proc"; args[2] = "/usr/compat/linux/proc"; - args[3] = "."; - args[4] = 0; + args[3] = "/ifs"; + args[4] = "."; + args[5] = 0; for (;;) { for (i = 0; i < N; i++) @@ -290,11 +301,15 @@ main(int argc, char **argv) if ((pw = getpwnam("nobody")) == NULL) err(1, "no such user: nobody"); - if (setgroups(1, &pw->pw_gid) || - setegid(pw->pw_gid) || setgid(pw->pw_gid) || - seteuid(pw->pw_uid) || setuid(pw->pw_uid)) - err(1, "Can't drop privileges to \"nobody\""); - endpwent(); + if (getenv("USE_ROOT")) + fprintf(stderr, "Running syscall4 as root.\n"); + else { + if (setgroups(1, &pw->pw_gid) || + setegid(pw->pw_gid) || setgid(pw->pw_gid) || + seteuid(pw->pw_uid) || setuid(pw->pw_uid)) + err(1, "Can't drop privileges to \"nobody\""); + endpwent(); + } limit.rlim_cur = limit.rlim_max = 1000; #if defined(RLIMIT_NPTS)