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 *215820 70520 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(ffffffff821de07f,ffffffff821f331b,149,ffffffff821bc507) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd803d8c8300) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803d8c8300) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803d8c8300) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd803d8c8300) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803b0abeb0,2,fffffd803f7c6a80,ffff800014914ee8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd802e61c878,0,4,fffffd803f7c6a80) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800017374f88) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd80396414f0,fffffd803b0abeb0,ffff800017375088) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff800014914ee8,a,c002d0e000,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800017375200) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,100,ff) at Xsyscall+0x128 end of kernel end trace frame: 0xc00004b978, 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(ffffffff821de07f,ffffffff821f331b,149,ffffffff821bc507) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd803d8c8300) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803d8c8300) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803d8c8300) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd803d8c8300) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803b0abeb0,2,fffffd803f7c6a80,ffff800014914ee8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd802e61c878,0,4,fffffd803f7c6a80) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800017374f88) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd80396414f0,fffffd803b0abeb0,ffff800017375088) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff800014914ee8,a,c002d0e000,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800017375200) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,100,ff) at Xsyscall+0x128 end of kernel end trace frame: 0xc00004b978, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800017374a60 rbx 0xffff800017374b10 rdx 0x2 rcx 0 rax 0 r8 0xffff800017374a20 r9 0x1 r10 0 r11 0x1d6b1d200ee7d291 r12 0x3000000008 r13 0xffff800017374a70 r14 0x100 r15 0x1 rip 0xffffffff811edc88 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800017374a50 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=215820 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000149153d8,0xffff800014915b50 process=0xffff8000148a26d8 user=0xffff800017370000, vmspace=0xfffffd803f013880 estcpu=36, cpticks=2, pctcpu=0.2 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 9931 415520 0 0 3 0x14200 acct acct 41758 111808 70520 0 3 0x82 piperd syz-executor.1 40896 330505 1 0 3 0x100083 ttyin getty 77565 152917 0 0 3 0x14200 bored sosplice 70520 287278 54356 0 3 0x82 thrsleep syz-fuzzer 70520 340594 54356 0 3 0x4000082 nanosleep syz-fuzzer 70520 444114 54356 0 3 0x4000082 thrsleep syz-fuzzer 70520 170357 54356 0 3 0x4000082 thrsleep syz-fuzzer 70520 325414 54356 0 3 0x4000082 thrsleep syz-fuzzer 70520 69319 54356 0 3 0x4000082 thrsleep syz-fuzzer 70520 403479 54356 0 3 0x4000082 thrsleep syz-fuzzer *70520 215820 54356 0 7 0x4000002 syz-fuzzer 54356 509542 86440 0 3 0x10008a pause ksh 86440 383532 8236 0 3 0x92 select sshd 8236 128080 1 0 3 0x80 select sshd 98006 10805 72854 73 3 0x100090 kqread syslogd 72854 81479 1 0 3 0x100082 netio syslogd 16123 491958 1 77 3 0x100090 poll dhclient 4112 81032 1 0 3 0x80 poll dhclient 10972 243734 0 0 3 0x14200 pgzero zerothread 84400 154726 0 0 3 0x14200 aiodoned aiodoned 87024 95893 0 0 3 0x14200 syncer update 21212 447802 0 0 3 0x14200 cleaner cleaner 23834 390722 0 0 3 0x14200 reaper reaper 33589 65476 0 0 3 0x14200 pgdaemon pagedaemon 20174 288841 0 0 3 0x14200 bored crynlk 93920 287303 0 0 3 0x14200 bored crypto 98645 487652 0 0 3 0x40014200 acpi0 acpi0 37280 490636 0 0 3 0x14200 bored softnet 49100 112674 0 0 3 0x14200 bored systqmp 24621 178365 0 0 3 0x14200 bored systq 36834 213353 0 0 3 0x40014200 bored softclock 23676 483864 0 0 3 0x40014200 idle0 23201 394366 0 0 3 0x14200 bored smr 1 226136 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 9607 7220K 8076K 78643K 22456 0 0 pcb 13 10K 12K 78643K 2106 0 0 rtable 102 12K 14K 78643K 3915 0 0 ifaddr 88 23K 27K 78643K 1113 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 248 0 0 iov 0 0K 40K 78643K 1387 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1216 76K 77K 78643K 6198 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 92 0 0 VM map 2 0K 0K 78643K 40 0 0 sem 12 0K 1K 78643K 1359 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 3 5K 25K 78643K 6682 0 0 sigio 0 0K 0K 78643K 463 0 0 proc 50 38K 63K 78643K 2256 0 0 subproc 16 1K 2K 78643K 631 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 726 0 0 in_multi 14 0K 2K 78643K 1161 0 0 ether_multi 1 0K 0K 78643K 287 0 0 mrt 0 0K 0K 78643K 53 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 1374 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 108 14K 33K 78643K 17324 0 0 UVM aobj 130 4K 4K 78643K 142 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 2736 0 0 NDP 23 0K 1K 78643K 359 0 0 temp 231 3536K 4176K 78643K 147875 0 0 kqueue 0 0K 0K 78643K 57 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 140 0 136 1 0 1 1 0 8 0 rtpcb 80 540 0 538 1 0 1 1 0 8 0 rtentry 112 684 0 652 2 0 2 2 0 8 0 unpcb 120 4007 0 3991 13 11 2 2 0 8 1 syncache 264 37 0 37 15 14 1 1 0 8 1 tcpqe 32 7215 0 7215 6 5 1 1 0 8 1 tcpcb 544 5010 0 5006 75 74 1 16 0 8 0 ipq 40 34 0 34 14 14 0 1 0 8 0 ipqe 40 81 0 81 14 14 0 1 0 8 0 inpcb 280 16879 0 16872 67 64 3 9 0 8 2 rttmr 72 22 0 20 10 9 1 1 0 8 0 nd6 48 83 0 83 3 3 0 1 0 8 0 pkpcb 40 30 0 30 11 11 0 1 0 8 0 swfcl 56 4 0 0 1 0 1 1 0 8 0 ppxss 1128 139 0 139 24 23 1 1 0 8 1 art_heap8 4096 35 0 33 10 8 2 3 0 8 0 art_heap4 256 3053 0 2842 47 31 16 19 0 8 0 art_table 32 3088 0 2875 6 3 3 3 0 8 0 art_node 16 676 0 646 1 0 1 1 0 8 0 sysvmsgpl 40 42 0 27 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 1357 0 1347 1 0 1 1 0 8 0 shmpl 112 140 0 12 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 11434 0 10043 46 0 46 46 0 8 0 ffsino 240 11434 0 10043 83 0 83 83 0 8 0 nchpl 144 22711 0 21109 60 0 60 60 0 8 0 uvmvnodes 72 8784 0 0 160 0 160 160 0 8 0 vnodes 208 8784 0 0 463 0 463 463 0 8 0 namei 1024 74096 0 74096 10 9 1 1 0 8 1 vmpool 520 38 0 38 14 13 1 1 0 8 1 scsiplug 64 4 0 4 2 2 0 1 0 8 0 scxspl 192 102487 0 102487 46 44 2 7 0 8 2 plimitpl 152 596 0 590 1 0 1 1 0 8 0 sigapl 432 6752 0 6741 2 0 2 2 0 8 0 futexpl 56 170029 0 170029 11 10 1 1 0 8 1 knotepl 112 2309 0 2290 10 9 1 3 0 8 0 kqueuepl 104 5737 0 5735 16 15 1 4 0 8 0 pipepl 112 4452 0 4437 16 15 1 2 0 8 0 fdescpl 424 6753 0 6741 2 0 2 2 0 8 0 filepl 120 63461 0 63386 61 56 5 11 0 8 2 lockfpl 104 2304 0 2303 1 0 1 1 0 8 0 lockfspl 48 787 0 786 1 0 1 1 0 8 0 sessionpl 112 56 0 47 1 0 1 1 0 8 0 pgrppl 48 96 0 87 1 0 1 1 0 8 0 ucredpl 96 7357 0 7350 1 0 1 1 0 8 0 zombiepl 144 6746 0 6746 2 1 1 1 0 8 1 processpl 864 6774 0 6746 4 0 4 4 0 8 0 procpl 632 14833 0 14798 5 1 4 5 0 8 0 sosppl 128 110 0 110 28 28 0 1 0 8 0 sockpl 384 21568 0 21543 107 101 6 15 0 8 2 mcl64k 65536 2361 0 2361 184 165 19 47 0 8 19 mcl16k 16384 55 0 55 28 28 0 1 0 8 0 mcl12k 12288 139 0 139 29 28 1 1 0 8 1 mcl9k 9216 115 0 115 27 26 1 1 0 8 1 mcl8k 8192 234 0 234 16 15 1 1 0 8 1 mcl4k 4096 621 0 621 13 12 1 1 0 8 1 mcl2k2 2112 55 0 55 26 25 1 1 0 8 1 mcl2k 2048 62784 0 62741 26 20 6 20 0 8 0 mtagpl 80 256 0 234 8 7 1 1 0 8 0 mbufpl 256 160839 0 160730 130 118 12 28 0 8 2 bufpl 256 33835 0 25060 550 0 550 550 0 8 0 anonpl 16 769179 0 753694 248 168 80 87 0 62 5 amapchunkpl 152 37077 0 36964 153 138 15 19 0 158 9 amappl16 192 37897 0 37011 304 252 52 58 0 8 6 amappl15 184 1256 0 1256 8 7 1 1 0 8 1 amappl14 176 693 0 687 1 0 1 1 0 8 0 amappl13 168 258 0 258 4 4 0 1 0 8 0 amappl12 160 795 0 792 1 0 1 1 0 8 0 amappl11 152 2107 0 2095 1 0 1 1 0 8 0 amappl10 144 1033 0 1033 9 9 0 1 0 8 0 amappl9 136 1561 0 1554 1 0 1 1 0 8 0 amappl8 128 1036 0 999 2 0 2 2 0 8 0 amappl7 120 1199 0 1192 1 0 1 1 0 8 0 amappl6 112 2048 0 2035 1 0 1 1 0 8 0 amappl5 104 1186 0 1176 1 0 1 1 0 8 0 amappl4 96 6744 0 6719 1 0 1 1 0 8 0 amappl3 88 1038 0 1033 1 0 1 1 0 8 0 amappl2 80 51986 0 51929 3 1 2 3 0 8 0 amappl1 72 130791 0 130404 29 20 9 20 0 8 0 amappl 80 15644 0 15610 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 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 141 0 12 4 1 3 3 0 8 0 uaddrrnd 24 6791 0 6741 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 6791 0 6741 1 0 1 1 0 8 0 vmmpekpl 168 42961 0 42938 2 0 2 2 0 8 0 vmmpepl 168 810485 0 808711 528 428 100 130 0 357 6 vmsppl 272 6752 0 6741 10 9 1 2 0 8 0 pdppl 4096 13588 0 13558 7 2 5 6 0 8 0 pvpl 32 2428853 0 2410398 865 605 260 304 0 265 94 pmappl 200 6790 0 6779 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1194 0 493 23 2 21 21 0 8 0