#!/bin/sh # panic: sbflush_internal: ccc 0 mb 0xfffff8004eee95f0 mbcnt 0 # cpuid = 9 # time = 1704448830 # KDB: stack backtrace: # db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe016a2ccb70 # vpanic() at vpanic+0x131/frame 0xfffffe016a2ccca0 # panic() at panic+0x43/frame 0xfffffe016a2ccd00 # sbrelease_internal() at sbrelease_internal+0x7c/frame 0xfffffe016a2ccd20 # sbrelease() at sbrelease+0x5e/frame 0xfffffe016a2ccd50 # sorflush() at sorflush+0x66/frame 0xfffffe016a2ccd70 # soshutdown() at soshutdown+0x105/frame 0xfffffe016a2ccdb0 # kern_shutdown() at kern_shutdown+0x60/frame 0xfffffe016a2ccdf0 # ia32_syscall() at ia32_syscall+0x154/frame 0xfffffe016a2ccf30 # int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffffdb44 # KDB: enter: panic # [ thread pid 4927 tid 100275 ] # Stopped at : movq $0,0xe37212(%rip) # db> x/s version # FreeBSD 15.0-CURRENT #0 main-n267418-24cd5c26fe3e: Fri Jan 5 08:21:43 CET 2024 # pho@mercat1.netperf.freebsd.org:/usr/src/sys/amd64/compile/PHO # db> [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 . ../default.cfg set -u prog=$(basename "$0" .sh) cat > /tmp/$prog.c < #include #include #include #include #include #include #include #include #include uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(SYS_mmap, /*addr=*/0x10000000, /*len=*/0x1000000, /*prot=*/7, /*flags=*/0x1012, /*fd=*/-1, /*offset=*/0); intptr_t res = 0; res = syscall(SYS_socket, /*domain=*/0x26, /*type=*/2, /*proto=*/0); if (res != -1) r[0] = res; syscall(SYS_shutdown, /*fd=*/(intptr_t)r[0], /*how=*/0); return 0; } EOF mycc -o /tmp/$prog -m32 -Wall -Wextra -O0 /tmp/$prog.c -lpthread || exit 1 start=`date +%s` while [ $((`date +%s` - start)) -lt 120 ]; do timeout 3m /tmp/$prog done rm -rf /tmp/$prog /tmp/$prog.c /tmp/$prog.core exit 0