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 *159119 77397 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(ffffffff821e08c6,ffffffff821f3836,149,ffffffff821bcb45) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8025dbd000) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8025dbd000) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8025dbd000) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8025dbd000) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802e764de8,2,fffffd803f7c68a0,ffff8000149149f8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd8036aae780,0,4,fffffd803f7c68a0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000149106f8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8037829ea8,fffffd802e764de8,ffff8000149107f8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000149149f8,b,c001602350,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014910970) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c000028000,145,38,200) at Xsyscall+0x128 end of kernel end trace frame: 0xc002309678, 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(ffffffff821e08c6,ffffffff821f3836,149,ffffffff821bcb45) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8025dbd000) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8025dbd000) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8025dbd000) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8025dbd000) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802e764de8,2,fffffd803f7c68a0,ffff8000149149f8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd8036aae780,0,4,fffffd803f7c68a0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000149106f8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8037829ea8,fffffd802e764de8,ffff8000149107f8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000149149f8,b,c001602350,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800014910970) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c000028000,145,38,200) at Xsyscall+0x128 end of kernel end trace frame: 0xc002309678, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149101d0 rbx 0xffff800014910280 rdx 0x2 rcx 0 rax 0 r8 0xffff800014910190 r9 0x1 r10 0 r11 0xf92a0816611e815 r12 0x3000000008 r13 0xffff8000149101e0 r14 0x100 r15 0x1 rip 0xffffffff814de0a8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149101c0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=159119 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800014914c70,0xffffffff8258b9c8 process=0xffff8000148a2a38 user=0xffff80001490b000, vmspace=0xfffffd803f014880 estcpu=0, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 45582 3162 1 0 3 0x100083 ttyin getty 27360 45804 0 0 3 0x14200 bored sosplice 77397 194845 67127 0 3 0x82 thrsleep syz-fuzzer 77397 3909 67127 0 3 0x4000082 nanosleep syz-fuzzer 77397 27720 67127 0 3 0x4000082 thrsleep syz-fuzzer 77397 90914 67127 0 3 0x4000082 thrsleep syz-fuzzer 77397 211343 67127 0 3 0x4000082 thrsleep syz-fuzzer 77397 130124 67127 0 3 0x4000082 thrsleep syz-fuzzer 77397 299343 67127 0 3 0x4000082 thrsleep syz-fuzzer *77397 159119 67127 0 7 0x4000002 syz-fuzzer 67127 172927 81375 0 3 0x10008a pause ksh 81375 382423 48431 0 3 0x92 select sshd 48431 99046 1 0 3 0x80 select sshd 65385 361357 18146 73 3 0x100010 ffs_fsync syslogd 18146 285870 1 0 3 0x100082 netio syslogd 7127 422487 1 77 3 0x100090 poll dhclient 33647 47484 1 0 3 0x80 poll dhclient 16144 457604 0 0 2 0x14200 zerothread 83497 449162 0 0 3 0x14200 aiodoned aiodoned 89659 16094 0 0 3 0x14200 syncer update 9008 450284 0 0 3 0x14200 cleaner cleaner 17664 359496 0 0 3 0x14200 reaper reaper 51250 101585 0 0 3 0x14200 pgdaemon pagedaemon 58814 490515 0 0 3 0x14200 bored crynlk 58549 227097 0 0 3 0x14200 bored crypto 58068 189482 0 0 3 0x40014200 acpi0 acpi0 43798 512354 0 0 3 0x14200 bored softnet 66557 495767 0 0 3 0x14200 bored systqmp 8725 444898 0 0 3 0x14200 bored systq 53416 60157 0 0 3 0x40014200 bored softclock 31743 385060 0 0 3 0x40014200 idle0 48658 453423 0 0 3 0x14200 bored smr 1 295055 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 9580 6374K 9015K 78643K 20440 0 0 pcb 13 10K 12K 78643K 795 0 0 rtable 89 11K 12K 78643K 2290 0 0 ifaddr 73 17K 19K 78643K 709 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 303 0 0 iov 0 0K 32K 78643K 609 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1217 76K 78K 78643K 5391 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 255 0 0 VM map 2 0K 0K 78643K 10 0 0 sem 12 1K 1K 78643K 1527 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 2 1K 25K 78643K 6330 0 0 sigio 0 0K 0K 78643K 66 0 0 proc 50 38K 63K 78643K 1910 0 0 subproc 0 0K 2K 78643K 467 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 724 0 0 in_multi 22 1K 2K 78643K 502 0 0 ether_multi 1 0K 0K 78643K 39 0 0 mrt 0 0K 0K 78643K 30 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 180 795K 795K 78643K 180 0 0 exec 0 0K 1K 78643K 1058 0 0 pfkey data 0 0K 4K 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 96 5K 31K 78643K 15914 0 0 UVM aobj 130 4K 4K 78643K 152 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 738 0 0 NDP 18 0K 0K 78643K 227 0 0 temp 179 3534K 4176K 78643K 101614 0 0 kqueue 0 0K 0K 78643K 43 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 70 0 67 1 0 1 1 0 8 0 rtpcb 80 861 0 859 1 0 1 1 0 8 0 rtentry 112 332 0 301 2 0 2 2 0 8 0 unpcb 120 8669 0 8649 7 6 1 2 0 8 0 syncache 264 16 0 16 6 6 0 1 0 8 0 sackhl 24 4 0 4 3 3 0 1 0 8 0 tcpqe 32 5320 0 5320 3 3 0 1 0 8 0 tcpcb 544 1511 0 1507 2 1 1 2 0 8 0 ipq 40 4 0 4 2 2 0 1 0 8 0 ipqe 40 8 0 8 2 2 0 1 0 8 0 inpcb 280 6662 0 6655 28 27 1 13 0 8 0 rttmr 72 5 0 5 4 4 0 1 0 8 0 nd6 48 54 0 52 1 0 1 1 0 8 0 pkpcb 40 22 0 22 9 9 0 1 0 8 0 ppxss 1128 94 0 94 25 25 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1390 0 1220 18 4 14 15 0 8 3 art_table 32 1391 0 1220 2 0 2 2 0 8 0 art_node 16 325 0 297 1 0 1 1 0 8 0 sysvmsgpl 40 38 0 31 1 0 1 1 0 8 0 semapl 112 1525 0 1515 1 0 1 1 0 8 0 shmpl 112 150 0 22 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 10842 0 9450 46 0 46 46 0 8 0 ffsino 240 10842 0 9450 83 0 83 83 0 8 0 nchpl 144 19824 0 18197 63 2 61 61 0 8 0 uvmvnodes 72 7088 0 0 129 0 129 129 0 8 0 vnodes 208 7088 0 0 374 0 374 374 0 8 0 namei 1024 73917 0 73917 7 6 1 1 0 8 1 vmpool 520 8 0 8 3 3 0 1 0 8 0 scsiplug 64 11 0 11 9 9 0 1 0 8 0 scxspl 192 56076 0 56075 20 19 1 7 0 8 0 plimitpl 152 534 0 529 1 0 1 1 0 8 0 sigapl 432 6428 0 6418 2 0 2 2 0 8 0 futexpl 56 163240 0 163240 6 6 0 1 0 8 0 knotepl 112 1600 0 1579 6 5 1 3 0 8 0 kqueuepl 104 2308 0 2306 1 0 1 1 0 8 0 pipepl 112 3314 0 3303 12 10 2 2 0 8 0 fdescpl 424 6429 0 6418 2 0 2 2 0 8 0 filepl 120 58533 0 58477 33 30 3 11 0 8 0 lockfpl 104 2159 0 2158 1 0 1 1 0 8 0 lockfspl 48 691 0 690 1 0 1 1 0 8 0 sessionpl 112 44 0 36 1 0 1 1 0 8 0 pgrppl 48 112 0 104 1 0 1 1 0 8 0 ucredpl 96 7616 0 7609 1 0 1 1 0 8 0 zombiepl 144 6423 0 6423 3 2 1 1 0 8 1 processpl 864 6449 0 6423 4 0 4 4 0 8 0 procpl 632 14029 0 13996 4 0 4 4 0 8 0 sosppl 128 92 0 92 17 17 0 1 0 8 0 sockpl 384 16309 0 16280 45 41 4 22 0 8 0 mcl64k 65536 952 0 952 77 77 0 33 0 8 0 mcl16k 16384 56 0 56 22 22 0 1 0 8 0 mcl12k 12288 134 0 134 15 15 0 1 0 8 0 mcl9k 9216 71 0 71 16 16 0 1 0 8 0 mcl8k 8192 256 0 255 11 10 1 1 0 8 0 mcl4k 4096 879 0 879 5 5 0 1 0 8 0 mcl2k2 2112 67 0 67 25 25 0 1 0 8 0 mcl2k 2048 69570 0 69527 29 23 6 21 0 8 0 mtagpl 80 987 0 987 10 10 0 9 0 8 0 mbufpl 256 164350 0 164281 101 88 13 62 0 8 0 bufpl 256 21954 0 14409 472 0 472 472 0 8 0 anonpl 16 649509 0 635027 239 162 77 79 0 62 12 amapchunkpl 152 29007 0 28908 79 64 15 15 0 158 10 amappl16 192 34210 0 33378 253 209 44 57 0 8 1 amappl15 184 448 0 448 3 3 0 1 0 8 0 amappl14 176 2009 0 2007 2 1 1 1 0 8 0 amappl13 168 289 0 289 2 1 1 1 0 8 1 amappl12 160 1241 0 1240 2 1 1 1 0 8 0 amappl11 152 1693 0 1682 1 0 1 1 0 8 0 amappl10 144 30 0 29 1 0 1 1 0 8 0 amappl9 136 1428 0 1424 1 0 1 1 0 8 0 amappl8 128 1011 0 977 2 0 2 2 0 8 0 amappl7 120 168 0 161 1 0 1 1 0 8 0 amappl6 112 1632 0 1619 1 0 1 1 0 8 0 amappl5 104 1601 0 1590 1 0 1 1 0 8 0 amappl4 96 5825 0 5796 1 0 1 1 0 8 0 amappl3 88 2856 0 2850 1 0 1 1 0 8 0 amappl2 80 49689 0 49638 4 2 2 3 0 8 0 amappl1 72 125325 0 124945 28 19 9 20 0 8 0 amappl 80 14635 0 14606 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 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 151 0 22 3 0 3 3 0 8 0 uaddrrnd 24 6437 0 6418 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 6437 0 6418 1 0 1 1 0 8 0 vmmpekpl 168 41871 0 41849 2 0 2 2 0 8 0 vmmpepl 168 762016 0 760368 394 296 98 115 0 357 9 vmsppl 272 6428 0 6418 2 1 1 2 0 8 0 pdppl 4096 12880 0 12852 6 1 5 6 0 8 0 pvpl 32 1791626 0 1774312 559 285 274 289 0 265 122 pmappl 200 6436 0 6426 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 841 0 240 18 0 18 18 0 8 0