Date: Fri, 15 May 2015 08:29:25 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r282946 - user/pho/stress2/misc Message-ID: <201505150829.t4F8TPOR093074@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <taviso cmpxchg8b com> +# 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505150829.t4F8TPOR093074>