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 * 77441 84108 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(ffffffff821e4529,ffffffff821fa563,149,ffffffff821c34b8) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8027fe2300) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8027fe2300) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8027fe2300) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8027fe2300) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803b3f19e0,2,fffffd803f7c6b40,ffff8000ffff98b8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803a3712d8,0,4,fffffd803f7c6b40) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff80001490a3e8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd80367245c0,fffffd803b3f19e0,ffff80001490a4e8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff98b8,9,c002b40460,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff80001490a660) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,100,23) 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(ffffffff821e4529,ffffffff821fa563,149,ffffffff821c34b8) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8027fe2300) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8027fe2300) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8027fe2300) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8027fe2300) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803b3f19e0,2,fffffd803f7c6b40,ffff8000ffff98b8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803a3712d8,0,4,fffffd803f7c6b40) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff80001490a3e8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd80367245c0,fffffd803b3f19e0,ffff80001490a4e8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff98b8,9,c002b40460,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff80001490a660) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c00002a000,145,100,23) at Xsyscall+0x128 end of kernel end trace frame: 0xc00004b978, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014909ec0 rbx 0xffff800014909f70 rdx 0x2 rcx 0 rax 0 r8 0xffff800014909e80 r9 0x1 r10 0 r11 0x9f7390535b622ebb r12 0x3000000008 r13 0xffff800014909ed0 r14 0x100 r15 0x1 rip 0xffffffff81f6e8c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014909eb0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=77441 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff4c68,0xffff8000ffff8018 process=0xffff8000148a26d8 user=0xffff800014905000, vmspace=0xfffffd803f013220 estcpu=36, cpticks=10, pctcpu=0.5 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 18014 52621 88602 0 2 0 syz-executor.0 88602 388752 84108 0 2 0x2 syz-executor.0 97877 232269 0 0 3 0x14200 acct acct 77113 287249 1 0 3 0x100083 ttyin getty 64085 263972 0 0 3 0x14200 bored sosplice 84108 286065 66442 0 3 0x82 thrsleep syz-fuzzer 84108 429940 66442 0 3 0x4000082 nanosleep syz-fuzzer 84108 344077 66442 0 3 0x4000082 thrsleep syz-fuzzer 84108 446707 66442 0 3 0x4000082 thrsleep syz-fuzzer 84108 93715 66442 0 3 0x4000082 kqread syz-fuzzer *84108 77441 66442 0 7 0x4000002 syz-fuzzer 84108 106705 66442 0 3 0x4000082 thrsleep syz-fuzzer 84108 412663 66442 0 3 0x4000082 thrsleep syz-fuzzer 66442 242634 51335 0 3 0x10008a pause ksh 51335 220650 1190 0 3 0x92 select sshd 1190 364386 1 0 3 0x80 select sshd 53757 429748 45908 73 3 0x100090 kqread syslogd 45908 130185 1 0 3 0x100082 netio syslogd 2646 449951 1 77 3 0x100090 poll dhclient 20878 380785 1 0 3 0x80 poll dhclient 2991 381647 0 0 2 0x14200 zerothread 53034 480440 0 0 3 0x14200 aiodoned aiodoned 90963 391908 0 0 3 0x14200 syncer update 75167 60006 0 0 3 0x14200 cleaner cleaner 88069 497948 0 0 3 0x14200 reaper reaper 52528 418989 0 0 3 0x14200 pgdaemon pagedaemon 18737 222922 0 0 3 0x14200 bored crynlk 34593 67195 0 0 3 0x14200 bored crypto 94285 40728 0 0 3 0x40014200 acpi0 acpi0 21260 321022 0 0 3 0x14200 bored softnet 13079 442541 0 0 3 0x14200 bored systqmp 20199 434848 0 0 3 0x14200 bored systq 7938 340846 0 0 3 0x40014200 bored softclock 52829 431897 0 0 3 0x40014200 idle0 56554 103689 0 0 3 0x14200 bored smr 1 92236 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 9623 7073K 8084K 78643K 67698 0 0 pcb 13 13K 15K 78643K 3135 0 0 rtable 107 12K 14K 78643K 10667 0 0 ifaddr 105 30K 39K 78643K 2609 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 804 0 0 iov 0 0K 32K 78643K 3919 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1222 77K 77K 78643K 22025 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 421 0 0 VM map 151 37K 37K 78643K 211 0 0 sem 12 0K 0K 78643K 6179 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 4 9K 25K 78643K 19708 0 0 sigio 0 0K 0K 78643K 212 0 0 proc 50 38K 63K 78643K 5561 0 0 subproc 16 1K 2K 78643K 1706 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 3982 0 0 in_multi 26 1K 3K 78643K 1812 0 0 ether_multi 1 0K 0K 78643K 111 0 0 mrt 3 0K 0K 78643K 72 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 2975 0 0 pfkey data 0 0K 4K 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 288 1170K 1178K 78643K 49054 0 0 UVM aobj 130 5K 5K 78643K 136 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 3156 0 0 NDP 25 0K 1K 78643K 793 0 0 temp 247 3544K 4185K 78643K 2959617 0 0 kqueue 0 0K 0K 78643K 136 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 435 0 430 1 0 1 1 0 8 0 rtpcb 80 2230 0 2228 1 0 1 1 0 8 0 rtentry 112 1780 0 1744 2 0 2 2 0 8 0 unpcb 120 10491 0 10473 9 8 1 2 0 8 0 syncache 264 60 0 60 26 26 0 1 0 8 0 sackhl 24 5 0 5 5 5 0 1 0 8 0 tcpqe 32 237 0 237 14 14 0 1 0 8 0 tcpcb 544 7921 0 7917 79 78 1 15 0 8 0 ipq 40 110 0 110 51 50 1 1 0 8 1 ipqe 40 2496 0 2496 51 50 1 1 0 8 1 inpcb 280 22912 0 22905 127 126 1 13 0 8 0 rttmr 72 23 0 22 5 4 1 1 0 8 0 nd6 48 216 0 216 15 14 1 1 0 8 1 pkpcb 40 47 0 47 20 20 0 1 0 8 0 swfcl 56 5 0 0 1 0 1 1 0 8 0 ppxss 1128 316 0 316 70 69 1 1 0 8 1 art_heap8 4096 35 0 34 19 18 1 3 0 8 0 art_heap4 256 6368 0 6149 77 60 17 22 0 8 0 art_table 32 6403 0 6183 11 8 3 3 0 8 0 art_node 16 1779 0 1745 1 0 1 1 0 8 0 sysvmsgpl 40 63 0 41 1 0 1 1 0 8 0 semapl 112 6177 0 6167 1 0 1 1 0 8 0 shmpl 112 134 0 6 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 32699 0 31165 50 0 50 50 0 8 0 ffsino 240 32699 0 31165 96 5 91 91 0 8 0 nchpl 144 70681 0 70226 61 41 20 61 0 8 0 uvmvnodes 72 10756 0 0 196 0 196 196 0 8 0 vnodes 208 10756 0 0 567 0 567 567 0 8 0 namei 1024 233860 0 233860 9 8 1 1 0 8 1 vcpupl 1984 152 0 3 19 0 19 19 0 8 0 vmpool 520 209 0 60 15 5 10 10 0 8 0 scsiplug 64 11 0 11 9 8 1 1 0 8 1 scxspl 192 237553 0 237553 82 80 2 7 0 8 2 plimitpl 152 1458 0 1452 1 0 1 1 0 8 0 sigapl 432 19588 0 19576 2 0 2 2 0 8 0 futexpl 56 529982 0 529982 11 10 1 1 0 8 1 knotepl 112 3827 0 3808 1 0 1 1 0 8 0 kqueuepl 104 4644 0 4642 16 15 1 4 0 8 0 pipepl 112 11698 0 11683 28 27 1 2 0 8 0 fdescpl 424 19589 0 19576 2 0 2 2 0 8 0 filepl 120 172112 0 172037 103 99 4 11 0 8 1 lockfpl 104 10698 0 10697 1 0 1 1 0 8 0 lockfspl 48 3325 0 3324 1 0 1 1 0 8 0 sessionpl 112 118 0 109 1 0 1 1 0 8 0 pgrppl 48 448 0 439 1 0 1 1 0 8 0 ucredpl 96 16952 0 16941 1 0 1 1 0 8 0 zombiepl 144 19583 0 19583 1 0 1 1 0 8 1 processpl 864 19612 0 19583 4 0 4 4 0 8 0 procpl 632 43187 0 43151 13 9 4 5 0 8 0 sosppl 128 239 0 239 64 64 0 1 0 8 0 sockpl 384 35869 0 35837 156 151 5 22 0 8 1 mcl64k 65536 3356 0 3356 234 231 3 64 0 8 3 mcl16k 16384 197 0 197 79 78 1 1 0 8 1 mcl12k 12288 534 0 534 58 57 1 1 0 8 1 mcl9k 9216 384 0 384 73 72 1 1 0 8 1 mcl8k 8192 1331 0 1331 72 71 1 1 0 8 1 mcl4k 4096 2261 0 2261 38 37 1 1 0 8 1 mcl2k2 2112 154 0 154 64 63 1 1 0 8 1 mcl2k 2048 104780 0 104734 54 47 7 14 0 8 0 mtagpl 80 1605 0 1605 40 40 0 5 0 8 0 mbufpl 256 342874 0 342744 525 508 17 42 0 8 7 bufpl 256 84082 0 73280 676 0 676 676 0 8 0 anonpl 16 2218588 0 2195690 589 480 109 121 0 62 8 amapchunkpl 152 101973 0 101826 309 299 10 20 0 158 3 amappl16 192 116276 0 114884 752 673 79 93 0 8 5 amappl15 184 4975 0 4975 14 14 0 1 0 8 0 amappl14 176 4822 0 4818 1 0 1 1 0 8 0 amappl13 168 2529 0 2527 14 13 1 1 0 8 0 amappl12 160 1064 0 1061 1 0 1 1 0 8 0 amappl11 152 2129 0 2118 1 0 1 1 0 8 0 amappl10 144 3189 0 3189 14 14 0 1 0 8 0 amappl9 136 3023 0 3018 1 0 1 1 0 8 0 amappl8 128 2397 0 2354 2 0 2 2 0 8 0 amappl7 120 3582 0 3572 1 0 1 1 0 8 0 amappl6 112 1958 0 1947 1 0 1 1 0 8 0 amappl5 104 2079 0 2069 1 0 1 1 0 8 0 amappl4 96 20170 0 20140 1 0 1 1 0 8 0 amappl3 88 4430 0 4410 1 0 1 1 0 8 0 amappl2 80 154935 0 154861 3 1 2 3 0 8 0 amappl1 72 354496 0 354094 26 16 10 20 0 8 0 amappl 80 45136 0 45030 3 0 3 3 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 135 0 6 3 0 3 3 0 8 0 uaddrrnd 24 19798 0 19576 2 0 2 2 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 19798 0 19576 2 0 2 2 0 8 0 vmmpekpl 168 113065 0 113011 3 0 3 3 0 8 0 vmmpepl 168 2359401 0 2356609 1298 1148 150 181 0 357 16 vmsppl 272 19588 0 19576 17 16 1 2 0 8 0 pdppl 4096 39602 0 39421 30 6 24 24 0 8 0 pvpl 32 6290156 0 6267798 1531 1250 281 330 0 265 86 pmappl 200 19797 0 19636 10 1 9 9 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 2010 0 1165 28 1 27 27 0 8 0