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 *311600 91780 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(ffffffff821ddbff,ffffffff821f21ca,149,ffffffff821bb22f) at __assert+0x2e sys/kern/subr_prf.c:154 buf_free_pages(fffffd803e57d800) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803e57d800) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803e57d800) at buf_put+0x172 sys/kern/vfs_bio.c:131 brelse(fffffd803e57d800) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803ebe12b8,2,fffffd803f7c6ae0,ffff800014915160,0,ffffffffffffffff) at vinvalbuf+0x3de sys/kern/vfs_subr.c:1974 ffs_truncate(fffffd8036156880,0,4,fffffd803f7c6ae0) at ffs_truncate+0xeb5 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000148925f8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802e5e6c20,fffffd803ebe12b8,ffff8000148926f8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:473 dounlinkat(ffff800014915160,b,c000dd78a0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014892870) at syscall+0x508 Xsyscall(0,145,c00002a000,145,100,c5) at Xsyscall+0x128 end of kernel end trace frame: 0xc0003e7808, 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(ffffffff821ddbff,ffffffff821f21ca,149,ffffffff821bb22f) at __assert+0x2e sys/kern/subr_prf.c:154 buf_free_pages(fffffd803e57d800) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803e57d800) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803e57d800) at buf_put+0x172 sys/kern/vfs_bio.c:131 brelse(fffffd803e57d800) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803ebe12b8,2,fffffd803f7c6ae0,ffff800014915160,0,ffffffffffffffff) at vinvalbuf+0x3de sys/kern/vfs_subr.c:1974 ffs_truncate(fffffd8036156880,0,4,fffffd803f7c6ae0) at ffs_truncate+0xeb5 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000148925f8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802e5e6c20,fffffd803ebe12b8,ffff8000148926f8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:473 dounlinkat(ffff800014915160,b,c000dd78a0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014892870) at syscall+0x508 Xsyscall(0,145,c00002a000,145,100,c5) at Xsyscall+0x128 end of kernel end trace frame: 0xc0003e7808, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000148920d0 rbx 0xffff800014892180 rdx 0x2 rcx 0 rax 0 r8 0xffff800014892090 r9 0x1 r10 0 r11 0x7db3a3b1ab772a93 r12 0x3000000008 r13 0xffff8000148920e0 r14 0x100 r15 0x1 rip 0xffffffff815b5ec8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000148920c0 ss 0 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=311600 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=84, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5158,0xffff800014914518 process=0xffff8000148a2a38 user=0xffff80001488d000, vmspace=0xfffffd803f013330 estcpu=34, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 92804 191705 868 0 2 0 syz-executor.1 92804 505125 868 0 2 0x4000000 syz-executor.1 49679 199085 1 0 3 0x100083 ttyin getty 868 436884 91780 0 3 0x82 nanosleep syz-executor.1 44698 356277 0 0 3 0x14200 bored sosplice 91780 450061 2682 0 3 0x82 thrsleep syz-fuzzer 91780 60823 2682 0 3 0x4000082 nanosleep syz-fuzzer 91780 315288 2682 0 3 0x4000082 thrsleep syz-fuzzer 91780 506574 2682 0 3 0x4000082 thrsleep syz-fuzzer 91780 446375 2682 0 3 0x4000082 thrsleep syz-fuzzer 91780 203373 2682 0 3 0x4000082 thrsleep syz-fuzzer 91780 228114 2682 0 3 0x4000082 thrsleep syz-fuzzer *91780 311600 2682 0 7 0x4000002 syz-fuzzer 2682 205012 24145 0 3 0x10008a pause ksh 24145 60766 9335 0 3 0x92 select sshd 9335 227440 1 0 3 0x80 select sshd 44017 48265 98793 73 3 0x100090 kqread syslogd 98793 151650 1 0 3 0x100082 netio syslogd 60710 74157 1 77 3 0x100090 poll dhclient 82541 185414 1 0 3 0x80 poll dhclient 73356 419675 0 0 2 0x14200 zerothread 8088 183751 0 0 3 0x14200 aiodoned aiodoned 86607 146457 0 0 3 0x14200 syncer update 80817 350910 0 0 3 0x14200 cleaner cleaner 4873 323570 0 0 3 0x14200 reaper reaper 84413 304168 0 0 3 0x14200 pgdaemon pagedaemon 71734 143292 0 0 3 0x14200 bored crynlk 74681 75861 0 0 3 0x14200 bored crypto 93451 240953 0 0 3 0x40014200 acpi0 acpi0 56642 182234 0 0 3 0x14200 bored softnet 57834 238738 0 0 3 0x14200 bored systqmp 70689 373529 0 0 3 0x14200 bored systq 13186 521788 0 0 3 0x40014200 bored softclock 7975 506414 0 0 3 0x40014200 idle0 78538 117279 0 0 3 0x14200 bored smr 1 307683 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 9580 6509K 15338K 78643K 39604 0 0 pcb 13 8K 8K 78643K 812 0 0 rtable 99 11K 13K 78643K 3670 0 0 ifaddr 74 21K 27K 78643K 1087 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 620 0 0 iov 0 0K 32K 78643K 1150 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 77K 78643K 12074 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 132 0 0 VM map 2 0K 0K 78643K 2 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 4 9K 25K 78643K 11615 0 0 sigio 0 0K 0K 78643K 162 0 0 proc 42 30K 54K 78643K 3440 0 0 subproc 16 1K 2K 78643K 782 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 1135 0 0 in_multi 22 1K 2K 78643K 846 0 0 ether_multi 1 0K 0K 78643K 60 0 0 mrt 1 0K 0K 78643K 27 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 1812 0 0 pfkey data 0 0K 4K 78643K 8 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 110 14K 33K 78643K 28444 0 0 UVM aobj 130 5K 5K 78643K 159 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 1K 78643K 351 0 0 temp 196 3527K 4168K 78643K 228724 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 99 0 95 1 0 1 1 0 8 0 rtpcb 80 574 0 572 1 0 1 1 0 8 0 rtentry 112 554 0 520 3 1 2 2 0 8 0 unpcb 120 4119 0 4111 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 549 0 549 1 1 0 1 0 8 0 tcpcb 544 1685 0 1681 1 0 1 1 0 8 0 ipq 40 22 0 22 12 12 0 1 0 8 0 ipqe 40 49 0 49 12 12 0 1 0 8 0 inpcb 280 5080 0 5070 29 28 1 2 0 8 0 nd6 48 138 0 135 1 0 1 1 0 8 0 pkpcb 40 50 0 50 20 19 1 1 0 8 1 swfcl 56 6 0 0 1 0 1 1 0 8 0 ppxss 1128 151 0 151 40 39 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 2227 0 2080 23 11 12 13 0 8 0 art_table 32 2228 0 2080 2 0 2 2 0 8 0 art_node 16 534 0 504 1 0 1 1 0 8 0 sysvmsgpl 40 49 0 36 2 1 1 1 0 8 0 semapl 112 1115 0 1105 1 0 1 1 0 8 0 shmpl 112 157 0 29 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 19190 0 17772 46 0 46 46 0 8 0 ffsino 240 19190 0 17772 84 0 84 84 0 8 0 nchpl 144 35312 0 33683 61 0 61 61 0 8 0 uvmvnodes 72 8466 0 0 154 0 154 154 0 8 0 vnodes 200 8466 0 0 446 0 446 446 0 8 0 namei 1024 117569 0 117569 12 11 1 1 0 8 1 scsiplug 64 8 0 8 7 7 0 1 0 8 0 scxspl 192 137483 0 137483 28 26 2 7 0 8 2 plimitpl 152 933 0 927 1 0 1 1 0 8 0 sigapl 432 11670 0 11658 2 0 2 2 0 8 0 futexpl 56 182874 0 182874 16 15 1 1 0 8 1 knotepl 112 2827 0 2806 2 1 1 2 0 8 0 kqueuepl 104 2539 0 2537 1 0 1 1 0 8 0 pipepl 112 6590 0 6575 16 15 1 2 0 8 0 fdescpl 424 11671 0 11658 2 0 2 2 0 8 0 filepl 120 68880 0 68803 17 13 4 5 0 8 1 lockfpl 104 3684 0 3684 17 16 1 1 0 8 1 lockfspl 48 1259 0 1259 17 16 1 1 0 8 1 sessionpl 112 77 0 68 1 0 1 1 0 8 0 pgrppl 48 183 0 174 1 0 1 1 0 8 0 ucredpl 96 13734 0 13727 1 0 1 1 0 8 0 zombiepl 144 11661 0 11661 1 0 1 1 0 8 1 processpl 864 11689 0 11661 4 0 4 4 0 8 0 procpl 632 25467 0 25431 4 0 4 4 0 8 0 sosppl 128 150 0 150 38 37 1 1 0 8 1 sockpl 384 9923 0 9906 20 17 3 4 0 8 1 mcl64k 65536 2033 0 2033 249 248 1 64 0 8 1 mcl16k 16384 38 0 38 33 33 0 1 0 8 0 mcl12k 12288 204 0 204 41 40 1 1 0 8 1 mcl9k 9216 139 0 139 47 46 1 1 0 8 1 mcl8k 8192 205 0 205 41 41 0 1 0 8 0 mcl4k 4096 566 0 566 23 22 1 1 0 8 1 mcl2k2 2112 75 0 75 36 36 0 1 0 8 0 mcl2k 2048 76096 0 76049 20 13 7 12 0 8 0 mtagpl 80 310 0 304 4 3 1 1 0 8 0 mbufpl 256 180664 0 180569 121 110 11 38 0 8 0 bufpl 256 35436 0 26971 530 0 530 530 0 8 0 anonpl 16 1103519 0 1091465 282 218 64 69 0 62 1 amapchunkpl 152 53595 0 53493 171 165 6 16 0 158 0 amappl16 192 61880 0 61209 352 317 35 47 0 8 0 amappl15 184 1213 0 1213 12 12 0 1 0 8 0 amappl14 176 1321 0 1314 1 0 1 1 0 8 0 amappl13 168 2780 0 2780 6 6 0 1 0 8 0 amappl12 160 862 0 860 1 0 1 1 0 8 0 amappl11 152 900 0 889 1 0 1 1 0 8 0 amappl10 144 1703 0 1702 1 0 1 1 0 8 0 amappl9 136 2762 0 2759 1 0 1 1 0 8 0 amappl8 128 2178 0 2136 4 2 2 2 0 8 0 amappl7 120 1752 0 1745 1 0 1 1 0 8 0 amappl6 112 838 0 828 1 0 1 1 0 8 0 amappl5 104 1413 0 1403 1 0 1 1 0 8 0 amappl4 96 12494 0 12462 1 0 1 1 0 8 0 amappl3 88 2016 0 2005 1 0 1 1 0 8 0 amappl2 80 90478 0 90411 3 1 2 3 0 8 0 amappl1 72 217520 0 217116 29 20 9 19 0 8 0 amappl 80 26451 0 26418 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 158 0 29 3 0 3 3 0 8 0 uaddrrnd 24 11671 0 11658 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 11671 0 11658 1 0 1 1 0 8 0 vmmpekpl 168 69997 0 69971 2 0 2 2 0 8 0 vmmpepl 168 1355927 0 1354249 606 522 84 112 0 357 1 vmsppl 272 11670 0 11658 7 6 1 2 0 8 0 pdppl 4096 23348 0 23316 9 4 5 6 0 8 0 pvpl 32 3382716 0 3367634 1077 858 219 276 0 265 78 pmappl 200 11670 0 11658 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1159 0 501 22 2 20 21 0 8 0