From owner-svn-src-user@freebsd.org Sun Jun 14 15:49:33 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 8A78C33D69E for ; Sun, 14 Jun 2020 15:49:33 +0000 (UTC) (envelope-from gordon@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 49lJms37RTz4bcY; Sun, 14 Jun 2020 15:49:33 +0000 (UTC) (envelope-from gordon@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 66C32EE3F; Sun, 14 Jun 2020 15:49:33 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05EFnXaD051104; Sun, 14 Jun 2020 15:49:33 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05EFnX6g051102; Sun, 14 Jun 2020 15:49:33 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <202006141549.05EFnX6g051102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Sun, 14 Jun 2020 15:49:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r362177 - in user/cperciva/freebsd-update-build/scripts/11.4-RELEASE: . amd64 i386 X-SVN-Group: user X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in user/cperciva/freebsd-update-build/scripts/11.4-RELEASE: . amd64 i386 X-SVN-Commit-Revision: 362177 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.33 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, 14 Jun 2020 15:49:33 -0000 Author: gordon Date: Sun Jun 14 15:49:32 2020 New Revision: 362177 URL: https://svnweb.freebsd.org/changeset/base/362177 Log: Add 11.4-RELEASE Added: user/cperciva/freebsd-update-build/scripts/11.4-RELEASE/ user/cperciva/freebsd-update-build/scripts/11.4-RELEASE/amd64/ user/cperciva/freebsd-update-build/scripts/11.4-RELEASE/amd64/build.conf (contents, props changed) user/cperciva/freebsd-update-build/scripts/11.4-RELEASE/i386/ user/cperciva/freebsd-update-build/scripts/11.4-RELEASE/i386/build.conf (contents, props changed) Added: user/cperciva/freebsd-update-build/scripts/11.4-RELEASE/amd64/build.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/scripts/11.4-RELEASE/amd64/build.conf Sun Jun 14 15:49:32 2020 (r362177) @@ -0,0 +1,10 @@ +export RELH=da9f68ca92e9b12e261c3668693acf125090052bec6a7f961cb8862dbebe2c9cc047d65f93fb55c0f328daaaa8fc888cdef506927f2a1edeae6d11ff21ca89c6 +export FTP=https://people.freebsd.org/~gjb/11.4-RELEASE + +# Components of the world, source, and kernels +export WORLDPARTS="base base-dbg doc lib32 lib32-dbg" +export SOURCEPARTS="src" +export KERNELPARTS="kernel kernel-dbg" + +# EOL date +export EOL=1632960000 Added: user/cperciva/freebsd-update-build/scripts/11.4-RELEASE/i386/build.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/scripts/11.4-RELEASE/i386/build.conf Sun Jun 14 15:49:32 2020 (r362177) @@ -0,0 +1,10 @@ +export RELH=303f3c512cda1aa27f0a4a124864bae5fc1d23d31cfd6f3b02ef1d759a9fa6e5b08f2a6a0d8f4d0d4da7e966b3739c59012b6672828e526e2f816d3c7650df9d +export FTP=https://people.freebsd.org/~gjb/11.4-RELEASE + +# Components of the world, source, and kernels +export WORLDPARTS="base base-dbg doc" +export SOURCEPARTS="src" +export KERNELPARTS="kernel kernel-dbg" + +# EOL date +export EOL=1632960000 From owner-svn-src-user@freebsd.org Wed Jun 17 11:01:41 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 4413E34AF5E for ; Wed, 17 Jun 2020 11:01:41 +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 49n2FK16GPz4d7c; Wed, 17 Jun 2020 11:01:41 +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 216FE1F600; Wed, 17 Jun 2020 11:01:41 +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 05HB1fp2095655; Wed, 17 Jun 2020 11:01:41 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05HB1fsG095654; Wed, 17 Jun 2020 11:01:41 GMT (envelope-from pho@FreeBSD.org) Message-Id: <202006171101.05HB1fsG095654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Wed, 17 Jun 2020 11:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r362266 - 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: 362266 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.33 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, 17 Jun 2020 11:01:41 -0000 Author: pho Date: Wed Jun 17 11:01:40 2020 New Revision: 362266 URL: https://svnweb.freebsd.org/changeset/base/362266 Log: Added a syzkaller reproducer. Added: user/pho/stress2/misc/syzkaller15.sh (contents, props changed) Added: user/pho/stress2/misc/syzkaller15.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/syzkaller15.sh Wed Jun 17 11:01:40 2020 (r362266) @@ -0,0 +1,191 @@ +#!/bin/sh + + +# panic: sbflush_internal: ccc 0 mb 0 mbcnt 256 +# cpuid = 4 +# time = 1592126385 +# KDB: stack backtrace: +# db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe012b22f8d0 +# vpanic() at vpanic+0x182/frame 0xfffffe012b22f920 +# panic() at panic+0x43/frame 0xfffffe012b22f980 +# sbrelease_internal() at sbrelease_internal+0xbd/frame 0xfffffe012b22f9a0 +# solisten_proto() at solisten_proto+0xab/frame 0xfffffe012b22fa00 +# sctp_listen() at sctp_listen+0x2f4/frame 0xfffffe012b22fa60 +# solisten() at solisten+0x42/frame 0xfffffe012b22fa80 +# kern_listen() at kern_listen+0x7c/frame 0xfffffe012b22fac0 +# ia32_syscall() at ia32_syscall+0x150/frame 0xfffffe012b22fbf0 +# int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffffdb10 +# KDB: enter: panic +# [ thread pid 93263 tid 100202 ] +# Stopped at kdb_enter+0x37: movq $0,0x10c5456(%rip) +# db> x/s version +# version: FreeBSD 13.0-CURRENT #0 r362171: Sun Jun 14 09:06:12 CEST 2020\012 pho@mercat1.netperf.freebsd.org:/usr/src/sys/amd64/compile/PHO\012 +# db> + +# $FreeBSD$ + +[ `uname -p` != "amd64" ] && exit 0 + +. ../default.cfg +cat > /tmp/syzkaller15.c < + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static unsigned long long procid; + +static __thread int skip_segv; +static __thread jmp_buf segv_env; + +static void segv_handler(int sig, siginfo_t* info, void* ctx __unused) +{ + uintptr_t addr = (uintptr_t)info->si_addr; + const uintptr_t prog_start = 1 << 20; + const uintptr_t prog_end = 100 << 20; + if (__atomic_load_n(&skip_segv, __ATOMIC_RELAXED) && + (addr < prog_start || addr > prog_end)) { + _longjmp(segv_env, 1); + } + exit(sig); +} + +static void install_segv_handler(void) +{ + struct sigaction sa; + memset(&sa, 0, sizeof(sa)); + sa.sa_sigaction = segv_handler; + sa.sa_flags = SA_NODEFER | SA_SIGINFO; + sigaction(SIGSEGV, &sa, NULL); + sigaction(SIGBUS, &sa, NULL); +} + +#define NONFAILING(...) \ + { \ + __atomic_fetch_add(&skip_segv, 1, __ATOMIC_SEQ_CST); \ + if (_setjmp(segv_env) == 0) { \ + __VA_ARGS__; \ + } \ + __atomic_fetch_sub(&skip_segv, 1, __ATOMIC_SEQ_CST); \ + } + +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; + for (iter = 0;; 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; + } + } +} + +uint64_t r[1] = {0xffffffffffffffff}; + +void execute_one(void) +{ + intptr_t res = 0; + res = syscall(SYS_socket, 0x1c, 1, 0x84); + if (res != -1) + r[0] = res; + NONFAILING(*(uint8_t*)0x10000040 = 0xc8); + NONFAILING(*(uint8_t*)0x10000041 = 0x51); + NONFAILING(*(uint8_t*)0x10000042 = 0); + NONFAILING(*(uint8_t*)0x10000043 = 0); + NONFAILING(*(uint8_t*)0x10000044 = 0); + NONFAILING(*(uint8_t*)0x10000045 = 0); + NONFAILING(*(uint8_t*)0x10000046 = 0); + NONFAILING(*(uint8_t*)0x10000047 = 0); + NONFAILING(*(uint8_t*)0x10000048 = 0); + NONFAILING(*(uint8_t*)0x10000049 = 0); + NONFAILING(*(uint8_t*)0x1000004a = 0); + syscall(SYS_setsockopt, (intptr_t)r[0], 0x84, 0xc, 0x10000040, 0xb); + NONFAILING(*(uint8_t*)0x10000180 = 0x5f); + NONFAILING(*(uint8_t*)0x10000181 = 0x1c); + NONFAILING(*(uint16_t*)0x10000182 = htobe16(0x4e22 + procid * 4)); + NONFAILING(*(uint32_t*)0x10000184 = 0); + NONFAILING(*(uint64_t*)0x10000188 = htobe64(0)); + NONFAILING(*(uint64_t*)0x10000190 = htobe64(1)); + NONFAILING(*(uint32_t*)0x10000198 = 0); + syscall(SYS_connect, (intptr_t)r[0], 0x10000180, 0x1c); + syscall(SYS_listen, (intptr_t)r[0], 7); +} +int main(void) +{ + syscall(SYS_mmap, 0x10000000, 0x1000000, 7, 0x1012, -1, 0); + install_segv_handler(); + for (procid = 0; procid < 4; procid++) { + if (fork() == 0) { + loop(); + } + } + sleep(1000000); + return 0; +} +EOF +mycc -o /tmp/syzkaller15 -Wall -Wextra -O0 -m32 /tmp/syzkaller15.c || + exit 1 + +(cd /tmp; ./syzkaller15) & +sleep 60 +pkill -9 syzkaller15 +wait + +rm -f /tmp/syzkaller15 /tmp/syzkaller15.c /tmp/syzkaller15.core +exit 0 From owner-svn-src-user@freebsd.org Wed Jun 17 11:02:21 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 A5BF734B089 for ; Wed, 17 Jun 2020 11:02:21 +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 49n2G541S1z4cy6; Wed, 17 Jun 2020 11:02:21 +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 852531F492; Wed, 17 Jun 2020 11:02:21 +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 05HB2L9Q098735; Wed, 17 Jun 2020 11:02:21 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05HB2LDK098734; Wed, 17 Jun 2020 11:02:21 GMT (envelope-from pho@FreeBSD.org) Message-Id: <202006171102.05HB2LDK098734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Wed, 17 Jun 2020 11:02:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r362267 - 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: 362267 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.33 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, 17 Jun 2020 11:02:21 -0000 Author: pho Date: Wed Jun 17 11:02:21 2020 New Revision: 362267 URL: https://svnweb.freebsd.org/changeset/base/362267 Log: Updated the exclude list. Modified: user/pho/stress2/misc/all.sh Modified: user/pho/stress2/misc/all.sh ============================================================================== --- user/pho/stress2/misc/all.sh Wed Jun 17 11:01:40 2020 (r362266) +++ user/pho/stress2/misc/all.sh Wed Jun 17 11:02:21 2020 (r362267) @@ -80,18 +80,16 @@ # CAM stuck in vmwait seen 20200112 # pfl3.sh panic: handle_written_inodeblock: live inodedep 20190211 # pageout.sh panic: handle_written_filepage: not started 20190218 +# quota10.sh people.freebsd.org/~pho/stress/log/quota10-2.txt 20200525 # quota2.sh panic: dqflush: stray dquot 20120221 # quota3.sh panic: softdep_deallocate_dependencies: unrecovered ... 20111222 # quota6.sh panic: softdep_deallocate_dependencies: unrecovered ... 20130206 # quota7.sh panic: dqflush: stray dquot 20120221 -# rename14.sh WiP 20200215 -# rename15.sh WiP 20200215 +# rename14.sh mark136.txt 20200525 # sctp.sh WiP 20200307 # sctp2.sh panic: soclose: SS_NOFDREF on enter 20200307 # sctp3.sh WiP 20190809 -# sendfile18.sh WiP 20200313 -# sendfile19.sh WiP 20200317 -# sendfile20.sh WiP 20200318 +# sendfile25.sh WiP 20200611 # signal.sh Timing issues. Needs fixing 20171116 # snap4.sh panic: snapacct_ufs2: bad block 20181014 # snap6.sh panic: softdep_deallocate_dependencies: unrecovered ... 20130630 @@ -102,13 +100,16 @@ # swapoff2.sh swap_pager_force_pagein: read from swap failed 20171223 # systrace.sh WiP 20200227 # systrace2.sh WiP 20200227 -# syzkaller4.sh WiP 20200210 +# syzkaller11.sh WiP 20200419 +# syzkaller13.sh WiP 20200607 +# syzkaller15.sh WiP 20200617 # ucom.sh Stuck in tail -F 20180129 # umountf7.sh panic: handle_written_inodeblock: live inodedep ... 20190219 # umountf9.sh panic: handle_written_inodeblock: live inodedep ... 20170221 # unionfs.sh insmntque: non-locked vp: xx is not exclusive locked... 20130909 # unionfs2.sh insmntque: mp-safe fs and non-locked vp is not ... 20111219 # unionfs3.sh insmntque: mp-safe fs and non-locked vp is not ... 20111216 +# zfs11.sh Deadlock WiP 20200513 # Test not to run for other reasons: From owner-svn-src-user@freebsd.org Wed Jun 17 11:03:24 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 0C1E334AD79 for ; Wed, 17 Jun 2020 11:03:24 +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 49n2HH6YBCz4d9m; Wed, 17 Jun 2020 11:03:23 +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 DC3001F5CF; Wed, 17 Jun 2020 11:03:23 +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 05HB3Nbi098821; Wed, 17 Jun 2020 11:03:23 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05HB3Ne8098820; Wed, 17 Jun 2020 11:03:23 GMT (envelope-from pho@FreeBSD.org) Message-Id: <202006171103.05HB3Ne8098820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Wed, 17 Jun 2020 11:03:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r362268 - 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: 362268 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.33 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, 17 Jun 2020 11:03:24 -0000 Author: pho Date: Wed Jun 17 11:03:23 2020 New Revision: 362268 URL: https://svnweb.freebsd.org/changeset/base/362268 Log: Fix indent. Modified: user/pho/stress2/misc/unix_socket.sh Modified: user/pho/stress2/misc/unix_socket.sh ============================================================================== --- user/pho/stress2/misc/unix_socket.sh Wed Jun 17 11:02:21 2020 (r362267) +++ user/pho/stress2/misc/unix_socket.sh Wed Jun 17 11:03:23 2020 (r362268) @@ -84,7 +84,7 @@ client(void) { if ((len = recv(fd, buff, 8192, 0)) < 0) err(1, "recv"); - printf ("receive %d %s\n", len, buff); + printf ("receive %d %s\n", len, buff); if (fd >= 0) { close(fd); From owner-svn-src-user@freebsd.org Wed Jun 17 11:04:20 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 D702134B09E for ; Wed, 17 Jun 2020 11:04:20 +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 49n2JN596Zz4dMR; Wed, 17 Jun 2020 11:04:20 +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 AC88D1F5D4; Wed, 17 Jun 2020 11:04:20 +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 05HB4KSg098905; Wed, 17 Jun 2020 11:04:20 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05HB4KWm098904; Wed, 17 Jun 2020 11:04:20 GMT (envelope-from pho@FreeBSD.org) Message-Id: <202006171104.05HB4KWm098904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Wed, 17 Jun 2020 11:04:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r362269 - 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: 362269 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.33 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, 17 Jun 2020 11:04:20 -0000 Author: pho Date: Wed Jun 17 11:04:20 2020 New Revision: 362269 URL: https://svnweb.freebsd.org/changeset/base/362269 Log: Added a "fixed by". Modified: user/pho/stress2/misc/socketpair4.sh Modified: user/pho/stress2/misc/socketpair4.sh ============================================================================== --- user/pho/stress2/misc/socketpair4.sh Wed Jun 17 11:03:23 2020 (r362268) +++ user/pho/stress2/misc/socketpair4.sh Wed Jun 17 11:04:20 2020 (r362269) @@ -30,6 +30,7 @@ # # A socketpair() test scenario illustrating issues with a missing EOF +# Fixed by r361037 + r361056 . ../default.cfg [ `id -u` -ne 0 ] && echo "Must be root!" && exit 1 From owner-svn-src-user@freebsd.org Wed Jun 17 11:05:14 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 639F434B11A for ; Wed, 17 Jun 2020 11:05:14 +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 49n2KQ20zLz4dkN; Wed, 17 Jun 2020 11:05:14 +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 24C641F68D; Wed, 17 Jun 2020 11:05:14 +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 05HB5Elg099002; Wed, 17 Jun 2020 11:05:14 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05HB5ESD099000; Wed, 17 Jun 2020 11:05:14 GMT (envelope-from pho@FreeBSD.org) Message-Id: <202006171105.05HB5ESD099000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Wed, 17 Jun 2020 11:05:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r362270 - 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: 362270 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.33 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, 17 Jun 2020 11:05:14 -0000 Author: pho Date: Wed Jun 17 11:05:13 2020 New Revision: 362270 URL: https://svnweb.freebsd.org/changeset/base/362270 Log: Added a regression test. Added: user/pho/stress2/misc/sendfile24.sh (contents, props changed) Added: user/pho/stress2/misc/sendfile24.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/sendfile24.sh Wed Jun 17 11:05:13 2020 (r362270) @@ -0,0 +1,237 @@ +#!/bin/sh + +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2020 Peter Holm +# +# 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$ +# + +# sendfile(2) test with disk read errors + +# 0 2986 2924 0 52 0 4392 2132 vmopar D+ 0 0:00.00 umount /mnt +# seen. +# Fixed by r361852 + +# Test scenario suggestion by chs@ + +[ `id -u` -ne 0 ] && echo "Must be root!" && exit 1 +kldstat | grep -q geom_nop || { gnop load 2>/dev/null || exit 0 && + notloaded=1; } +gnop status || exit 1 + +. ../default.cfg + +dir=/tmp +odir=`pwd` +cd $dir +sed '1,/^EOF/d' < $odir/$0 > $dir/sendfile24.c +mycc -o sendfile24 -Wall -Wextra -O0 -g sendfile24.c || exit 1 +cd $odir + +set -e +mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint +[ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart + +mdconfig -a -t swap -s 2g -u $mdstart +gnop create /dev/md$mdstart +newfs $newfs_flags /dev/md$mdstart.nop > /dev/null +mount /dev/md$mdstart.nop $mntpoint +chmod 777 $mntpoint +set +e + +dd if=/dev/zero of=$mntpoint/file bs=4k count=1 status=none +gnop configure -e 5 -r 1 /dev/md$mdstart.nop + +start=`date +%s` +echo 'Expect: + sendfile24: sendfile: sendfile24: read(), sendfile24.c:61: Broken pipe + Connection reset by peer' +while [ $((`date +%s` - start)) -lt 10 ]; do + (cd $mntpoint; umount $mntpoint) > /dev/null 2>&1 + /tmp/sendfile24 $mntpoint/file /dev/null 12345 +done +umount $mntpoint + +gnop destroy /dev/md$mdstart.nop +mdconfig -d -u $mdstart +[ $notloaded ] && gnop unload +rm -f /tmp/sendfile24 /tmp/sendfile24.c + +exit 0 +EOF +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int port; +char *inputFile; +char *outputFile; +int bufsize = 4096; + +static void +reader(void) { + int tcpsock, msgsock; + int on; + socklen_t len; + struct sockaddr_in inetaddr, inetpeer; + int n, t, *buf, fd; + + on = 1; + if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) + err(1, "socket(), %s:%d", __FILE__, __LINE__); + + if (setsockopt(tcpsock, + SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)) < 0) + err(1, "setsockopt(), %s:%d", __FILE__, __LINE__); + + inetaddr.sin_family = AF_INET; + inetaddr.sin_addr.s_addr = INADDR_ANY; + inetaddr.sin_port = htons(port); + inetaddr.sin_len = sizeof(inetaddr); + + if (bind(tcpsock, + (struct sockaddr *)&inetaddr, sizeof (inetaddr)) < 0) + err(1, "bind(), %s:%d", __FILE__, __LINE__); + + if (listen(tcpsock, 5) < 0) + err(1, "listen(), %s:%d", __FILE__, __LINE__); + + len = sizeof(inetpeer); + if ((msgsock = accept(tcpsock, + (struct sockaddr *)&inetpeer, &len)) < 0) + err(1, "accept(), %s:%d", __FILE__, __LINE__); + + t = 0; + if ((buf = malloc(bufsize)) == NULL) + err(1, "malloc(%d), %s:%d", bufsize, __FILE__, __LINE__); + + if ((fd = open(outputFile, O_RDWR | O_CREAT | O_TRUNC, 0640)) == -1) + err(1, "open(%s)", outputFile); + + for (;;) { + if ((n = read(msgsock, buf, bufsize)) < 0) + err(1, "read(), %s:%d", __FILE__, __LINE__); + t += n; + if (n == 0) + break; + + if ((write(fd, buf, n)) != n) + err(1, "write"); + } + close(msgsock); + close(fd); + return; +} + +static void +writer(void) { + int tcpsock, on; + struct sockaddr_in inetaddr; + struct hostent *hostent; + struct stat statb; + off_t off = 0; + size_t size; + int i, r, fd; + + on = 1; + for (i = 1; i < 5; i++) { + if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) + err(1, "socket(), %s:%d", __FILE__, __LINE__); + + if (setsockopt(tcpsock, + SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)) < 0) + err(1, "setsockopt(), %s:%d", __FILE__, __LINE__); + + size = getpagesize() -4; + if (setsockopt(tcpsock, SOL_SOCKET, SO_SNDBUF, (void *)&size, + sizeof(size)) < 0) + err(1, "setsockopt(SO_SNDBUF), %s:%d", + __FILE__, __LINE__); + + hostent = gethostbyname ("localhost"); + memcpy (&inetaddr.sin_addr.s_addr, hostent->h_addr, + sizeof (struct in_addr)); + + inetaddr.sin_family = AF_INET; + inetaddr.sin_port = htons(port); + inetaddr.sin_len = sizeof(inetaddr); + + r = connect(tcpsock, (struct sockaddr *) &inetaddr, + sizeof(inetaddr)); + if (r == 0) + break; + sleep(1); + close(tcpsock); + } + if (r < 0) + err(1, "connect(), %s:%d", __FILE__, __LINE__); + + if (stat(inputFile, &statb) != 0) + err(1, "stat(%s)", inputFile); + + if ((fd = open(inputFile, O_RDONLY)) == -1) + err(1, "open(%s)", inputFile); + + if (sendfile(fd, tcpsock, 0, statb.st_size, NULL, &off, 0) == -1) + err(1, "sendfile"); + + return; +} + +int +main(int argc, char **argv) +{ + pid_t pid; + + if (argc != 4) { + fprintf(stderr, "Usage: %s 0) { + reader(); + kill(pid, SIGINT); + } else + err(1, "fork(), %s:%d", __FILE__, __LINE__); + + return (0); +}