Index: user/pho/stress2/misc/callout_reset_on.sh =================================================================== --- user/pho/stress2/misc/callout_reset_on.sh (revision 361835) +++ user/pho/stress2/misc/callout_reset_on.sh (revision 361836) @@ -1,334 +1,333 @@ #!/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$ # # Scenario based on pr. kern/166340 # Process under FreeBSD 9.0 hangs in uninterruptable sleep with apparently # no syscall (empty wchan). # http://people.freebsd.org/~pho/stress/log/callout_reset_on.txt # Fixed in r243901. # panic: Bad link elm 0xfffff80012ba8ec8 prev->next != elm # https://people.freebsd.org/~pho/stress/log/rrs005.txt # Fixed in r278623. # "ritwait DE 0- 0:00.01 crlogger: writer" seen. # https://people.freebsd.org/~pho/stress/log/kostik917.txt # Fixed in r302981 . ../default.cfg rm -f /tmp/crwriter /tmp/crlogger || exit 1 cat > /tmp/crwriter.c < #include #include #include char *txt[] = { "0 This is a line of text: abcdefghijklmnopqrstuvwxyz", "1 Another line of text: ABCDEFGHIJKLMNOPQRSTUVWXYZ", "2 A different line of text", "3 A very, very different text", "4 A much longer line with a lot of characters in the line", "5 Now this is a quite long line of text, with both upper and lower case letters, and one digit!" }; int main(void) { int i, j, n; char help[256]; for (i = 0; i < 100000; i++) { j = arc4random() % 6; n = arc4random() % strlen(txt[j]); strncpy(help, txt[j], n); help[n] = 0; printf("%s\n", txt[j]); if ((arc4random() % 1000) == 1) usleep(100000); } return (0); } EOF mycc -o /tmp/crwriter -Wall -Wextra -O2 -g /tmp/crwriter.c rm -f /tmp/crwriter.c cat > /tmp/crlogger.c < #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define BARRIER_CREATE 1 #define BARRIER_WAIT 2 #define BARRIER_DELETE 3 void barrier(int mode) { int fd; char path[128]; if (mode == BARRIER_CREATE) { snprintf(path, sizeof(path), "barrier.%d", getpid()); if ((fd = open(path, O_RDWR | O_CREAT | O_TRUNC, 0600)) < 0) err(1, "%s", path); } else if (mode == BARRIER_WAIT) { snprintf(path, sizeof(path), "barrier.%d", getppid()); for(;;) { if (access(path, R_OK) == -1) break; usleep(10000); } } else if (mode == BARRIER_DELETE) { snprintf(path, sizeof(path), "barrier.%d", getpid()); if (unlink(path) == -1) err(1, "unlink(%s)", path); } else errx(1, "Bad barrier mode: %d", mode); } pid_t pid; int bufsize; int port; int alarm_exit; void killer(void) { setproctitle("killer"); alarm(120); barrier(BARRIER_WAIT); for (;;) { if (pid == 0) break; if (kill(pid, SIGUSR1) == -1) break; usleep(1000); } _exit(0); } void handler(int s __unused) { } void ahandler(int s __unused) { if (alarm_exit) _exit(0); } /* Read form socket, discard */ static void reader(void) { int tcpsock, msgsock; int on; socklen_t len; struct sockaddr_in inetaddr, inetpeer; int n, *buf; setproctitle("reader - init"); 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); signal(SIGUSR1, handler); alarm(60); 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__); if ((buf = malloc(bufsize)) == NULL) err(1, "malloc(%d), %s:%d", bufsize, __FILE__, __LINE__); setproctitle("reader"); alarm(0); signal(SIGALRM, ahandler); for (;;) { ualarm(5000, 0); if ((n = recvfrom(msgsock, buf, 4, 0, NULL, NULL)) < 0) { if (errno == EAGAIN) continue; err(1, "read(), %s:%d", __FILE__, __LINE__); } if (n == 0) break; if (write(msgsock, "OK", 3) != 3) err(1, "write ack. %s:%d", __FILE__, __LINE__); } close(msgsock); _exit(0); } /* read from stdin, write to socket */ static void writer(void) { int tcpsock, on; struct sockaddr_in inetaddr; struct hostent *hostent; int i, r; char line[1024], ack[80];; pid_t ppid; setproctitle("writer - init"); ppid = getppid(); signal(SIGUSR1, handler); alarm(60); 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__); hostent = gethostbyname ("localhost"); bzero(&inetaddr, sizeof(inetaddr)); memcpy (&inetaddr.sin_addr.s_addr, hostent->h_addr, sizeof (struct in_addr)); inetaddr.sin_family = AF_INET; - inetaddr.sin_addr.s_addr = INADDR_ANY; 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__); setproctitle("writer"); barrier(BARRIER_DELETE); alarm(0); while (fgets(line, sizeof(line), stdin) != NULL) { alarm(10); alarm_exit = 1; if (write(tcpsock, line, strlen(line)) < 0) err(1, "socket write(). %s:%d", __FILE__, __LINE__); alarm_exit = 0; ualarm(5000, 0); if (recvfrom(tcpsock, ack, 4, 0, NULL, NULL) < 0) { if (errno == EAGAIN) continue; err(1, "read(), %s:%d", __FILE__, __LINE__); } } sleep(30); return; } int main(int argc, char **argv) { pid_t kpid; if (argc != 2) errx(1, "Usage: %s \n", argv[0]); port = atoi(argv[1]); bufsize = 128; barrier(BARRIER_CREATE); signal(SIGCHLD, SIG_IGN); if ((pid = fork()) == 0) reader(); if ((kpid = fork()) == 0) killer(); writer(); sleep(1); kill(pid, SIGINT); kill(kpid, SIGINT); return (0); } EOF mycc -o /tmp/crlogger -Wall -Wextra -O2 -g /tmp/crlogger.c rm -f /tmp/crlogger.c N=200 cd /tmp start=`date '+%s'` for i in `jot 40`; do for j in `jot $N`; do /tmp/crwriter | /tmp/crlogger 1236$j 2>/dev/null & done for j in `jot $N`; do wait done [ $((`date '+%s'` - start)) -gt 1200 ] && break done rm -f /tmp/crwriter /tmp/crlogger ./barrier.* exit 0 Index: user/pho/stress2/misc/sendfile.sh =================================================================== --- user/pho/stress2/misc/sendfile.sh (revision 361835) +++ user/pho/stress2/misc/sendfile.sh (revision 361836) @@ -1,216 +1,215 @@ #!/bin/sh # # Copyright (c) 2009 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$ # # Test scenario for sendfile livelock seen on 7.2-STABLE for non SMP # Scenario by kib@ . ../default.cfg odir=`pwd` cd /tmp sed '1,/^EOF/d' < $odir/$0 > sendfile.c mycc -o sendfile -Wall sendfile.c -pthread rm -f sendfile.c [ -d "$RUNDIR" ] || mkdir -p $RUNDIR cd $RUNDIR in=inputFile out=outputFile for i in 1 2 3 4 8 16 1k 2k 3k 4k 5k 1m 2m 3m 4m 5m ; do rm -f $in $out dd if=/dev/random of=$in bs=$i count=1 status=none /tmp/sendfile $in $out 12345 cmp $in $out || { echo FAIL; ls -l $in $out; } rm -f $in $out done rm -f /tmp/sendfile exit 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; int i, r, fd; off_t off = 0; #if 1 size_t size; #endif 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__); #if 1 /* livelock trigger */ size = getpagesize() -4; if (setsockopt(tcpsock, SOL_SOCKET, SO_SNDBUF, (void *)&size, sizeof(size)) < 0) err(1, "setsockopt(SO_SNDBUF), %s:%d", __FILE__, __LINE__); #endif hostent = gethostbyname ("localhost"); memcpy (&inetaddr.sin_addr.s_addr, hostent->h_addr, sizeof (struct in_addr)); inetaddr.sin_family = AF_INET; - inetaddr.sin_addr.s_addr = INADDR_ANY; 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); } Index: user/pho/stress2/misc/sendfile10.sh =================================================================== --- user/pho/stress2/misc/sendfile10.sh (revision 361835) +++ user/pho/stress2/misc/sendfile10.sh (revision 361836) @@ -1,315 +1,316 @@ #!/bin/sh # # Copyright (c) 2017 Dell EMC Isilon # 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$ # # Copy of sendfile8.sh with size validation added. # No problems seen (after r315910). . ../default.cfg [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 dir=/tmp odir=`pwd` cd $dir -sed '1,/^EOF/d' < $odir/$0 > $dir/semdfile10.c -mycc -o semdfile10 -Wall -Wextra -O0 -g semdfile10.c || exit 1 -rm -f semdfile10.c +sed '1,/^EOF/d' < $odir/$0 > $dir/sendfile10.c +mycc -o sendfile10 -Wall -Wextra -O0 -g sendfile10.c || exit 1 +rm -f sendfile10.c cd $odir mount | grep "on $mntpoint " | grep -q /dev/md && umount -f $mntpoint [ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart mdconfig -a -t swap -s 1g -u $mdstart || exit 1 bsdlabel -w md$mdstart auto newfs $newfs_flags -n md${mdstart}$part > /dev/null mount /dev/md${mdstart}$part $mntpoint cd $mntpoint -dd if=/dev/random of=template bs=1m count=50 2>&1 | egrep -v "records|transferred" -/tmp/semdfile10 template in out 76543 +dd if=/dev/random of=template bs=1m count=50 status=none +/tmp/sendfile10 template in out 76543 s=$? cd $odir for i in `jot 6`; do mount | grep -q "on $mntpoint " || break umount $mntpoint && break || sleep 10 done [ $i -eq 6 ] && exit 1 mdconfig -d -u $mdstart -rm -rf /tmp/semdfile10 +rm -rf /tmp/sendfile10 exit $s EOF #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static volatile off_t *share; static int port; static char *input, *output; #define BUFSIZE 4096 #define MX (100 * 1024 * 1024) #define OSZ 1 #define PARALLEL 1 #define RUNTIME (2 * 60) #define SZ 0 static void mess(void) { off_t length; int fd; if ((fd = open(input, O_RDWR)) == -1) err(1, "open(%s)", input); length = arc4random() % MX; if (ftruncate(fd, length) == -1) err(1, "truncate(%jd)", length); share[SZ] = length; close(fd); } static void reader(void) { off_t t; int tcpsock, msgsock; int on; socklen_t len; struct sockaddr_in inetaddr, inetpeer; int n, *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); + alarm(10); if ((msgsock = accept(tcpsock, (struct sockaddr *)&inetpeer, &len)) < 0) err(1, "accept(), %s:%d", __FILE__, __LINE__); + alarm(0); t = 0; if ((buf = malloc(BUFSIZE)) == NULL) - err(1, "malloc(%d), %s:%d", BUFSIZE, __FILE__, __LINE__); + err(1, "malloc(%d), %s:%d", BUFSIZE, __FILE__, __LINE__); if ((fd = open(output, O_RDWR | O_CREAT | O_TRUNC, 0640)) == -1) - err(1, "open(%s)", output); + err(1, "open(%s)", output); 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); #if 0 if (t != share[SZ] && t != share[OSZ]) { fprintf(stderr, "1) Send size %lu, original size %lu, " "receive size %lu\n", (unsigned long)share[SZ], (unsigned long)share[OSZ], (unsigned long)t); exit(1); } #endif return; } static void writer(void) { struct sockaddr_in inetaddr; struct hostent *hostent; struct stat statb; off_t off = 0; size_t size; int i, r, fd; int tcpsock, on; 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_addr.s_addr = INADDR_ANY; 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 ((fd = open(input, O_RDONLY)) == -1) err(1, "open(%s)", input); if (fstat(fd, &statb) != 0) err(1, "stat(%s)", input); share[SZ] = statb.st_size; if (sendfile(fd, tcpsock, 0, statb.st_size, NULL, &off, 0) == -1) err(1, "sendfile"); close(fd); close(tcpsock); return; } static void test(void) { pid_t pid; if ((pid = fork()) == 0) { writer(); _exit(0); } reader(); kill(pid, SIGINT); if (waitpid(pid, NULL, 0) != pid) err(1, "waitpid(%d)", pid); _exit(0); } int main(int argc, char *argv[]) { struct stat statin, statorig, statout; size_t len; time_t start; int e, i, pids[PARALLEL], status; char help[80], *template; if (argc != 5) { fprintf(stderr, "Usage: %s