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 * 63486 40531 0 0x2 0 0 syz-executor.1 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(ffffffff821e4a9c,ffffffff821f91b1,149,ffffffff821c230c) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd802a527e00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802a527e00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802a527e00) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd802a527e00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd8026b88420,2,fffffd803f7c6b40,ffff800014915b40,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd8032e95d20,0,4,fffffd803f7c6b40) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000148fbf78) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803ae4f000,fffffd8026b88420,ffff8000148fc078) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff800014915b40,ffffff9c,7f7ffffcd120,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000148fc1f0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,89,7f7ffffccc60,89,bde3b75aa00,7f7ffffcd120) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcd110, 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(ffffffff821e4a9c,ffffffff821f91b1,149,ffffffff821c230c) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd802a527e00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802a527e00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802a527e00) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd802a527e00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd8026b88420,2,fffffd803f7c6b40,ffff800014915b40,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd8032e95d20,0,4,fffffd803f7c6b40) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000148fbf78) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803ae4f000,fffffd8026b88420,ffff8000148fc078) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff800014915b40,ffffff9c,7f7ffffcd120,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000148fc1f0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,89,7f7ffffccc60,89,bde3b75aa00,7f7ffffcd120) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcd110, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000148fba50 rbx 0xffff8000148fbb00 rdx 0x2 rcx 0 rax 0 r8 0xffff8000148fba10 r9 0x1 r10 0 r11 0xda680da145a007c5 r12 0x3000000008 r13 0xffff8000148fba60 r14 0x100 r15 0x1 rip 0xffffffff81890ba8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000148fba40 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=63486 stat=onproc flags process=2 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000149153d8,0xffff8000ffff53e0 process=0xffff8000148a2d98 user=0xffff8000148f7000, vmspace=0xfffffd803f013990 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *40531 63486 26110 0 7 0x2 syz-executor.1 79324 413036 0 0 3 0x14200 bored sosplice 26110 353122 49383 0 3 0x82 thrsleep syz-fuzzer 26110 434327 49383 0 3 0x4000082 nanosleep syz-fuzzer 26110 170804 49383 0 3 0x4000082 kqread syz-fuzzer 26110 21509 49383 0 3 0x4000082 thrsleep syz-fuzzer 26110 13338 49383 0 3 0x4000082 thrsleep syz-fuzzer 26110 70638 49383 0 3 0x4000082 thrsleep syz-fuzzer 26110 131434 49383 0 3 0x4000082 thrsleep syz-fuzzer 26110 251452 49383 0 3 0x4000002 biowait syz-fuzzer 26110 497795 49383 0 3 0x4000082 thrsleep syz-fuzzer 49383 420292 5760 0 3 0x10008a pause ksh 5760 50112 3593 0 3 0x92 select sshd 98437 216098 1 0 3 0x100083 ttyin getty 3593 352554 1 0 3 0x80 select sshd 8626 12182 36706 73 3 0x100010 ffs_fsync syslogd 36706 327691 1 0 3 0x100082 netio syslogd 14662 61323 0 0 3 0x14200 pgzero zerothread 34312 285109 0 0 3 0x14200 aiodoned aiodoned 71195 467321 0 0 3 0x14200 syncer update 60661 58326 0 0 3 0x14200 cleaner cleaner 60968 451615 0 0 3 0x14200 reaper reaper 27031 144629 0 0 3 0x14200 pgdaemon pagedaemon 98642 372817 0 0 3 0x14200 bored crynlk 26024 342874 0 0 3 0x14200 bored crypto 25106 274038 0 0 3 0x40014200 acpi0 acpi0 34461 417562 0 0 3 0x14200 bored softnet 70850 341535 0 0 3 0x14200 bored systqmp 25692 71677 0 0 3 0x14200 bored systq 26535 478274 0 0 3 0x40014200 bored softclock 34409 130197 0 0 3 0x40014200 idle0 45568 389039 0 0 3 0x14200 bored smr 1 425207 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 9585 6308K 13644K 78643K 28341 0 0 pcb 13 11K 13K 78643K 1192 0 0 rtable 112 13K 14K 78643K 2027 0 0 ifaddr 88 18K 20K 78643K 536 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 192 0 0 iov 0 0K 32K 78643K 1163 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1343 84K 85K 78643K 6445 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 64 0 0 VM map 32 8K 8K 78643K 45 0 0 sem 12 0K 1K 78643K 1366 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 3 5K 25K 78643K 2958 0 0 sigio 0 0K 0K 78643K 59 0 0 proc 44 30K 63K 78643K 1319 0 0 subproc 16 1K 2K 78643K 289 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 816 0 0 in_multi 16 1K 2K 78643K 370 0 0 ether_multi 1 0K 0K 78643K 40 0 0 mrt 0 0K 0K 78643K 18 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 132 583K 583K 78643K 132 0 0 exec 0 0K 1K 78643K 708 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 167 243K 254K 78643K 8312 0 0 UVM aobj 130 6K 6K 78643K 139 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 695 0 0 NDP 21 0K 0K 78643K 166 0 0 temp 218 3544K 4179K 78643K 150597 0 0 kqueue 0 0K 0K 78643K 18 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 46 0 42 1 0 1 1 0 8 0 rtpcb 80 794 0 794 1 1 0 1 0 8 0 rtentry 112 316 0 276 2 0 2 2 0 8 0 unpcb 120 2255 0 2241 2 1 1 2 0 8 0 syncache 264 21 0 21 10 10 0 1 0 8 0 tcpqe 32 43 0 43 5 5 0 1 0 8 0 tcpcb 544 1798 0 1794 18 17 1 12 0 8 0 ipq 40 28 0 28 9 9 0 1 0 8 0 ipqe 40 642 0 642 9 9 0 1 0 8 0 inpcb 280 6390 0 6386 20 19 1 9 0 8 0 rttmr 72 7 0 6 3 2 1 1 0 8 0 ip6q 72 2 0 2 1 1 0 1 0 8 0 ip6af 40 6 0 6 1 1 0 1 0 8 0 nd6 48 43 0 43 1 1 0 1 0 8 0 pkpcb 40 25 0 25 7 7 0 1 0 8 0 swfcl 56 3 0 0 1 0 1 1 0 8 0 ppxss 1128 60 0 60 10 10 0 1 0 8 0 art_heap8 4096 11 0 9 8 6 2 4 0 8 0 art_heap4 256 1324 0 1149 24 8 16 18 0 8 0 art_table 32 1335 0 1158 3 0 3 3 0 8 0 art_node 16 313 0 279 1 0 1 1 0 8 0 sysvmsgpl 40 42 0 27 1 0 1 1 0 8 0 semapl 112 1364 0 1354 1 0 1 1 0 8 0 shmpl 112 137 0 9 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 6322 0 4931 46 0 46 46 0 8 0 ffsino 240 6322 0 4931 83 0 83 83 0 8 0 nchpl 144 11562 0 11114 60 40 20 60 0 8 0 uvmvnodes 72 5940 0 0 108 0 108 108 0 8 0 vnodes 208 5940 0 0 313 0 313 313 0 8 0 namei 1024 43192 0 43192 2 1 1 1 0 8 1 vcpupl 1984 30 0 0 4 0 4 4 0 8 0 vmpool 520 43 0 13 2 0 2 2 0 8 0 scsiplug 64 3 0 3 2 2 0 1 0 8 0 scxspl 192 39669 0 39667 21 20 1 7 0 8 0 plimitpl 152 274 0 269 1 0 1 1 0 8 0 sigapl 432 3083 0 3074 2 0 2 2 0 8 0 futexpl 56 120995 0 120995 2 1 1 1 0 8 1 knotepl 112 746 0 729 4 3 1 3 0 8 0 kqueuepl 104 1137 0 1135 4 3 1 4 0 8 0 pipepl 112 1910 0 1895 8 7 1 2 0 8 0 fdescpl 424 3084 0 3074 2 0 2 2 0 8 0 filepl 120 34224 0 34159 37 33 4 11 0 8 0 lockfpl 104 1735 0 1735 1 1 0 1 0 8 0 lockfspl 48 465 0 465 1 1 0 1 0 8 0 sessionpl 112 32 0 25 1 0 1 1 0 8 0 pgrppl 48 58 0 51 1 0 1 1 0 8 0 ucredpl 96 3447 0 3440 1 0 1 1 0 8 0 zombiepl 144 3075 0 3075 1 0 1 1 0 8 1 processpl 864 3100 0 3075 4 0 4 4 0 8 0 procpl 632 6705 0 6672 4 0 4 4 0 8 0 sosppl 128 39 0 39 8 8 0 1 0 8 0 sockpl 384 9591 0 9573 37 33 4 14 0 8 0 mcl64k 65536 990 0 990 65 65 0 33 0 8 0 mcl16k 16384 84 0 84 8 8 0 1 0 8 0 mcl12k 12288 147 0 147 2 2 0 1 0 8 0 mcl9k 9216 63 0 63 8 8 0 1 0 8 0 mcl8k 8192 224 0 224 2 2 0 1 0 8 0 mcl4k 4096 395 0 395 2 2 0 1 0 8 0 mcl2k2 2112 27 0 27 14 14 0 1 0 8 0 mcl2k 2048 75200 0 75154 20 13 7 14 0 8 0 mtagpl 80 130 0 130 3 3 0 1 0 8 0 mbufpl 256 162485 0 162410 103 93 10 31 0 8 0 bufpl 256 19720 0 13340 399 0 399 399 0 8 0 anonpl 16 404075 0 383090 168 64 104 104 0 62 10 amapchunkpl 152 16714 0 16570 58 41 17 20 0 158 10 amappl16 192 18943 0 17763 140 79 61 72 0 8 0 amappl15 184 269 0 269 3 3 0 1 0 8 0 amappl14 176 502 0 496 1 0 1 1 0 8 0 amappl13 168 330 0 330 4 4 0 1 0 8 0 amappl12 160 343 0 343 5 5 0 1 0 8 0 amappl11 152 518 0 511 1 0 1 1 0 8 0 amappl10 144 296 0 294 1 0 1 1 0 8 0 amappl9 136 1489 0 1484 1 0 1 1 0 8 0 amappl8 128 1103 0 1047 3 1 2 2 0 8 0 amappl7 120 404 0 397 1 0 1 1 0 8 0 amappl6 112 493 0 479 1 0 1 1 0 8 0 amappl5 104 835 0 829 1 0 1 1 0 8 0 amappl4 96 2795 0 2771 1 0 1 1 0 8 0 amappl3 88 1229 0 1222 1 0 1 1 0 8 0 amappl2 80 23636 0 23582 3 1 2 3 0 8 0 amappl1 72 66040 0 65688 25 16 9 20 0 8 1 amappl 80 7221 0 7171 2 0 2 2 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 138 0 9 3 0 3 3 0 8 0 uaddrrnd 24 3127 0 3074 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3127 0 3074 1 0 1 1 0 8 0 vmmpekpl 168 23572 0 23540 2 0 2 2 0 8 0 vmmpepl 168 387188 0 385106 240 132 108 151 0 357 1 vmsppl 272 3083 0 3074 4 3 1 2 0 8 0 pdppl 4096 6260 0 6204 10 1 9 9 0 8 0 pvpl 32 1052293 0 1029142 461 137 324 338 0 265 123 pmappl 200 3126 0 3087 4 1 3 3 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 753 0 221 17 1 16 16 0 8 0