From owner-svn-src-user@freebsd.org Fri Nov 27 08:41:39 2020 Return-Path: Delivered-To: svn-src-user@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BA6BB4A1DFA for ; Fri, 27 Nov 2020 08:41:39 +0000 (UTC) (envelope-from pho@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cj7QW3Lxlz4mBn; Fri, 27 Nov 2020 08:41:39 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2452412C29; Fri, 27 Nov 2020 08:41:39 +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 0AR8fc5J080087; Fri, 27 Nov 2020 08:41:38 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0AR8fcm3080086; Fri, 27 Nov 2020 08:41:38 GMT (envelope-from pho@FreeBSD.org) Message-Id: <202011270841.0AR8fcm3080086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Fri, 27 Nov 2020 08:41:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r368094 - user/pho/stress2/misc X-SVN-Group: user X-SVN-Commit-Author: pho X-SVN-Commit-Paths: user/pho/stress2/misc X-SVN-Commit-Revision: 368094 X-SVN-Commit-Repository: base 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.34 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, 27 Nov 2020 08:41:39 -0000 Author: pho Date: Fri Nov 27 08:41:38 2020 New Revision: 368094 URL: https://svnweb.freebsd.org/changeset/base/368094 Log: Dial down VM pressure a bit to avoid "CAM taskq" being stuck in vmwait. Modified: user/pho/stress2/misc/crossmp4.sh Modified: user/pho/stress2/misc/crossmp4.sh ============================================================================== --- user/pho/stress2/misc/crossmp4.sh Fri Nov 27 08:00:32 2020 (r368093) +++ user/pho/stress2/misc/crossmp4.sh Fri Nov 27 08:41:38 2020 (r368094) @@ -44,7 +44,7 @@ N=`sysctl -n hw.ncpu` usermem=`sysctl -n hw.usermem` [ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80)) -size=$((usermem / 1024 / 1024)) +size=$((usermem / 1024 / 1024 - 2)) CONT=/tmp/crossmp4.continue mounts=$N # Number of parallel scripts From owner-svn-src-user@freebsd.org Fri Nov 27 08:54:00 2020 Return-Path: Delivered-To: svn-src-user@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E5594A243E for ; Fri, 27 Nov 2020 08:54:00 +0000 (UTC) (envelope-from pho@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cj7hm0DDgz4n5C; Fri, 27 Nov 2020 08:54:00 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EEC0212F0B; Fri, 27 Nov 2020 08:53:59 +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 0AR8rxI2090102; Fri, 27 Nov 2020 08:53:59 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0AR8rxKP090101; Fri, 27 Nov 2020 08:53:59 GMT (envelope-from pho@FreeBSD.org) Message-Id: <202011270853.0AR8rxKP090101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Fri, 27 Nov 2020 08:53:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r368096 - user/pho/stress2/misc X-SVN-Group: user X-SVN-Commit-Author: pho X-SVN-Commit-Paths: user/pho/stress2/misc X-SVN-Commit-Revision: 368096 X-SVN-Commit-Repository: base 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.34 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, 27 Nov 2020 08:54:00 -0000 Author: pho Date: Fri Nov 27 08:53:59 2020 New Revision: 368096 URL: https://svnweb.freebsd.org/changeset/base/368096 Log: Lower the overall runtime by ensuring that all tests start before the system load sets in. Modified: user/pho/stress2/misc/syzkaller26.sh Modified: user/pho/stress2/misc/syzkaller26.sh ============================================================================== --- user/pho/stress2/misc/syzkaller26.sh Fri Nov 27 08:45:43 2020 (r368095) +++ user/pho/stress2/misc/syzkaller26.sh Fri Nov 27 08:53:59 2020 (r368096) @@ -149,6 +149,7 @@ void execute_one(void) } int main(void) { + sleep(2); /* pho */ syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x1012ul, -1, 0ul); loop(); return 0; From owner-svn-src-user@freebsd.org Fri Nov 27 09:05:12 2020 Return-Path: Delivered-To: svn-src-user@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70A564A2E16 for ; Fri, 27 Nov 2020 09:05:12 +0000 (UTC) (envelope-from pho@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cj7xh2myhz4p25; Fri, 27 Nov 2020 09:05:12 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E04013033; Fri, 27 Nov 2020 09:05:12 +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 0AR95CYd096348; Fri, 27 Nov 2020 09:05:12 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0AR95C5i096347; Fri, 27 Nov 2020 09:05:12 GMT (envelope-from pho@FreeBSD.org) Message-Id: <202011270905.0AR95C5i096347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Fri, 27 Nov 2020 09:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r368098 - user/pho/stress2/misc X-SVN-Group: user X-SVN-Commit-Author: pho X-SVN-Commit-Paths: user/pho/stress2/misc X-SVN-Commit-Revision: 368098 X-SVN-Commit-Repository: base 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.34 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, 27 Nov 2020 09:05:12 -0000 Author: pho Date: Fri Nov 27 09:05:11 2020 New Revision: 368098 URL: https://svnweb.freebsd.org/changeset/base/368098 Log: Limit runtime. Modified: user/pho/stress2/misc/syzkaller4.sh Modified: user/pho/stress2/misc/syzkaller4.sh ============================================================================== --- user/pho/stress2/misc/syzkaller4.sh Fri Nov 27 09:00:21 2020 (r368097) +++ user/pho/stress2/misc/syzkaller4.sh Fri Nov 27 09:05:11 2020 (r368098) @@ -378,7 +378,7 @@ EOF mycc -o /tmp/syzkaller4 -Wall -Wextra -O2 /tmp/syzkaller4.c -lpthread || exit 1 -(cd /tmp; ./syzkaller4) +(cd /tmp; timeout 5m ./syzkaller4) -rm /tmp/syzkaller4 /tmp/syzkaller4.c +rm -f /tmp/syzkaller4 /tmp/syzkaller4.c exit 0 From owner-svn-src-user@freebsd.org Fri Nov 27 09:07:46 2020 Return-Path: Delivered-To: svn-src-user@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB8D84A2988 for ; Fri, 27 Nov 2020 09:07:46 +0000 (UTC) (envelope-from pho@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cj80f4VWHz4pCj; Fri, 27 Nov 2020 09:07: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8D50B12FA4; Fri, 27 Nov 2020 09:07:46 +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 0AR97kBi096510; Fri, 27 Nov 2020 09:07:46 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0AR97kuw096509; Fri, 27 Nov 2020 09:07:46 GMT (envelope-from pho@FreeBSD.org) Message-Id: <202011270907.0AR97kuw096509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Fri, 27 Nov 2020 09:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r368099 - user/pho/stress2/misc X-SVN-Group: user X-SVN-Commit-Author: pho X-SVN-Commit-Paths: user/pho/stress2/misc X-SVN-Commit-Revision: 368099 X-SVN-Commit-Repository: base 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.34 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, 27 Nov 2020 09:07:46 -0000 Author: pho Date: Fri Nov 27 09:07:46 2020 New Revision: 368099 URL: https://svnweb.freebsd.org/changeset/base/368099 Log: Ignore expected error message from umount(8). Modified: user/pho/stress2/misc/suj33.sh Modified: user/pho/stress2/misc/suj33.sh ============================================================================== --- user/pho/stress2/misc/suj33.sh Fri Nov 27 09:05:11 2020 (r368098) +++ user/pho/stress2/misc/suj33.sh Fri Nov 27 09:07:46 2020 (r368099) @@ -52,7 +52,7 @@ chmod 777 $mntpoint su $testuser -c '(cd ..; ./run.sh disk.cfg)' > /dev/null 2>&1 & sleep 20 -umount $mntpoint +umount $mntpoint > /dev/null 2>&1 kill $! ../tools/killall.sh || exit wait From owner-svn-src-user@freebsd.org Sat Nov 28 08:07:56 2020 Return-Path: Delivered-To: svn-src-user@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 009B847A52F for ; Sat, 28 Nov 2020 08:07:55 +0000 (UTC) (envelope-from pho@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cjkd76BH8z3LGy; Sat, 28 Nov 2020 08:07:55 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C2EB22420E; Sat, 28 Nov 2020 08:07:55 +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 0AS87tpn052276; Sat, 28 Nov 2020 08:07:55 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0AS87tBc052275; Sat, 28 Nov 2020 08:07:55 GMT (envelope-from pho@FreeBSD.org) Message-Id: <202011280807.0AS87tBc052275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Sat, 28 Nov 2020 08:07:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r368120 - user/pho/stress2/misc X-SVN-Group: user X-SVN-Commit-Author: pho X-SVN-Commit-Paths: user/pho/stress2/misc X-SVN-Commit-Revision: 368120 X-SVN-Commit-Repository: base 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.34 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, 28 Nov 2020 08:07:56 -0000 Author: pho Date: Sat Nov 28 08:07:55 2020 New Revision: 368120 URL: https://svnweb.freebsd.org/changeset/base/368120 Log: Add a syzkaller reproducer. Added: user/pho/stress2/misc/syzkaller29.sh (contents, props changed) Added: user/pho/stress2/misc/syzkaller29.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/syzkaller29.sh Sat Nov 28 08:07:55 2020 (r368120) @@ -0,0 +1,130 @@ +#!/bin/sh + +# panic: uma_zalloc_debug: called within spinlock or critical section +# cpuid = 9 +# time = 1606151277 +# KDB: stack backtrace: +# db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0101c628a0 +# vpanic() at vpanic+0x181/frame 0xfffffe0101c628f0 +# panic() at panic+0x43/frame 0xfffffe0101c62950 +# uma_zalloc_arg() at uma_zalloc_arg+0x1e6/frame 0xfffffe0101c62990 +# cpuset_modify_domain() at cpuset_modify_domain+0x1bf/frame 0xfffffe0101c62a10 +# kern_cpuset_setdomain() at kern_cpuset_setdomain+0x402/frame 0xfffffe0101c62aa0 +# sys_cpuset_setdomain() at sys_cpuset_setdomain+0x26/frame 0xfffffe0101c62ac0 +# amd64_syscall() at amd64_syscall+0x147/frame 0xfffffe0101c62bf0 +# fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe0101c62bf0 +# --- syscall (0, FreeBSD ELF64, nosys), rip = 0x800380d4a, rsp = 0x7fffffffe4b8, rbp = 0x7fffffffe4f0 --- +# KDB: enter: panic +# [ thread pid 81187 tid 100369 ] +# Stopped at kdb_enter+0x37: movq $0,0x10b3236(%rip) +# db> x/s version +# version: FreeBSD 13.0-CURRENT #0 r367945: Mon Nov 23 09:10:40 CET 2020 +# pho@t2.osted.lan:/usr/src/sys/amd64/compile/PHO +# db> + +# $FreeBSD$ + +[ `uname -p` != "amd64" ] && exit 0 + +# Fixed by r368116 + +. ../default.cfg +cat > /tmp/syzkaller29.c < + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void kill_and_wait(int pid, int* status) +{ + kill(pid, SIGKILL); + while (waitpid(-1, status, 0) != pid) { + } +} + +static void sleep_ms(uint64_t ms) +{ + usleep(ms * 1000); +} + +static uint64_t current_time_ms(void) +{ + struct timespec ts; + if (clock_gettime(CLOCK_MONOTONIC, &ts)) + exit(1); + return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; +} + +static void execute_one(void); + +#define WAIT_FLAGS 0 + +static void loop(void) +{ + int iter = 0; + for (;; iter++) { + int pid = fork(); + if (pid < 0) + exit(1); + if (pid == 0) { + execute_one(); + exit(0); + } + int status = 0; + uint64_t start = current_time_ms(); + for (;;) { + if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) + break; + sleep_ms(1); + if (current_time_ms() - start < 5 * 1000) + continue; + kill_and_wait(pid, &status); + break; + } + } +} + +void execute_one(void) +{ + *(uint64_t*)0x20000240 = 1; + *(uint64_t*)0x20000248 = 0; + *(uint64_t*)0x20000250 = 0; + *(uint64_t*)0x20000258 = 0; + syscall(SYS_cpuset_setdomain, 2ul, 2ul, 0ul, 0x20ul, 0x20000240ul, 4ul); + *(uint64_t*)0x20000240 = 1; + *(uint64_t*)0x20000248 = 0; + *(uint64_t*)0x20000250 = 0; + *(uint64_t*)0x20000258 = 0; + syscall(SYS_cpuset_setdomain, 3ul, 2ul, 0ul, 0x20ul, 0x20000240ul, 1ul); +} +int main(void) +{ + syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x1012ul, -1, 0ul); + loop(); + return 0; +} +EOF +mycc -o /tmp/syzkaller29 -Wall -Wextra -O0 /tmp/syzkaller29.c || + exit 1 + +(cd /tmp; timeout 3m ./syzkaller29) + +rm -rf /tmp/syzkaller29 syzkaller29.c /tmp/syzkaller.* +exit 0