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 *173910 27628 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(ffffffff821df5e1,ffffffff821f3c70,149,ffffffff821bcecf) at __assert+0x2e sys/kern/subr_prf.c:154 buf_free_pages(fffffd8028bcaf00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8028bcaf00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8028bcaf00) at buf_put+0x172 sys/kern/vfs_bio.c:131 brelse(fffffd8028bcaf00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802f15b740,2,fffffd803f7c6720,ffff8000ffff2780,0,ffffffffffffffff) at vinvalbuf+0x3de sys/kern/vfs_subr.c:1974 ffs_truncate(fffffd803609db48,0,4,fffffd803f7c6720) at ffs_truncate+0xeb5 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800014925e28) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802ee699a0,fffffd802f15b740,ffff800014925f28) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:473 dounlinkat(ffff8000ffff2780,b,c001edb178,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000149260a0) at syscall+0x508 Xsyscall(6,145,c000028000,145,38,95db1e) at Xsyscall+0x128 end of kernel end trace frame: 0xc00261f678, 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(ffffffff821df5e1,ffffffff821f3c70,149,ffffffff821bcecf) at __assert+0x2e sys/kern/subr_prf.c:154 buf_free_pages(fffffd8028bcaf00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8028bcaf00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8028bcaf00) at buf_put+0x172 sys/kern/vfs_bio.c:131 brelse(fffffd8028bcaf00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802f15b740,2,fffffd803f7c6720,ffff8000ffff2780,0,ffffffffffffffff) at vinvalbuf+0x3de sys/kern/vfs_subr.c:1974 ffs_truncate(fffffd803609db48,0,4,fffffd803f7c6720) at ffs_truncate+0xeb5 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800014925e28) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802ee699a0,fffffd802f15b740,ffff800014925f28) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:473 dounlinkat(ffff8000ffff2780,b,c001edb178,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000149260a0) at syscall+0x508 Xsyscall(6,145,c000028000,145,38,95db1e) at Xsyscall+0x128 end of kernel end trace frame: 0xc00261f678, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014925900 rbx 0xffff8000149259b0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149258c0 r9 0x1 r10 0 r11 0x5316186d1df6ce66 r12 0x3000000008 r13 0xffff800014925910 r14 0x100 r15 0x1 rip 0xffffffff819109b8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149258f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=173910 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff38c8,0xffff8000ffff3170 process=0xffff8000148a26d8 user=0xffff800014921000, vmspace=0xfffffd803f013550 estcpu=2, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 99145 41063 0 0 3 0x14200 acct acct 81630 220353 1 0 3 0x100083 ttyin getty 35209 71060 0 0 3 0x14200 bored sosplice 27628 482790 19069 0 3 0x82 thrsleep syz-fuzzer 27628 23874 19069 0 3 0x4000082 nanosleep syz-fuzzer 27628 314743 19069 0 3 0x4000082 kqread syz-fuzzer 27628 188305 19069 0 3 0x4000082 thrsleep syz-fuzzer 27628 216152 19069 0 3 0x4000082 thrsleep syz-fuzzer 27628 121344 19069 0 3 0x4000082 thrsleep syz-fuzzer 27628 159822 19069 0 3 0x4000082 thrsleep syz-fuzzer *27628 173910 19069 0 7 0x4000002 syz-fuzzer 19069 433163 70613 0 3 0x10008a pause ksh 70613 477713 4496 0 3 0x92 select sshd 4496 160280 1 0 3 0x80 select sshd 83110 65722 99581 73 3 0x100010 ffs_fsync syslogd 99581 62610 1 0 3 0x100082 netio syslogd 86674 7675 1 77 3 0x100090 poll dhclient 6731 375279 1 0 3 0x80 poll dhclient 99188 224645 0 0 3 0x14200 pgzero zerothread 46892 106070 0 0 3 0x14200 aiodoned aiodoned 56475 488386 0 0 3 0x14200 syncer update 5308 254021 0 0 3 0x14200 cleaner cleaner 76698 385473 0 0 3 0x14200 reaper reaper 9881 123243 0 0 3 0x14200 pgdaemon pagedaemon 17918 245163 0 0 3 0x14200 bored crynlk 73827 19049 0 0 3 0x14200 bored crypto 98549 431400 0 0 3 0x40014200 acpi0 acpi0 74497 441330 0 0 3 0x14200 bored softnet 78463 428342 0 0 3 0x14200 bored systqmp 41215 73182 0 0 3 0x14200 bored systq 65138 68101 0 0 3 0x40014200 bored softclock 34792 190573 0 0 3 0x40014200 idle0 43498 460802 0 0 3 0x14200 bored smr 1 134606 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 9577 7021K 15072K 78643K 35904 0 0 pcb 13 8K 8K 78643K 848 0 0 rtable 67 3K 4K 78643K 2757 0 0 ifaddr 71 17K 20K 78643K 958 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 509 0 0 iov 0 0K 28K 78643K 1054 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1202 75K 77K 78643K 10360 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 122 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 1013 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 2 1K 25K 78643K 9743 0 0 sigio 0 0K 0K 78643K 130 0 0 proc 42 30K 46K 78643K 2250 0 0 subproc 0 0K 2K 78643K 476 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 950 0 0 in_multi 11 0K 2K 78643K 639 0 0 ether_multi 1 0K 0K 78643K 57 0 0 mrt 1 0K 0K 78643K 30 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 126 556K 556K 78643K 126 0 0 exec 0 0K 1K 78643K 1423 0 0 pfkey data 0 0K 0K 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 88 5K 31K 78643K 23827 0 0 UVM aobj 130 4K 4K 78643K 157 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 536 0 0 NDP 18 0K 0K 78643K 295 0 0 temp 178 3534K 4176K 78643K 157615 0 0 kqueue 0 0K 0K 78643K 86 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 58 0 56 1 0 1 1 0 8 0 rtpcb 80 450 0 448 1 0 1 1 0 8 0 rtentry 112 339 0 317 2 0 2 2 0 8 1 unpcb 120 3244 0 3236 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 705 0 705 1 1 0 1 0 8 0 tcpcb 544 1541 0 1537 1 0 1 1 0 8 0 ipq 40 33 0 33 15 15 0 1 0 8 0 ipqe 40 78 0 78 15 15 0 1 0 8 0 inpcb 280 4588 0 4581 3 2 1 2 0 8 0 nd6 48 84 0 84 1 0 1 1 0 8 1 pkpcb 40 50 0 50 15 15 0 1 0 8 0 swfcl 56 10 0 0 1 0 1 1 0 8 0 ppxss 1128 145 0 145 31 31 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1391 0 1296 17 4 13 13 0 8 7 art_table 32 1392 0 1296 2 0 2 2 0 8 1 art_node 16 330 0 310 1 0 1 1 0 8 0 sysvmsgpl 40 22 0 15 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 1011 0 1001 1 0 1 1 0 8 0 shmpl 112 155 0 27 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 16833 0 15404 48 1 47 47 0 8 0 ffsino 240 16833 0 15404 85 0 85 85 0 8 0 nchpl 144 30654 0 29030 63 1 62 62 0 8 0 uvmvnodes 72 7463 0 0 136 0 136 136 0 8 0 vnodes 200 7463 0 0 393 0 393 393 0 8 0 namei 1024 101722 0 101722 8 7 1 1 0 8 1 scsiplug 64 20 0 20 10 10 0 1 0 8 0 scxspl 192 92589 0 92588 27 26 1 7 0 8 0 plimitpl 152 800 0 795 1 0 1 1 0 8 0 sigapl 432 9837 0 9827 2 0 2 2 0 8 0 futexpl 56 158904 0 158904 7 7 0 1 0 8 0 knotepl 112 2301 0 2280 1 0 1 1 0 8 0 kqueuepl 104 2317 0 2315 1 0 1 1 0 8 0 pipepl 112 5586 0 5575 13 12 1 2 0 8 0 fdescpl 424 9838 0 9827 2 0 2 2 0 8 0 filepl 120 59575 0 59520 5 2 3 5 0 8 0 lockfpl 104 3224 0 3224 8 8 0 1 0 8 0 lockfspl 48 1072 0 1072 8 8 0 1 0 8 0 sessionpl 112 44 0 36 1 0 1 1 0 8 0 pgrppl 48 135 0 127 1 0 1 1 0 8 0 ucredpl 96 12377 0 12369 1 0 1 1 0 8 0 zombiepl 144 9828 0 9828 2 1 1 1 0 8 1 processpl 864 9855 0 9828 4 0 4 4 0 8 0 procpl 632 21727 0 21693 4 0 4 4 0 8 0 sosppl 128 100 0 100 27 27 0 1 0 8 0 sockpl 384 8429 0 8412 12 10 2 4 0 8 0 mcl64k 65536 1715 0 1715 194 194 0 33 0 8 0 mcl16k 16384 40 0 40 27 27 0 1 0 8 0 mcl12k 12288 165 0 165 26 26 0 1 0 8 0 mcl9k 9216 128 0 128 32 32 0 1 0 8 0 mcl8k 8192 191 0 191 26 26 0 1 0 8 0 mcl4k 4096 501 0 501 12 12 0 1 0 8 0 mcl2k2 2112 68 0 68 30 30 0 1 0 8 0 mcl2k 2048 73325 0 73283 23 17 6 11 0 8 0 mtagpl 80 289 0 289 4 3 1 1 0 8 1 mbufpl 256 166303 0 166250 104 96 8 23 0 8 1 bufpl 256 31710 0 24246 467 0 467 467 0 8 0 anonpl 16 903111 0 891442 289 222 67 68 0 62 12 amapchunkpl 152 42500 0 42404 96 81 15 18 0 158 10 amappl16 192 51692 0 51009 283 246 37 48 0 8 1 amappl15 184 1075 0 1075 3 2 1 1 0 8 1 amappl14 176 1007 0 1001 1 0 1 1 0 8 0 amappl13 168 2507 0 2507 5 4 1 1 0 8 1 amappl12 160 1825 0 1825 5 5 0 1 0 8 0 amappl11 152 1606 0 1595 1 0 1 1 0 8 0 amappl10 144 1878 0 1877 2 1 1 1 0 8 0 amappl9 136 1358 0 1357 1 0 1 1 0 8 0 amappl8 128 852 0 826 1 0 1 1 0 8 0 amappl7 120 1881 0 1874 1 0 1 1 0 8 0 amappl6 112 1555 0 1545 1 0 1 1 0 8 0 amappl5 104 2214 0 2204 1 0 1 1 0 8 0 amappl4 96 10352 0 10327 1 0 1 1 0 8 0 amappl3 88 1485 0 1474 1 0 1 1 0 8 0 amappl2 80 78104 0 78049 4 2 2 3 0 8 0 amappl1 72 180557 0 180177 26 17 9 19 0 8 0 amappl 80 22420 0 22392 1 0 1 1 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 dma64 64 259 0 259 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 156 0 27 3 0 3 3 0 8 0 uaddrrnd 24 9838 0 9827 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 9838 0 9827 1 0 1 1 0 8 0 vmmpekpl 168 61327 0 61304 3 1 2 2 0 8 0 vmmpepl 168 1147817 0 1146326 424 341 83 105 0 357 5 vmsppl 272 9837 0 9827 3 2 1 2 0 8 0 pdppl 4096 19682 0 19654 6 1 5 6 0 8 0 pvpl 32 2595731 0 2581214 705 453 252 267 0 265 121 pmappl 200 9837 0 9827 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 979 0 388 21 3 18 19 0 8 0