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 *496465 14474 0 0x2 0 0 syz-executor.0 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(ffffffff821e553b,ffffffff821f7989,149,ffffffff821c11a1) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8006821600) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8006821600) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8006821600) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8006821600) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd80304071b0,2,fffffd803f7c67e0,ffff8000ffff2ee8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803ae79690,0,4,fffffd803f7c67e0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000179e9708) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802b7cc348,fffffd80304071b0,ffff8000179e9808) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff2ee8,ffffff9c,7f7ffffed860,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000179e9980) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,89,7f7ffffed3a0,89,7183560f400,7f7ffffed860) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffed850, 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(ffffffff821e553b,ffffffff821f7989,149,ffffffff821c11a1) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8006821600) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8006821600) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8006821600) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8006821600) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd80304071b0,2,fffffd803f7c67e0,ffff8000ffff2ee8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803ae79690,0,4,fffffd803f7c67e0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000179e9708) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802b7cc348,fffffd80304071b0,ffff8000179e9808) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff2ee8,ffffff9c,7f7ffffed860,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000179e9980) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,89,7f7ffffed3a0,89,7183560f400,7f7ffffed860) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffed850, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000179e91e0 rbx 0xffff8000179e9290 rdx 0x2 rcx 0 rax 0 r8 0xffff8000179e91a0 r9 0x1 r10 0 r11 0xf86c88f29b16e48d r12 0x3000000008 r13 0xffff8000179e91f0 r14 0x100 r15 0x1 rip 0xffffffff81cff578 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000179e91d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=496465 stat=onproc flags process=2 proc=0 pri=17, usrpri=69, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff4288,0xffff8000ffff3660 process=0xffff8000148a3b18 user=0xffff8000179e4000, vmspace=0xfffffd803f013550 estcpu=19, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 5203 57547 29979 0 3 0x2 biowait syz-executor.1 *14474 496465 29979 0 7 0x2 syz-executor.0 46865 435566 0 0 3 0x14200 acct acct 33849 421303 1 0 3 0x100083 ttyin getty 19951 139376 0 0 3 0x14200 bored sosplice 29979 193054 78782 0 3 0x82 thrsleep syz-fuzzer 29979 309644 78782 0 3 0x4000082 nanosleep syz-fuzzer 29979 92653 78782 0 3 0x4000082 kqread syz-fuzzer 29979 430013 78782 0 3 0x4000082 thrsleep syz-fuzzer 29979 283273 78782 0 3 0x4000082 thrsleep syz-fuzzer 29979 207629 78782 0 3 0x4000082 thrsleep syz-fuzzer 29979 286813 78782 0 3 0x4000082 thrsleep syz-fuzzer 29979 273833 78782 0 3 0x4000082 thrsleep syz-fuzzer 78782 248657 35901 0 3 0x10008a pause ksh 35901 345240 60536 0 3 0x92 select sshd 60536 281047 1 0 3 0x80 select sshd 85313 468390 15513 73 3 0x100010 biowait syslogd 15513 161279 1 0 3 0x100082 netio syslogd 17586 213606 0 0 2 0x14200 zerothread 50378 247623 0 0 3 0x14200 aiodoned aiodoned 9920 182511 0 0 3 0x14200 syncer update 73031 295461 0 0 3 0x14200 cleaner cleaner 77677 475920 0 0 3 0x14200 reaper reaper 26681 99282 0 0 3 0x14200 pgdaemon pagedaemon 79318 510784 0 0 3 0x14200 bored crynlk 26816 248154 0 0 3 0x14200 bored crypto 54335 321674 0 0 3 0x40014200 acpi0 acpi0 7 437781 0 0 3 0x14200 bored softnet 31074 306879 0 0 3 0x14200 bored systqmp 64790 452753 0 0 3 0x14200 bored systq 71843 476995 0 0 3 0x40014200 bored softclock 77997 410339 0 0 3 0x40014200 idle0 39247 176855 0 0 3 0x14200 bored smr 1 331913 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 9615 6350K 9569K 78643K 76705 0 0 pcb 13 11K 12K 78643K 2571 0 0 rtable 154 14K 16K 78643K 3994 0 0 ifaddr 123 34K 42K 78643K 2293 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 822 0 0 iov 0 0K 32K 78643K 2651 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1226 77K 78K 78643K 19867 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 139 0 0 VM map 91 22K 22K 78643K 134 0 0 sem 12 0K 0K 78643K 7297 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 4 9K 25K 78643K 10969 0 0 sigio 0 0K 0K 78643K 228 0 0 proc 45 30K 55K 78643K 4011 0 0 subproc 32 2K 2K 78643K 1126 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 1203 0 0 in_multi 39 2K 3K 78643K 1220 0 0 ether_multi 1 0K 0K 78643K 88 0 0 mrt 0 0K 0K 78643K 112 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 120 530K 530K 78643K 120 0 0 exec 0 0K 1K 78643K 2461 0 0 pfkey data 0 0K 4K 78643K 2 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 266 645K 655K 78643K 28560 0 0 UVM aobj 130 4K 4K 78643K 130 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 2492 0 0 NDP 28 1K 1K 78643K 706 0 0 temp 269 3545K 4185K 78643K 395220 0 0 kqueue 0 0K 0K 78643K 169 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 185 0 180 1 0 1 1 0 8 0 rtpcb 80 1255 0 1255 6 5 1 1 0 8 1 rtentry 112 1224 0 1168 2 0 2 2 0 8 0 unpcb 120 6809 0 6794 3 2 1 2 0 8 0 syncache 264 90 0 90 32 32 0 1 0 8 0 tcpqe 32 127 0 127 23 23 0 1 0 8 0 tcpcb 544 9843 0 9839 109 108 1 15 0 8 0 ipq 40 185 0 185 37 37 0 1 0 8 0 ipqe 40 5886 0 5886 37 37 0 1 0 8 0 inpcb 280 19424 0 19420 92 91 1 9 0 8 0 rttmr 72 30 0 30 20 20 0 1 0 8 0 ip6q 72 4 0 4 3 3 0 1 0 8 0 ip6af 40 11 0 11 3 3 0 1 0 8 0 nd6 48 180 0 178 10 9 1 1 0 8 0 pkpcb 40 35 0 35 15 15 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 359 0 359 26 26 0 1 0 8 0 art_heap8 4096 21 0 15 14 8 6 8 0 8 0 art_heap4 256 5557 0 5282 68 49 19 21 0 8 0 art_table 32 5578 0 5297 6 3 3 3 0 8 0 art_node 16 1219 0 1172 1 0 1 1 0 8 0 sysvmsgpl 40 32 0 26 2 1 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 7295 0 7285 1 0 1 1 0 8 0 shmpl 112 128 0 0 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 18127 0 16639 51 2 49 49 0 8 0 ffsino 240 18127 0 16639 88 0 88 88 0 8 0 nchpl 144 35808 0 35288 61 40 21 60 0 8 0 uvmvnodes 72 9650 0 0 176 0 176 176 0 8 0 vnodes 208 9650 0 0 508 0 508 508 0 8 0 namei 1024 152788 0 152787 8 7 1 1 0 8 0 vcpupl 1984 90 0 1 12 0 12 12 0 8 0 vmpool 520 132 0 43 8 2 6 6 0 8 0 scsiplug 64 28 0 28 7 7 0 1 0 8 0 scxspl 192 133326 0 133324 54 53 1 7 0 8 0 plimitpl 152 1054 0 1048 1 0 1 1 0 8 0 sigapl 432 10949 0 10939 2 0 2 2 0 8 0 futexpl 56 407575 0 407575 9 9 0 1 0 8 0 knotepl 112 2934 0 2915 10 9 1 3 0 8 0 kqueuepl 104 4248 0 4246 13 12 1 4 0 8 0 pipepl 112 10576 0 10557 35 34 1 2 0 8 0 fdescpl 424 10950 0 10939 2 0 2 2 0 8 0 filepl 120 120785 0 120701 72 69 3 10 0 8 0 lockfpl 104 4445 0 4445 5 5 0 1 0 8 0 lockfspl 48 1494 0 1494 5 5 0 1 0 8 0 sessionpl 112 83 0 75 1 0 1 1 0 8 0 pgrppl 48 511 0 503 1 0 1 1 0 8 0 ucredpl 96 12815 0 12809 1 0 1 1 0 8 0 zombiepl 144 10943 0 10943 1 0 1 1 0 8 1 processpl 864 10970 0 10943 4 0 4 4 0 8 0 procpl 632 24324 0 24290 4 0 4 4 0 8 0 sosppl 128 219 0 219 31 31 0 1 0 8 0 sockpl 384 27818 0 27796 119 115 4 14 0 8 0 mcl64k 65536 2434 0 2434 166 166 0 65 0 8 0 mcl16k 16384 212 0 212 28 28 0 1 0 8 0 mcl12k 12288 390 0 390 13 13 0 1 0 8 0 mcl9k 9216 217 0 217 25 25 0 1 0 8 0 mcl8k 8192 577 0 577 12 12 0 1 0 8 0 mcl4k 4096 1331 0 1331 10 10 0 1 0 8 0 mcl2k2 2112 110 0 110 33 33 0 1 0 8 0 mcl2k 2048 91521 0 91472 30 23 7 17 0 8 0 mtagpl 80 552 0 552 9 9 0 1 0 8 0 mbufpl 256 259918 0 259844 412 398 14 40 0 8 0 bufpl 256 51042 0 41391 605 1 604 604 0 8 0 anonpl 16 1318312 0 1300475 324 220 104 117 0 62 10 amapchunkpl 152 60109 0 59964 166 148 18 20 0 158 8 amappl16 192 64990 0 63760 384 320 64 86 0 8 0 amappl15 184 2420 0 2419 1 0 1 1 0 8 0 amappl14 176 3924 0 3917 1 0 1 1 0 8 0 amappl13 168 925 0 924 1 0 1 1 0 8 0 amappl12 160 308 0 307 2 1 1 1 0 8 0 amappl11 152 2225 0 2221 1 0 1 1 0 8 0 amappl10 144 605 0 603 1 0 1 1 0 8 0 amappl9 136 2086 0 2082 1 0 1 1 0 8 0 amappl8 128 1724 0 1638 3 0 3 3 0 8 0 amappl7 120 880 0 873 1 0 1 1 0 8 0 amappl6 112 2062 0 2048 1 0 1 1 0 8 0 amappl5 104 1113 0 1106 1 0 1 1 0 8 0 amappl4 96 11393 0 11365 1 0 1 1 0 8 0 amappl3 88 4654 0 4631 1 0 1 1 0 8 0 amappl2 80 84257 0 84196 3 1 2 3 0 8 0 amappl1 72 210372 0 210017 26 17 9 20 0 8 0 amappl 80 25743 0 25664 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 129 0 0 3 0 3 3 0 8 0 uaddrrnd 24 11082 0 10939 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 11082 0 10939 1 0 1 1 0 8 0 vmmpekpl 168 74361 0 74316 3 0 3 3 0 8 0 vmmpepl 168 1338422 0 1336007 663 502 161 168 0 357 39 vmsppl 272 10949 0 10939 5 4 1 2 0 8 0 pdppl 4096 22170 0 22053 20 4 16 16 0 8 0 pvpl 32 3686639 0 3667111 1022 705 317 336 0 265 107 pmappl 200 11081 0 10982 8 2 6 6 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1580 0 820 26 3 23 23 0 8 0