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 *346593 37706 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(ffffffff821e3209,ffffffff821f7fae,149,ffffffff821c11d6) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd802b67a500) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802b67a500) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802b67a500) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd802b67a500) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803b91a428,2,fffffd803f7c6b40,ffff8000ffff4ee0,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd802dbec968,0,4,fffffd803f7c6b40) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000148e6148) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803d639000,fffffd803b91a428,ffff8000148e6248) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff4ee0,b,c002e0ed60,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000148e63c0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c00002a000,145,100,6b) at Xsyscall+0x128 end of kernel end trace frame: 0xc0022897e8, 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(ffffffff821e3209,ffffffff821f7fae,149,ffffffff821c11d6) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd802b67a500) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802b67a500) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802b67a500) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd802b67a500) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803b91a428,2,fffffd803f7c6b40,ffff8000ffff4ee0,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd802dbec968,0,4,fffffd803f7c6b40) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000148e6148) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803d639000,fffffd803b91a428,ffff8000148e6248) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff4ee0,b,c002e0ed60,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000148e63c0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c00002a000,145,100,6b) at Xsyscall+0x128 end of kernel end trace frame: 0xc0022897e8, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000148e5c20 rbx 0xffff8000148e5cd0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000148e5be0 r9 0x1 r10 0 r11 0x606cc5e57f56f8f3 r12 0x3000000008 r13 0xffff8000148e5c30 r14 0x100 r15 0x1 rip 0xffffffff81e06468 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000148e5c10 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=346593 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff4778,0xffff8000ffff5658 process=0xffff8000148a2a38 user=0xffff8000148e1000, vmspace=0xfffffd803f013660 estcpu=36, cpticks=4, pctcpu=0.5 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 3311 394626 37706 0 3 0x82 nanosleep syz-executor.0 5157 374605 1 0 3 0x100083 ttyin getty 45744 81386 0 0 3 0x14200 bored sosplice 27270 241683 0 0 3 0x14200 acct acct 37706 70997 86317 0 3 0x82 thrsleep syz-fuzzer 37706 471494 86317 0 3 0x4000082 nanosleep syz-fuzzer *37706 346593 86317 0 7 0x4000002 syz-fuzzer 37706 167488 86317 0 3 0x4000082 thrsleep syz-fuzzer 37706 273162 86317 0 3 0x4000082 thrsleep syz-fuzzer 37706 48891 86317 0 3 0x4000082 thrsleep syz-fuzzer 37706 383347 86317 0 3 0x4000082 thrsleep syz-fuzzer 37706 176250 86317 0 3 0x4000082 thrsleep syz-fuzzer 86317 260026 54148 0 3 0x10008a pause ksh 54148 453900 44982 0 3 0x92 select sshd 44982 385251 1 0 3 0x80 select sshd 93967 443497 86498 73 3 0x100090 kqread syslogd 86498 378156 1 0 3 0x100082 netio syslogd 4094 243430 1 77 3 0x100090 poll dhclient 27793 339266 1 0 3 0x80 poll dhclient 17840 21493 0 0 2 0x14200 zerothread 99816 334898 0 0 3 0x14200 aiodoned aiodoned 17393 429994 0 0 3 0x14200 syncer update 47428 91192 0 0 3 0x14200 cleaner cleaner 72288 373919 0 0 3 0x14200 reaper reaper 71718 437079 0 0 3 0x14200 pgdaemon pagedaemon 37781 499515 0 0 3 0x14200 bored crynlk 39731 383107 0 0 3 0x14200 bored crypto 83409 143193 0 0 3 0x40014200 acpi0 acpi0 49696 128619 0 0 3 0x14200 bored softnet 23131 11040 0 0 3 0x14200 bored systqmp 30253 474858 0 0 3 0x14200 bored systq 3395 383868 0 0 3 0x40014200 bored softclock 99592 367998 0 0 3 0x40014200 idle0 79371 182866 0 0 3 0x14200 bored smr 1 5401 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 9627 7468K 14677K 78643K 17094 0 0 pcb 13 10K 12K 78643K 670 0 0 rtable 126 12K 13K 78643K 1897 0 0 ifaddr 93 18K 19K 78643K 510 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 201 0 0 iov 0 0K 28K 78643K 733 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1202 75K 77K 78643K 3741 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 48 0 0 VM map 32 8K 8K 78643K 39 0 0 sem 12 0K 1K 78643K 1203 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 3 5K 25K 78643K 2897 0 0 sigio 0 0K 0K 78643K 55 0 0 proc 49 38K 55K 78643K 1140 0 0 subproc 16 1K 2K 78643K 255 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 6107 0 0 in_multi 34 2K 2K 78643K 343 0 0 ether_multi 1 0K 0K 78643K 43 0 0 mrt 0 0K 0K 78643K 40 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 108 477K 477K 78643K 108 0 0 exec 0 0K 1K 78643K 830 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 159 276K 295K 78643K 8138 0 0 UVM aobj 130 4K 4K 78643K 141 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 601 0 0 NDP 25 0K 1K 78643K 164 0 0 temp 232 3544K 4185K 78643K 119648 0 0 kqueue 0 0K 0K 78643K 33 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 73 0 67 1 0 1 1 0 8 0 rtpcb 80 302 0 300 1 0 1 1 0 8 0 rtentry 112 355 0 310 2 0 2 2 0 8 0 unpcb 120 5686 0 5676 2 1 1 2 0 8 0 syncache 264 14 0 14 5 4 1 1 0 8 1 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 171 0 171 5 4 1 1 0 8 1 tcpcb 544 4772 0 4768 40 38 2 15 0 8 1 ipq 40 18 0 18 7 6 1 1 0 8 1 ipqe 40 172 0 172 7 6 1 1 0 8 1 inpcb 280 6858 0 6851 25 22 3 9 0 8 2 rttmr 72 13 0 12 7 6 1 1 0 8 0 ip6q 72 5 0 5 2 2 0 1 0 8 0 ip6af 40 12 0 12 2 2 0 1 0 8 0 nd6 48 39 0 35 2 1 1 1 0 8 0 pkpcb 40 12 0 12 4 4 0 1 0 8 0 swfcl 56 5 0 0 1 0 1 1 0 8 0 ppxss 1128 49 0 49 14 13 1 1 0 8 1 art_heap8 4096 14 0 12 10 7 3 3 0 8 1 art_heap4 256 1470 0 1202 30 13 17 17 0 8 0 art_table 32 1484 0 1214 3 0 3 3 0 8 0 art_node 16 350 0 309 1 0 1 1 0 8 0 sysvmsgpl 40 86 0 62 1 0 1 1 0 8 0 semapl 112 1201 0 1191 1 0 1 1 0 8 0 shmpl 112 139 0 11 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 6034 0 4648 46 0 46 46 0 8 0 ffsino 240 6034 0 4648 83 0 83 83 0 8 0 nchpl 144 10799 0 10355 60 41 19 60 0 8 0 uvmvnodes 72 7460 0 0 136 0 136 136 0 8 0 vnodes 208 7460 0 0 393 0 393 393 0 8 0 namei 1024 34568 0 34568 3 2 1 1 0 8 1 vcpupl 1984 30 0 0 4 0 4 4 0 8 0 vmpool 520 37 0 7 2 0 2 2 0 8 0 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 41352 0 41352 24 23 1 7 0 8 1 plimitpl 152 274 0 268 1 0 1 1 0 8 0 sigapl 432 3032 0 3021 2 0 2 2 0 8 0 futexpl 56 89656 0 89656 4 3 1 1 0 8 1 knotepl 112 810 0 789 2 1 1 2 0 8 0 kqueuepl 104 1130 0 1128 7 6 1 4 0 8 0 pipepl 112 1860 0 1845 4 3 1 2 0 8 0 fdescpl 424 3033 0 3021 2 0 2 2 0 8 0 filepl 120 30469 0 30393 27 22 5 11 0 8 2 lockfpl 104 1132 0 1131 1 0 1 1 0 8 0 lockfspl 48 369 0 368 1 0 1 1 0 8 0 sessionpl 112 33 0 24 1 0 1 1 0 8 0 pgrppl 48 295 0 286 1 0 1 1 0 8 0 ucredpl 96 3472 0 3465 1 0 1 1 0 8 0 zombiepl 144 3021 0 3020 1 0 1 1 0 8 0 processpl 864 3049 0 3020 4 0 4 4 0 8 0 procpl 632 6658 0 6622 6 2 4 5 0 8 0 sosppl 128 43 0 43 10 10 0 1 0 8 0 sockpl 384 12877 0 12858 46 40 6 14 0 8 3 mcl64k 65536 1213 0 1213 98 97 1 33 0 8 1 mcl16k 16384 42 0 42 15 14 1 1 0 8 1 mcl12k 12288 93 0 93 7 6 1 1 0 8 1 mcl9k 9216 42 0 42 13 12 1 1 0 8 1 mcl8k 8192 174 0 174 4 3 1 1 0 8 1 mcl4k 4096 333 0 333 3 2 1 1 0 8 1 mcl2k2 2112 29 0 29 10 9 1 1 0 8 1 mcl2k 2048 72927 0 72880 22 15 7 16 0 8 0 mtagpl 80 159 0 157 4 3 1 1 0 8 0 mbufpl 256 153580 0 153494 131 111 20 42 0 8 9 bufpl 256 19809 0 12205 477 0 477 477 0 8 0 anonpl 16 441091 0 425162 174 91 83 106 0 62 1 amapchunkpl 152 17939 0 17808 65 50 15 20 0 158 8 amappl16 192 20606 0 19524 176 120 56 67 0 8 1 amappl15 184 981 0 980 1 0 1 1 0 8 0 amappl14 176 562 0 558 1 0 1 1 0 8 0 amappl13 168 76 0 74 1 0 1 1 0 8 0 amappl12 160 169 0 166 1 0 1 1 0 8 0 amappl11 152 85 0 74 1 0 1 1 0 8 0 amappl10 144 665 0 663 1 0 1 1 0 8 0 amappl9 136 928 0 922 1 0 1 1 0 8 0 amappl8 128 458 0 425 2 0 2 2 0 8 0 amappl7 120 741 0 735 1 0 1 1 0 8 0 amappl6 112 87 0 78 1 0 1 1 0 8 0 amappl5 104 437 0 428 1 0 1 1 0 8 0 amappl4 96 2930 0 2901 1 0 1 1 0 8 0 amappl3 88 1033 0 1018 1 0 1 1 0 8 0 amappl2 80 23338 0 23281 3 1 2 3 0 8 0 amappl1 72 65200 0 64808 28 19 9 20 0 8 0 amappl 80 7160 0 7098 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 140 0 11 3 0 3 3 0 8 0 uaddrrnd 24 3070 0 3021 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3070 0 3021 1 0 1 1 0 8 0 vmmpekpl 168 21836 0 21798 2 0 2 2 0 8 0 vmmpepl 168 376027 0 373972 302 161 141 151 0 357 37 vmsppl 272 3032 0 3021 5 4 1 2 0 8 0 pdppl 4096 6146 0 6086 11 2 9 9 0 8 0 pvpl 32 1227199 0 1208326 481 209 272 314 0 265 78 pmappl 200 3069 0 3028 4 1 3 3 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 937 0 310 19 0 19 19 0 8 0