panic: kernel diagnostic assertion "pg->wire_count == 1" failed: file "/syzkaller/managers/main/kernel/sys/kern/vfs_biomem.c", line 329 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *339762 82490 0 0x2 0x4000000 0 syz-fuzzer db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff821e5c23,ffffffff821fc11c,149,ffffffff821c511f) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8024fb0c00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8024fb0c00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8024fb0c00) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8024fb0c00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd8028f0fea0,2,fffffd803f7c6780,ffff8000ffff4778,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80365cff08,0,4,fffffd803f7c6780) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000148e5ff8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802be09b70,fffffd8028f0fea0,ffff8000148e60f8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff4778,f,c003246020,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000148e6270) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,38,200) at Xsyscall+0x128 end of kernel end trace frame: 0xc00014b5c8, count: 1 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. ddb> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic kernel diagnostic assertion "pg->wire_count == 1" failed: file "/syzkaller/managers/main/kernel/sys/kern/vfs_biomem.c", line 329 ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff821e5c23,ffffffff821fc11c,149,ffffffff821c511f) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8024fb0c00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8024fb0c00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8024fb0c00) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8024fb0c00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd8028f0fea0,2,fffffd803f7c6780,ffff8000ffff4778,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80365cff08,0,4,fffffd803f7c6780) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000148e5ff8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802be09b70,fffffd8028f0fea0,ffff8000148e60f8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff4778,f,c003246020,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000148e6270) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,38,200) at Xsyscall+0x128 end of kernel end trace frame: 0xc00014b5c8, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000148e5ad0 rbx 0xffff8000148e5b80 rdx 0x2 rcx 0 rax 0 r8 0xffff8000148e5a90 r9 0x1 r10 0 r11 0x3e376317a427745d r12 0x3000000008 r13 0xffff8000148e5ae0 r14 0x100 r15 0x1 rip 0xffffffff81a536b8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000148e5ac0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=339762 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=65, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff58c0,0xffff8000ffff4ef0 process=0xffff8000148a2378 user=0xffff8000148e1000, vmspace=0xfffffd803f013220 estcpu=15, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 24761 77029 0 0 3 0x14200 acct acct 83266 356179 1 0 3 0x100083 ttyin getty 3669 134839 0 0 3 0x14200 bored sosplice 82490 375619 97610 0 3 0x82 thrsleep syz-fuzzer 82490 30432 97610 0 3 0x4000082 nanosleep syz-fuzzer *82490 339762 97610 0 7 0x4000002 syz-fuzzer 82490 90260 97610 0 3 0x4000082 thrsleep syz-fuzzer 82490 286112 97610 0 3 0x4000002 biowait syz-fuzzer 82490 277695 97610 0 3 0x4000082 thrsleep syz-fuzzer 82490 156702 97610 0 3 0x4000082 thrsleep syz-fuzzer 82490 433820 97610 0 3 0x4000082 thrsleep syz-fuzzer 97610 132091 57094 0 3 0x10008a pause ksh 57094 118885 36887 0 3 0x92 select sshd 36887 207041 1 0 3 0x80 select sshd 56711 428727 18492 73 3 0x100010 ffs_fsync syslogd 18492 21038 1 0 3 0x100082 netio syslogd 35195 329056 1 77 3 0x100090 poll dhclient 94495 321214 1 0 3 0x80 poll dhclient 23839 34031 0 0 3 0x14200 pgzero zerothread 73984 286689 0 0 3 0x14200 aiodoned aiodoned 19710 228423 0 0 3 0x14200 syncer update 41128 504040 0 0 3 0x14200 cleaner cleaner 69404 97306 0 0 3 0x14200 reaper reaper 96982 474047 0 0 3 0x14200 pgdaemon pagedaemon 75203 427771 0 0 3 0x14200 bored crynlk 131 380497 0 0 3 0x14200 bored crypto 72859 8182 0 0 3 0x40014200 acpi0 acpi0 38876 227110 0 0 3 0x14200 bored softnet 98829 317704 0 0 3 0x14200 bored systqmp 42124 142386 0 0 3 0x14200 bored systq 42510 459138 0 0 3 0x40014200 bored softclock 58962 24871 0 0 3 0x40014200 idle0 42846 48508 0 0 3 0x14200 bored smr 1 405734 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9606 7033K 9736K 78643K 42471 0 0 pcb 13 10K 11K 78643K 1189 0 0 rtable 109 13K 14K 78643K 3245 0 0 ifaddr 93 20K 23K 78643K 892 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 333 0 0 iov 0 0K 32K 78643K 1755 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1237 78K 78K 78643K 10242 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 101 0 0 VM map 50 12K 12K 78643K 65 0 0 sem 12 0K 1K 78643K 1117 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 2 1K 25K 78643K 4897 0 0 sigio 0 0K 0K 78643K 115 0 0 proc 50 38K 63K 78643K 1980 0 0 subproc 0 0K 2K 78643K 544 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 398 0 0 in_multi 18 1K 2K 78643K 553 0 0 ether_multi 1 0K 0K 78643K 51 0 0 mrt 4 0K 0K 78643K 67 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 138 609K 609K 78643K 138 0 0 exec 0 0K 1K 78643K 1103 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 192 367K 385K 78643K 13426 0 0 UVM aobj 130 4K 4K 78643K 137 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 1319 0 0 NDP 22 0K 1K 78643K 286 0 0 temp 208 3543K 4184K 78643K 148174 0 0 kqueue 0 0K 0K 78643K 53 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 108 0 104 1 0 1 1 0 8 0 rtpcb 80 528 0 526 1 0 1 1 0 8 0 rtentry 112 556 0 520 2 0 2 2 0 8 0 unpcb 120 5903 0 5891 21 20 1 3 0 8 0 syncache 264 28 0 28 11 11 0 1 0 8 0 tcpqe 32 71 0 71 6 6 0 1 0 8 0 tcpcb 544 3663 0 3659 11 10 1 2 0 8 0 ipq 40 59 0 59 18 18 0 1 0 8 0 ipqe 40 1802 0 1802 18 18 0 1 0 8 0 inpcb 280 8235 0 8228 25 24 1 6 0 8 0 rttmr 72 22 0 21 4 3 1 1 0 8 0 ip6q 72 5 0 5 3 3 0 1 0 8 0 ip6af 40 14 0 14 3 3 0 1 0 8 0 nd6 48 73 0 73 1 0 1 1 0 8 1 pkpcb 40 8 0 8 4 4 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 116 0 116 18 18 0 1 0 8 0 art_heap8 4096 4 0 2 4 2 2 3 0 8 0 art_heap4 256 2154 0 1980 36 19 17 17 0 8 2 art_table 32 2158 0 1982 5 2 3 3 0 8 0 art_node 16 555 0 523 1 0 1 1 0 8 0 sysvmsgpl 40 66 0 59 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 1115 0 1105 1 0 1 1 0 8 0 shmpl 112 135 0 7 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 9169 0 7766 46 0 46 46 0 8 0 ffsino 240 9169 0 7766 83 0 83 83 0 8 0 nchpl 144 16746 0 16268 60 39 21 60 0 8 0 uvmvnodes 72 6764 0 0 123 0 123 123 0 8 0 vnodes 208 6764 0 0 356 0 356 356 0 8 0 namei 1024 63245 0 63245 4 3 1 1 0 8 1 vcpupl 1984 49 0 1 6 0 6 6 0 8 0 vmpool 520 63 0 15 4 0 4 4 0 8 0 scsiplug 64 4 0 4 3 3 0 1 0 8 0 scxspl 192 62799 0 62797 37 36 1 7 0 8 0 plimitpl 152 425 0 420 1 0 1 1 0 8 0 sigapl 432 4978 0 4968 2 0 2 2 0 8 0 futexpl 56 175478 0 175478 4 4 0 1 0 8 0 knotepl 112 1223 0 1208 2 1 1 2 0 8 0 kqueuepl 104 1814 0 1812 1 0 1 1 0 8 0 pipepl 112 3280 0 3269 11 10 1 2 0 8 0 fdescpl 424 4979 0 4968 2 0 2 2 0 8 0 filepl 120 51720 0 51663 37 34 3 8 0 8 0 lockfpl 104 1901 0 1900 1 0 1 1 0 8 0 lockfspl 48 585 0 584 1 0 1 1 0 8 0 sessionpl 112 48 0 40 1 0 1 1 0 8 0 pgrppl 48 156 0 148 1 0 1 1 0 8 0 ucredpl 96 6538 0 6530 1 0 1 1 0 8 0 zombiepl 144 4968 0 4968 1 0 1 1 0 8 1 processpl 864 4995 0 4968 4 0 4 4 0 8 0 procpl 632 11043 0 11009 7 3 4 5 0 8 0 sosppl 128 79 0 79 16 16 0 1 0 8 0 sockpl 384 14769 0 14748 78 74 4 13 0 8 0 mcl64k 65536 1085 0 1085 71 71 0 33 0 8 0 mcl16k 16384 100 0 100 20 20 0 1 0 8 0 mcl12k 12288 182 0 182 10 10 0 1 0 8 0 mcl9k 9216 129 0 129 13 13 0 1 0 8 0 mcl8k 8192 264 0 264 8 8 0 1 0 8 0 mcl4k 4096 634 0 634 5 5 0 1 0 8 0 mcl2k2 2112 43 0 43 18 18 0 1 0 8 0 mcl2k 2048 75544 0 75501 31 24 7 14 0 8 0 mtagpl 80 695 0 695 8 6 2 2 0 8 2 mbufpl 256 185061 0 185001 303 286 17 63 0 8 7 bufpl 256 27558 0 19655 495 1 494 494 0 8 0 anonpl 16 702082 0 681508 229 127 102 104 0 62 10 amapchunkpl 152 29002 0 28854 107 90 17 20 0 158 10 amappl16 192 33132 0 31900 252 186 66 74 0 8 0 amappl15 184 804 0 804 6 5 1 1 0 8 1 amappl14 176 1362 0 1357 1 0 1 1 0 8 0 amappl13 168 149 0 148 1 0 1 1 0 8 0 amappl12 160 872 0 872 7 7 0 1 0 8 0 amappl11 152 272 0 261 1 0 1 1 0 8 0 amappl10 144 938 0 937 1 0 1 1 0 8 0 amappl9 136 1288 0 1286 1 0 1 1 0 8 0 amappl8 128 889 0 822 4 1 3 3 0 8 0 amappl7 120 1094 0 1085 1 0 1 1 0 8 0 amappl6 112 210 0 192 1 0 1 1 0 8 0 amappl5 104 1375 0 1366 1 0 1 1 0 8 0 amappl4 96 4449 0 4419 1 0 1 1 0 8 0 amappl3 88 2252 0 2245 1 0 1 1 0 8 0 amappl2 80 37767 0 37710 3 1 2 3 0 8 0 amappl1 72 102288 0 101908 26 16 10 20 0 8 0 amappl 80 11831 0 11768 2 0 2 2 0 84 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 136 0 7 3 0 3 3 0 8 0 uaddrrnd 24 5042 0 4968 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 5042 0 4968 1 0 1 1 0 8 0 vmmpekpl 168 33518 0 33483 3 0 3 3 0 8 0 vmmpepl 168 623164 0 620921 412 279 133 157 0 357 20 vmsppl 272 4978 0 4968 5 4 1 2 0 8 0 pdppl 4096 10090 0 10014 14 3 11 11 0 8 0 pvpl 32 1898432 0 1876004 615 299 316 330 0 265 121 pmappl 200 5041 0 4983 5 1 4 4 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1095 0 458 20 1 19 19 0 8 0