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 *266720 79876 0 0x2 0 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(ffffffff821e364f,ffffffff821f6eae,149,ffffffff821c0484) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd802e5a3300) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802e5a3300) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802e5a3300) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd802e5a3300) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd8037f98020,2,fffffd803f7c6ae0,ffff8000ffff4010,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803eac4100,0,4,fffffd803f7c6ae0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000148da878) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8037f98430,fffffd8037f98020,ffff8000148da978) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff4010,b,c00265c7a0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000148daaf0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c000028000,145,100,3d) at Xsyscall+0x128 end of kernel end trace frame: 0xc0030857e8, 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(ffffffff821e364f,ffffffff821f6eae,149,ffffffff821c0484) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd802e5a3300) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd802e5a3300) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd802e5a3300) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd802e5a3300) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd8037f98020,2,fffffd803f7c6ae0,ffff8000ffff4010,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803eac4100,0,4,fffffd803f7c6ae0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000148da878) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8037f98430,fffffd8037f98020,ffff8000148da978) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff4010,b,c00265c7a0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000148daaf0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,145,c000028000,145,100,3d) at Xsyscall+0x128 end of kernel end trace frame: 0xc0030857e8, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000148da350 rbx 0xffff8000148da400 rdx 0x2 rcx 0 rax 0 r8 0xffff8000148da310 r9 0x1 r10 0 r11 0xa73f3a2a5d0abc14 r12 0x3000000008 r13 0xffff8000148da360 r14 0x100 r15 0x1 rip 0xffffffff81606ee8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000148da340 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=266720 stat=onproc flags process=2 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff4c68,0xffff8000ffff53e0 process=0xffff8000148a26d8 user=0xffff8000148d5000, vmspace=0xfffffd803f014660 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 5859 376084 1 0 3 0x3000 suspend syz-executor.1 5859 60194 1 0 2 0x4081000 syz-executor.1 82758 254548 0 0 3 0x14200 acct acct 66386 32047 0 0 3 0x14200 bored sosplice *79876 266720 98113 0 7 0x2 syz-fuzzer 79876 300732 98113 0 2 0x4000482 syz-fuzzer 79876 291934 98113 0 3 0x4000082 thrsleep syz-fuzzer 79876 88531 98113 0 3 0x4000082 thrsleep syz-fuzzer 79876 231436 98113 0 3 0x4000082 thrsleep syz-fuzzer 79876 462669 98113 0 3 0x4000082 kqread syz-fuzzer 79876 483658 98113 0 3 0x4000082 thrsleep syz-fuzzer 79876 461332 98113 0 3 0x4000082 thrsleep syz-fuzzer 98113 121265 63113 0 3 0x10008a pause ksh 63113 259468 83960 0 3 0x92 select sshd 57227 6195 1 0 3 0x100083 ttyin getty 83960 309897 1 0 3 0x80 select sshd 38998 221577 92316 73 2 0x100010 syslogd 92316 439090 1 0 3 0x100082 netio syslogd 94518 144357 1 77 3 0x100090 poll dhclient 81312 36668 1 0 3 0x80 poll dhclient 48952 319379 0 0 2 0x14200 zerothread 67735 393611 0 0 3 0x14200 aiodoned aiodoned 67482 187155 0 0 3 0x14200 syncer update 29557 63311 0 0 3 0x14200 cleaner cleaner 61553 359063 0 0 3 0x14200 reaper reaper 18115 34480 0 0 3 0x14200 pgdaemon pagedaemon 12745 405184 0 0 3 0x14200 bored crynlk 20733 390277 0 0 3 0x14200 bored crypto 8844 520999 0 0 3 0x40014200 acpi0 acpi0 717 59551 0 0 3 0x14200 bored softnet 33885 331737 0 0 3 0x14200 bored systqmp 67817 268612 0 0 3 0x14200 bored systq 20362 125794 0 0 3 0x40014200 bored softclock 75223 232023 0 0 3 0x40014200 idle0 59731 398456 0 0 3 0x14200 bored smr 1 88837 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 9540 6360K 6923K 78643K 16218 0 0 pcb 13 8K 9K 78643K 604 0 0 rtable 81 7K 8K 78643K 1913 0 0 ifaddr 62 14K 16K 78643K 469 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 170 0 0 iov 0 0K 28K 78643K 706 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1212 76K 77K 78643K 5399 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 60 0 0 VM map 2 0K 0K 78643K 22 0 0 sem 12 0K 1K 78643K 527 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 3 5K 25K 78643K 3189 0 0 sigio 0 0K 0K 78643K 37 0 0 proc 50 38K 55K 78643K 1264 0 0 subproc 16 1K 2K 78643K 323 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 176 0 0 in_multi 12 0K 2K 78643K 344 0 0 ether_multi 1 0K 0K 78643K 15 0 0 mrt 1 0K 0K 78643K 22 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 108 477K 477K 78643K 108 0 0 exec 0 0K 1K 78643K 734 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 99 13K 39K 78643K 8821 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 623 0 0 NDP 15 0K 1K 78643K 157 0 0 temp 174 3538K 4179K 78643K 147678 0 0 kqueue 0 0K 0K 78643K 24 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 65 0 62 1 0 1 1 0 8 0 rtpcb 80 609 0 607 1 0 1 1 0 8 0 rtentry 112 336 0 310 2 0 2 2 0 8 0 unpcb 120 1340 0 1328 1 0 1 1 0 8 0 syncache 264 23 0 23 8 8 0 1 0 8 0 tcpqe 32 5371 0 5371 3 3 0 2 0 8 0 tcpcb 544 942 0 938 5 4 1 3 0 8 0 ipq 40 13 0 13 7 7 0 1 0 8 0 ipqe 40 245 0 245 7 7 0 1 0 8 0 inpcb 280 2977 0 2970 17 16 1 4 0 8 0 rttmr 72 9 0 8 2 1 1 1 0 8 0 nd6 48 50 0 50 1 1 0 1 0 8 0 pkpcb 40 12 0 12 4 4 0 1 0 8 0 swfcl 56 1 0 0 1 0 1 1 0 8 0 ppxss 1128 46 0 46 13 13 0 1 0 8 0 art_heap8 4096 3 0 2 3 2 1 3 0 8 0 art_heap4 256 1498 0 1345 28 15 13 17 0 8 0 art_table 32 1501 0 1347 4 2 2 3 0 8 0 art_node 16 332 0 308 1 0 1 1 0 8 0 sysvmsgpl 40 28 0 19 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 525 0 515 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 7907 0 6511 46 0 46 46 0 8 0 ffsino 240 7907 0 6511 83 0 83 83 0 8 0 nchpl 144 13006 0 11410 61 0 61 61 0 8 0 uvmvnodes 72 7480 0 0 136 0 136 136 0 8 0 vnodes 208 7480 0 0 394 0 394 394 0 8 0 namei 1024 55582 0 55582 8 7 1 1 0 8 1 vmpool 520 20 0 20 6 6 0 1 0 8 0 scsiplug 64 2 0 2 2 2 0 1 0 8 0 scxspl 192 48088 0 48088 23 22 1 7 0 8 1 plimitpl 152 292 0 286 1 0 1 1 0 8 0 sigapl 432 3309 0 3298 2 0 2 2 0 8 0 futexpl 56 81017 0 81017 4 4 0 1 0 8 0 knotepl 112 861 0 840 2 1 1 2 0 8 0 kqueuepl 104 871 0 869 1 0 1 1 0 8 0 pipepl 112 1974 0 1961 13 12 1 2 0 8 0 fdescpl 424 3310 0 3298 2 0 2 2 0 8 0 filepl 120 37320 0 37239 20 16 4 6 0 8 0 lockfpl 104 1450 0 1449 1 0 1 1 0 8 0 lockfspl 48 471 0 470 1 0 1 1 0 8 0 sessionpl 112 34 0 25 1 0 1 1 0 8 0 pgrppl 48 53 0 44 1 0 1 1 0 8 0 ucredpl 96 17910 0 17899 1 0 1 1 0 8 0 zombiepl 144 3303 0 3301 3 2 1 1 0 8 0 processpl 864 3330 0 3301 4 0 4 4 0 8 0 procpl 632 7249 0 7212 5 1 4 5 0 8 0 sosppl 128 32 0 32 11 11 0 1 0 8 0 sockpl 384 4976 0 4955 23 20 3 7 0 8 0 mcl64k 65536 753 0 753 69 69 0 33 0 8 0 mcl16k 16384 31 0 31 11 11 0 1 0 8 0 mcl12k 12288 79 0 79 7 6 1 1 0 8 1 mcl9k 9216 48 0 48 10 10 0 1 0 8 0 mcl8k 8192 111 0 111 7 7 0 1 0 8 0 mcl4k 4096 279 0 279 6 6 0 1 0 8 0 mcl2k2 2112 14 0 14 8 8 0 1 0 8 0 mcl2k 2048 61557 0 61515 28 21 7 22 0 8 0 mtagpl 80 98 0 98 5 5 0 1 0 8 0 mbufpl 256 124130 0 124070 92 82 10 23 0 8 0 bufpl 256 21682 0 14202 469 1 468 468 0 8 0 anonpl 16 434841 0 414987 192 94 98 98 0 62 15 amapchunkpl 152 19596 0 19486 80 65 15 18 0 158 9 amappl16 192 20123 0 18973 155 97 58 63 0 8 0 amappl15 184 94 0 93 1 0 1 1 0 8 0 amappl14 176 930 0 926 2 1 1 1 0 8 0 amappl13 168 105 0 105 2 2 0 1 0 8 0 amappl12 160 657 0 656 2 1 1 1 0 8 0 amappl11 152 296 0 285 1 0 1 1 0 8 0 amappl10 144 363 0 360 1 0 1 1 0 8 0 amappl9 136 1436 0 1431 1 0 1 1 0 8 0 amappl8 128 991 0 956 2 0 2 2 0 8 0 amappl7 120 442 0 435 1 0 1 1 0 8 0 amappl6 112 303 0 294 1 0 1 1 0 8 0 amappl5 104 944 0 933 1 0 1 1 0 8 0 amappl4 96 3074 0 3045 1 0 1 1 0 8 0 amappl3 88 1478 0 1471 1 0 1 1 0 8 0 amappl2 80 24789 0 24726 4 2 2 3 0 8 0 amappl1 72 69894 0 69509 29 20 9 20 0 8 0 amappl 80 7781 0 7746 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 3 0 3 3 0 8 0 uaddrrnd 24 3330 0 3298 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3330 0 3298 1 0 1 1 0 8 0 vmmpekpl 168 25606 0 25580 2 0 2 2 0 8 0 vmmpepl 168 409145 0 407082 305 204 101 153 0 357 1 vmsppl 272 3309 0 3298 6 5 1 2 0 8 0 pdppl 4096 6666 0 6636 7 2 5 6 0 8 0 pvpl 32 1326855 0 1304060 517 223 294 310 0 265 99 pmappl 200 3329 0 3318 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 827 0 234 19 0 19 19 0 8 0