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 *397870 2014 0 0x2 0 0 syz-fuzzer db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x15c sys/kern/subr_prf.c:208 __assert(ffffffff81f0e9c0,ffffffff81f2305f,149,ffffffff81eef33b) at __assert+0x28 sys/kern/subr_prf.c:155 buf_free_pages(fffffd802a038300) at buf_free_pages+0x1ec sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802a038300) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802a038300) at buf_put+0x172 sys/kern/vfs_bio.c:130 brelse(fffffd802a038300) at brelse+0x257 sys/kern/vfs_bio.c:926 vinvalbuf(fffffd8038ae3a70,2,fffffd803f7c7a20,ffff80001495c4c0,0,0) at vinvalbuf+0x36b sys/kern/vfs_subr.c:1937 ffs_truncate(fffffd8038ab3e10,0,4,fffffd803f7c7a20) at ffs_truncate+0xf87 sys/ufs/ffs/ffs_inode.c:325 ufs_rmdir(ffff800014993d50) at ufs_rmdir+0x3aa sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd80367a6678,fffffd8038ae3a70,ffff800014993e50) at VOP_RMDIR+0x7b sys/kern/vfs_vops.c:473 dounlinkat(ffff80001495c4c0,ffffff9c,c0006302a0,8) at dounlinkat+0x158 sys/kern/vfs_syscalls.c:1706 syscall(ffff800014993fe0) at syscall+0x535 Xsyscall(6,89,0,89,aa,e) at Xsyscall+0x128 end of kernel end trace frame: 0xc00179faf0, 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:399 panic() at panic+0x15c sys/kern/subr_prf.c:208 __assert(ffffffff81f0e9c0,ffffffff81f2305f,149,ffffffff81eef33b) at __assert+0x28 sys/kern/subr_prf.c:155 buf_free_pages(fffffd802a038300) at buf_free_pages+0x1ec sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802a038300) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802a038300) at buf_put+0x172 sys/kern/vfs_bio.c:130 brelse(fffffd802a038300) at brelse+0x257 sys/kern/vfs_bio.c:926 vinvalbuf(fffffd8038ae3a70,2,fffffd803f7c7a20,ffff80001495c4c0,0,0) at vinvalbuf+0x36b sys/kern/vfs_subr.c:1937 ffs_truncate(fffffd8038ab3e10,0,4,fffffd803f7c7a20) at ffs_truncate+0xf87 sys/ufs/ffs/ffs_inode.c:325 ufs_rmdir(ffff800014993d50) at ufs_rmdir+0x3aa sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd80367a6678,fffffd8038ae3a70,ffff800014993e50) at VOP_RMDIR+0x7b sys/kern/vfs_vops.c:473 dounlinkat(ffff80001495c4c0,ffffff9c,c0006302a0,8) at dounlinkat+0x158 sys/kern/vfs_syscalls.c:1706 syscall(ffff800014993fe0) at syscall+0x535 Xsyscall(6,89,0,89,aa,e) at Xsyscall+0x128 end of kernel end trace frame: 0xc00179faf0, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014993820 rbx 0xffff8000149938d0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149937e0 r9 0x1 r10 0 r11 0x11a4b23543186b35 r12 0x3000000008 r13 0xffff800014993830 r14 0x100 r15 0x1 rip 0xffffffff81e261d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014993810 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=397870 stat=onproc flags process=2 proc=0 pri=17, usrpri=54, nice=20 forw=0xffffffffffffffff, list=0xffff80001495c718,0xffff80001495c278 process=0xffff8000ffff6d30 user=0xffff80001498f000, vmspace=0xfffffd803f015c60 estcpu=4, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 90393 356341 1 0 3 0x100083 ttyin getty 35567 360496 0 0 3 0x14200 bored sosplice * 2014 397870 37571 0 7 0x2 syz-fuzzer 2014 50242 37571 0 3 0x4000082 nanosleep syz-fuzzer 2014 355724 37571 0 3 0x4000082 thrsleep syz-fuzzer 2014 413892 37571 0 3 0x4000082 thrsleep syz-fuzzer 2014 151303 37571 0 3 0x4000082 thrsleep syz-fuzzer 2014 359412 37571 0 3 0x4000082 thrsleep syz-fuzzer 2014 187721 37571 0 3 0x4000082 thrsleep syz-fuzzer 2014 330430 37571 0 3 0x4000082 thrsleep syz-fuzzer 37571 197399 80578 0 3 0x10008a pause ksh 80578 288726 73742 0 3 0x92 select sshd 73742 509175 1 0 3 0x80 select sshd 34582 56081 71514 73 3 0x100010 ffs_fsync syslogd 71514 270462 1 0 3 0x100082 netio syslogd 18292 302827 0 0 3 0x14200 pgzero zerothread 9895 464978 0 0 3 0x14200 aiodoned aiodoned 42206 188653 0 0 3 0x14200 syncer update 19506 373535 0 0 3 0x14200 cleaner cleaner 28071 207384 0 0 3 0x14200 reaper reaper 67799 289247 0 0 3 0x14200 pgdaemon pagedaemon 89887 5484 0 0 3 0x14200 bored crynlk 22248 155211 0 0 3 0x14200 bored crypto 43511 255470 0 0 3 0x40014200 acpi0 acpi0 77253 489989 0 0 2 0x14200 softnet 31187 65756 0 0 3 0x14200 bored systqmp 18595 468948 0 0 3 0x14200 bored systq 49276 278462 0 0 3 0x40014200 bored softclock 30774 98148 0 0 3 0x40014200 idle0 1 76293 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 9494 8327K 8409K 78643K 12178 0 0 pcb 19 8K 11K 78643K 2501 0 0 rtable 64 2K 3K 78643K 869 0 0 ifaddr 43 14K 18K 78643K 608 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 45 0 0 iov 0 0K 28K 78643K 633 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1203 75K 76K 78643K 4129 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 62 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 541 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1777 193K 286K 78643K 12501 0 0 file desc 2 1K 21K 78643K 4488 0 0 sigio 0 0K 0K 78643K 98 0 0 proc 42 30K 54K 78643K 1168 0 0 subproc 0 0K 67586K 78643K 467 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 697 0 0 in_multi 11 0K 2K 78643K 339 0 0 ether_multi 1 0K 0K 78643K 22 0 0 mrt 0 0K 0K 78643K 4 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 102 450K 450K 78643K 102 0 0 exec 0 0K 1K 78643K 726 0 0 pfkey data 0 0K 0K 78643K 4 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 76 4K 40K 78643K 11889 0 0 UVM aobj 130 4K 4K 78643K 166 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 158 0 0 NDP 9 0K 0K 78643K 174 0 0 temp 115 2344K 2424K 78643K 15693 0 0 kqueue 0 0K 0K 78643K 55 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 14 0 12 1 0 1 1 0 8 0 inpcbpl 280 2271 0 2267 1 0 1 1 0 8 0 plimitpl 152 77 0 73 1 0 1 1 0 8 0 rtentry 112 131 0 109 2 1 1 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 2 0 2 1 1 0 1 0 8 0 tcpcb 544 769 0 765 1 0 1 1 0 8 0 nd6 48 24 0 24 1 0 1 1 0 8 1 swfcl 56 1 0 0 1 0 1 1 0 8 0 ppxss 1128 103 0 103 26 26 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 639 0 543 12 2 10 12 0 8 4 art_table 32 640 0 543 2 0 2 2 0 8 1 art_node 16 130 0 110 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 6 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 533 0 523 1 0 1 1 0 8 0 shmpl 112 164 0 36 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 10170 0 8698 48 0 48 48 0 8 0 ffsino 240 10170 0 8698 88 0 88 88 0 8 0 nchpl 144 16936 0 15329 61 0 61 61 0 8 0 uvmvnodes 72 6749 0 0 123 0 123 123 0 8 0 vnodes 200 6749 0 0 356 0 356 356 0 8 0 namei 1024 54419 0 54419 8 7 1 1 0 8 1 scsiplug 64 11 0 11 8 8 0 1 0 8 0 scxspl 192 84293 0 84292 38 37 1 7 0 8 0 sigapl 432 4633 0 4625 2 0 2 2 0 8 0 futexpl 56 75857 0 75857 9 8 1 1 0 8 1 knotepl 112 1260 0 1241 9 8 1 2 0 8 0 kqueuepl 104 1374 0 1372 1 0 1 1 0 8 0 pipepl 112 2982 0 2973 11 10 1 2 0 8 0 fdescpl 424 4634 0 4625 2 0 2 2 0 8 0 filepl 120 30429 0 30389 16 13 3 5 0 8 0 lockfpl 104 1795 0 1795 9 9 0 1 0 8 0 lockfspl 32 2727 0 2727 9 9 0 1 0 8 0 sessionpl 112 34 0 28 1 0 1 1 0 8 0 pgrppl 48 114 0 108 1 0 1 1 0 8 0 ucredpl 96 8961 0 8955 1 0 1 1 0 8 0 zombiepl 144 4625 0 4625 2 1 1 1 0 8 1 processpl 840 4648 0 4625 5 1 4 4 0 8 0 procpl 600 10859 0 10829 14 11 3 4 0 8 0 sosppl 128 68 0 68 18 18 0 1 0 8 0 sockpl 384 4502 0 4492 11 9 2 4 0 8 0 mcl64k 65536 2368 0 2368 213 213 0 65 0 8 0 mcl16k 16384 11 0 11 9 9 0 1 0 8 0 mcl12k 12288 108 0 108 24 24 0 1 0 8 0 mcl9k 9216 85 0 85 22 22 0 1 0 8 0 mcl8k 8192 105 0 105 23 23 0 1 0 8 0 mcl4k 4096 240 0 240 14 14 0 1 0 8 0 mcl2k2 2112 23 0 23 13 13 0 1 0 8 0 mcl2k 2048 51068 0 51036 19 14 5 13 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 107045 0 106999 113 108 5 39 0 8 0 bufpl 256 18725 0 11957 425 1 424 424 0 8 0 anonpl 16 574093 0 567725 238 187 51 67 0 62 10 amapchunkpl 152 26658 0 26590 149 134 15 96 0 158 11 amappl16 192 31944 0 31506 314 291 23 47 0 8 0 amappl15 184 2 0 2 2 2 0 1 0 8 0 amappl14 176 1575 0 1574 2 1 1 1 0 8 0 amappl13 168 135 0 134 1 0 1 1 0 8 0 amappl12 160 578 0 578 2 2 0 1 0 8 0 amappl11 152 651 0 646 1 0 1 1 0 8 0 amappl10 144 3475 0 3473 2 1 1 1 0 8 0 amappl9 136 779 0 778 1 0 1 1 0 8 0 amappl8 128 383 0 347 2 0 2 2 0 8 0 amappl7 120 143 0 134 1 0 1 1 0 8 0 amappl6 112 1629 0 1619 1 0 1 1 0 8 0 amappl5 104 213 0 204 1 0 1 1 0 8 0 amappl4 96 333 0 312 1 0 1 1 0 8 0 amappl3 88 771 0 766 1 0 1 1 0 8 0 amappl2 80 44670 0 44637 2 0 2 2 0 8 0 amappl1 72 92018 0 91669 25 15 10 19 0 8 0 amappl 72 11202 0 11181 1 0 1 1 0 75 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 165 0 36 3 0 3 3 0 8 0 uaddrrnd 24 4634 0 4625 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4634 0 4625 1 0 1 1 0 8 0 vmmpekpl 168 35616 0 35595 4 2 2 2 0 8 0 vmmpepl 168 521649 0 520527 264 188 76 86 0 357 10 vmsppl 264 4633 0 4625 1 0 1 1 0 8 0 pdppl 4096 9274 0 9250 5 0 5 5 0 8 0 pvpl 32 2057734 0 2048696 671 451 220 242 0 265 119 pmappl 192 4633 0 4625 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 936 0 393 18 1 17 17 0 8 0