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 *167646 38396 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(ffffffff81f41ae2,ffffffff81f55f98,149,ffffffff81f22319) at __assert+0x2e sys/kern/subr_prf.c:155 buf_free_pages(fffffd802ab4a700) at buf_free_pages+0x1ec sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802ab4a700) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802ab4a700) at buf_put+0x172 sys/kern/vfs_bio.c:130 brelse(fffffd802ab4a700) at brelse+0x257 sys/kern/vfs_bio.c:926 vinvalbuf(fffffd80310f6ac8,2,fffffd803f7c69c0,ffff8000ffff4970,0,0) at vinvalbuf+0x36b sys/kern/vfs_subr.c:1937 ffs_truncate(fffffd8037c34970,0,4,fffffd803f7c69c0) at ffs_truncate+0xfad sys/ufs/ffs/ffs_inode.c:325 ufs_rmdir(ffff80001498aa80) at ufs_rmdir+0x3aa sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803679c808,fffffd80310f6ac8,ffff80001498ab80) at VOP_RMDIR+0x7b sys/kern/vfs_vops.c:473 dounlinkat(ffff8000ffff4970,ffffff9c,c0006b29c0,8) at dounlinkat+0x158 sys/kern/vfs_syscalls.c:1706 syscall(ffff80001498ad10) at syscall+0x541 Xsyscall(6,89,0,89,aa,34) at Xsyscall+0x128 end of kernel end trace frame: 0xc001a27af0, 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(ffffffff81f41ae2,ffffffff81f55f98,149,ffffffff81f22319) at __assert+0x2e sys/kern/subr_prf.c:155 buf_free_pages(fffffd802ab4a700) at buf_free_pages+0x1ec sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802ab4a700) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802ab4a700) at buf_put+0x172 sys/kern/vfs_bio.c:130 brelse(fffffd802ab4a700) at brelse+0x257 sys/kern/vfs_bio.c:926 vinvalbuf(fffffd80310f6ac8,2,fffffd803f7c69c0,ffff8000ffff4970,0,0) at vinvalbuf+0x36b sys/kern/vfs_subr.c:1937 ffs_truncate(fffffd8037c34970,0,4,fffffd803f7c69c0) at ffs_truncate+0xfad sys/ufs/ffs/ffs_inode.c:325 ufs_rmdir(ffff80001498aa80) at ufs_rmdir+0x3aa sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd803679c808,fffffd80310f6ac8,ffff80001498ab80) at VOP_RMDIR+0x7b sys/kern/vfs_vops.c:473 dounlinkat(ffff8000ffff4970,ffffff9c,c0006b29c0,8) at dounlinkat+0x158 sys/kern/vfs_syscalls.c:1706 syscall(ffff80001498ad10) at syscall+0x541 Xsyscall(6,89,0,89,aa,34) at Xsyscall+0x128 end of kernel end trace frame: 0xc001a27af0, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001498a550 rbx 0xffff80001498a600 rdx 0x2 rcx 0 rax 0 r8 0xffff80001498a510 r9 0x1 r10 0 r11 0x699c628bf5b242f6 r12 0x3000000008 r13 0xffff80001498a560 r14 0x100 r15 0x1 rip 0xffffffff81235868 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001498a540 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=167646 stat=onproc flags process=2 proc=0 pri=17, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff4718,0xffff8000ffff44d0 process=0xffff800014952360 user=0xffff800014985000, vmspace=0xfffffd803f013420 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 97981 271466 39565 0 3 0x80 nanosleep syz-executor.0 97981 16403 39565 0 3 0x4000080 netio syz-executor.0 97981 194737 39565 0 3 0x4000080 fsleep syz-executor.0 37056 411077 1 0 3 0x100083 ttyin getty 39565 439271 38396 0 3 0x82 nanosleep syz-executor.0 41223 65600 0 0 3 0x14200 bored sosplice *38396 167646 89885 0 7 0x2 syz-fuzzer 38396 279036 89885 0 3 0x4000082 nanosleep syz-fuzzer 38396 253998 89885 0 3 0x4000082 thrsleep syz-fuzzer 38396 397653 89885 0 3 0x4000082 thrsleep syz-fuzzer 38396 281242 89885 0 3 0x4000082 thrsleep syz-fuzzer 38396 100124 89885 0 3 0x4000082 thrsleep syz-fuzzer 38396 190818 89885 0 3 0x4000082 thrsleep syz-fuzzer 38396 253384 89885 0 3 0x4000082 thrsleep syz-fuzzer 89885 406802 76892 0 3 0x10008a pause ksh 76892 225608 95951 0 3 0x92 select sshd 95951 381779 1 0 3 0x80 select sshd 5894 338755 18845 73 3 0x100090 kqread syslogd 18845 280430 1 0 3 0x100082 netio syslogd 65404 496737 1 77 3 0x100090 poll dhclient 385 515381 1 0 3 0x80 poll dhclient 75824 17499 0 0 3 0x14200 pgzero zerothread 16978 477487 0 0 3 0x14200 aiodoned aiodoned 18582 490691 0 0 3 0x14200 syncer update 96347 247389 0 0 3 0x14200 cleaner cleaner 3433 479712 0 0 3 0x14200 reaper reaper 68897 180870 0 0 3 0x14200 pgdaemon pagedaemon 50748 464795 0 0 3 0x14200 bored crynlk 50491 294757 0 0 3 0x14200 bored crypto 71098 504292 0 0 3 0x40014200 acpi0 acpi0 6426 91784 0 0 3 0x14200 bored softnet 62988 23611 0 0 3 0x14200 bored systqmp 42494 480851 0 0 3 0x14200 bored systq 6024 419311 0 0 3 0x40014200 bored softclock 91121 328173 0 0 3 0x40014200 idle0 90085 456457 0 0 3 0x14200 bored smr 1 225909 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 9472 6329K 6339K 78643K 10663 0 0 pcb 25 9K 10K 78643K 163 0 0 rtable 82 3K 3K 78643K 411 0 0 ifaddr 42 10K 11K 78643K 109 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 27 0 0 iov 0 0K 16K 78643K 25 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1195 75K 75K 78643K 1398 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 3 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 28 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 4 9K 25K 78643K 228 0 0 sigio 0 0K 0K 78643K 2 0 0 proc 42 30K 46K 78643K 404 0 0 subproc 32 32769K 67586K 78643K 272 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 29 0 0 in_multi 22 1K 2K 78643K 105 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 211 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 67 11K 22K 78643K 1297 0 0 UVM aobj 12 2K 2K 78643K 12 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 2 0 0 NDP 8 0K 0K 78643K 37 0 0 temp 98 2346K 2413K 78643K 3799 0 0 kqueue 0 0K 0K 78643K 1 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 10 0 7 1 0 1 1 0 8 0 inpcbpl 280 134 0 127 1 0 1 1 0 8 0 plimitpl 152 26 0 20 1 0 1 1 0 8 0 rtentry 112 95 0 64 3 1 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 42 0 38 1 0 1 1 0 8 0 nd6 48 16 0 14 1 0 1 1 0 8 0 ppxss 1128 6 0 6 2 1 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 440 0 294 15 3 12 12 0 8 1 art_table 32 441 0 294 2 0 2 2 0 8 0 art_node 16 94 0 66 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 2 1 1 0 1 0 8 0 semapl 112 26 0 16 1 0 1 1 0 8 0 shmpl 112 10 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1756 0 331 47 0 47 47 0 8 0 ffsino 240 1756 0 331 85 0 85 85 0 8 0 nchpl 144 2260 0 640 61 0 61 61 0 8 0 uvmvnodes 72 1916 0 0 35 0 35 35 0 8 0 vnodes 200 1916 0 0 101 0 101 101 0 8 0 namei 1024 6110 0 6110 2 1 1 1 0 8 1 scsiplug 64 2 0 2 1 0 1 1 0 8 1 scxspl 192 10626 0 10626 6 5 1 5 0 8 1 sigapl 432 379 0 367 2 0 2 2 0 8 0 futexpl 56 2918 0 2917 2 1 1 1 0 8 0 knotepl 112 253 0 228 4 2 2 2 0 8 1 kqueuepl 104 70 0 68 1 0 1 1 0 8 0 pipepl 112 302 0 287 2 1 1 1 0 8 0 fdescpl 424 380 0 367 2 0 2 2 0 8 0 filepl 120 2222 0 2146 5 1 4 4 0 8 0 lockfpl 104 45 0 45 3 2 1 1 0 8 1 lockfspl 32 42 0 42 3 2 1 1 0 8 1 sessionpl 112 24 0 15 1 0 1 1 0 8 0 pgrppl 48 26 0 17 1 0 1 1 0 8 0 ucredpl 96 319 0 312 1 0 1 1 0 8 0 zombiepl 144 367 0 367 2 1 1 1 0 8 1 processpl 840 395 0 367 4 0 4 4 0 8 0 procpl 600 627 0 590 4 0 4 4 0 8 0 sosppl 128 3 0 3 1 1 0 1 0 8 0 sockpl 384 260 0 241 4 1 3 3 0 8 1 mcl64k 65536 7 0 7 2 1 1 1 0 8 1 mcl12k 12288 6 0 6 2 1 1 1 0 8 1 mcl9k 9216 2 0 2 1 1 0 1 0 8 0 mcl4k 4096 16 0 16 3 2 1 1 0 8 1 mcl2k 2048 46340 0 46299 15 8 7 12 0 8 1 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 77328 0 77269 11 3 8 8 0 8 2 bufpl 256 6823 0 1358 342 0 342 342 0 8 0 anonpl 16 54990 0 47505 51 4 47 49 0 62 11 amapchunkpl 152 1974 0 1894 15 2 13 14 0 158 8 amappl16 192 1840 0 1401 46 15 31 35 0 8 8 amappl15 184 65 0 63 1 0 1 1 0 8 0 amappl14 176 54 0 48 1 0 1 1 0 8 0 amappl13 168 100 0 96 1 0 1 1 0 8 0 amappl12 160 33 0 31 2 1 1 1 0 8 0 amappl11 152 217 0 208 1 0 1 1 0 8 0 amappl10 144 88 0 87 2 1 1 1 0 8 0 amappl9 136 373 0 371 1 0 1 1 0 8 0 amappl8 128 182 0 168 1 0 1 1 0 8 0 amappl7 120 81 0 75 1 0 1 1 0 8 0 amappl6 112 49 0 44 1 0 1 1 0 8 0 amappl5 104 180 0 168 1 0 1 1 0 8 0 amappl4 96 273 0 249 2 1 1 2 0 8 0 amappl3 88 138 0 132 1 0 1 1 0 8 0 amappl2 80 2336 0 2286 2 0 2 2 0 8 0 amappl1 72 15802 0 15396 25 15 10 19 0 8 0 amappl 72 871 0 841 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 11 0 0 1 0 1 1 0 8 0 uaddrrnd 24 380 0 367 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 380 0 367 1 0 1 1 0 8 0 vmmpekpl 168 6731 0 6708 2 0 2 2 0 8 0 vmmpepl 168 51688 0 50374 103 29 74 79 0 357 10 vmsppl 264 379 0 367 3 2 1 2 0 8 0 pdppl 4096 766 0 734 6 1 5 6 0 8 0 pvpl 32 264637 0 254184 236 29 207 230 0 265 110 pmappl 192 379 0 367 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 488 0 21 14 0 14 14 0 8 0