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 *346055 35864 0 0x2 0 0 syz-executor.0 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(ffffffff821e4bdd,ffffffff821f7772,149,ffffffff821c0c5b) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8004b7f500) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8004b7f500) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8004b7f500) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8004b7f500) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803dba9340,2,fffffd803f7c6b40,ffff8000ffff5648,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd802ea66d28,0,4,fffffd803f7c6b40) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff80001795bc78) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8038d28ec0,fffffd803dba9340,ffff80001795bd78) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff5648,ffffff9c,7f7ffffd31f0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff80001795bef0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,89,7f7ffffd2d30,89,9c0266ff6c0,7f7ffffd31f0) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd31e0, 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(ffffffff821e4bdd,ffffffff821f7772,149,ffffffff821c0c5b) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8004b7f500) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8004b7f500) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8004b7f500) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8004b7f500) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd803dba9340,2,fffffd803f7c6b40,ffff8000ffff5648,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd802ea66d28,0,4,fffffd803f7c6b40) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff80001795bc78) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd8038d28ec0,fffffd803dba9340,ffff80001795bd78) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff5648,ffffff9c,7f7ffffd31f0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff80001795bef0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,89,7f7ffffd2d30,89,9c0266ff6c0,7f7ffffd31f0) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd31e0, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001795b750 rbx 0xffff80001795b800 rdx 0x2 rcx 0 rax 0 r8 0xffff80001795b710 r9 0x1 r10 0 r11 0x9977b2c05f5c9e54 r12 0x3000000008 r13 0xffff80001795b760 r14 0x100 r15 0x1 rip 0xffffffff81548b68 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001795b740 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=346055 stat=onproc flags process=2 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001488d168,0xffff80001488db58 process=0xffff8000ffff70f0 user=0xffff800017956000, vmspace=0xfffffd803f014990 estcpu=1, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 63087 522531 23710 0 3 0x2 biowait syz-executor.1 *35864 346055 23710 0 7 0x2 syz-executor.0 30739 398400 1 0 3 0x100083 ttyin getty 8560 76348 0 0 3 0x14200 bored sosplice 23710 404274 33152 0 3 0x82 thrsleep syz-fuzzer 23710 80013 33152 0 3 0x4000082 nanosleep syz-fuzzer 23710 405519 33152 0 3 0x4000082 kqread syz-fuzzer 23710 22233 33152 0 3 0x4000082 thrsleep syz-fuzzer 23710 464196 33152 0 3 0x4000082 thrsleep syz-fuzzer 23710 179662 33152 0 3 0x4000082 thrsleep syz-fuzzer 23710 189602 33152 0 3 0x4000082 thrsleep syz-fuzzer 23710 392096 33152 0 3 0x4000082 thrsleep syz-fuzzer 33152 14793 72827 0 3 0x10008a pause ksh 72827 523951 99755 0 3 0x92 select sshd 99755 20021 1 0 3 0x80 select sshd 93655 11942 72750 73 3 0x100010 ffs_fsync syslogd 72750 378477 1 0 3 0x100082 netio syslogd 25837 323532 1 77 3 0x100090 poll dhclient 96944 151716 1 0 3 0x80 poll dhclient 66112 521377 0 0 2 0x14200 zerothread 88874 309209 0 0 3 0x14200 aiodoned aiodoned 38712 140918 0 0 3 0x14200 syncer update 34663 277565 0 0 3 0x14200 cleaner cleaner 33762 167036 0 0 3 0x14200 reaper reaper 73014 38880 0 0 3 0x14200 pgdaemon pagedaemon 15856 201169 0 0 3 0x14200 bored crynlk 5000 29098 0 0 3 0x14200 bored crypto 25189 182762 0 0 3 0x40014200 acpi0 acpi0 16291 276552 0 0 3 0x14200 bored softnet 23732 180687 0 0 3 0x14200 bored systqmp 34524 109559 0 0 3 0x14200 bored systq 1349 64054 0 0 3 0x40014200 bored softclock 54803 516374 0 0 3 0x40014200 idle0 75800 113256 0 0 3 0x14200 bored smr 1 60440 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 9565 7014K 7651K 78643K 17085 0 0 pcb 13 12K 14K 78643K 559 0 0 rtable 115 4K 5K 78643K 2205 0 0 ifaddr 80 19K 20K 78643K 650 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 145 0 0 iov 0 0K 20K 78643K 671 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1211 76K 77K 78643K 3922 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 33 0 0 VM map 2 0K 0K 78643K 26 0 0 sem 12 0K 0K 78643K 764 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 4 9K 25K 78643K 3205 0 0 sigio 0 0K 0K 78643K 46 0 0 proc 49 38K 62K 78643K 1658 0 0 subproc 32 2K 2K 78643K 463 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 124 0 0 in_multi 30 2K 2K 78643K 370 0 0 ether_multi 1 0K 0K 78643K 19 0 0 mrt 0 0K 0K 78643K 31 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 814 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 102 21K 40K 78643K 11731 0 0 UVM aobj 116 4K 4K 78643K 133 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 656 0 0 NDP 21 0K 0K 78643K 211 0 0 temp 219 3544K 4184K 78643K 109810 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 77 0 71 1 0 1 1 0 8 0 rtpcb 80 325 0 323 1 0 1 1 0 8 0 rtentry 112 370 0 327 2 0 2 2 0 8 0 unpcb 120 8090 0 8079 12 11 1 2 0 8 0 syncache 264 23 0 23 12 12 0 1 0 8 0 tcpqe 32 7341 0 7341 5 5 0 2 0 8 0 tcpcb 544 1348 0 1344 27 26 1 15 0 8 0 ipq 40 21 0 21 11 11 0 1 0 8 0 ipqe 40 49 0 49 11 11 0 1 0 8 0 inpcb 280 3569 0 3561 45 44 1 13 0 8 0 rttmr 72 10 0 9 5 4 1 1 0 8 0 ip6q 72 1 0 1 1 1 0 1 0 8 0 ip6af 40 2 0 2 1 1 0 1 0 8 0 nd6 48 53 0 50 4 3 1 1 0 8 0 pkpcb 40 19 0 19 7 7 0 1 0 8 0 swfcl 56 6 0 0 1 0 1 1 0 8 0 ppxss 1128 67 0 67 23 23 0 1 0 8 0 art_heap8 4096 13 0 11 7 5 2 3 0 8 0 art_heap4 256 1738 0 1491 44 28 16 17 0 8 0 art_table 32 1751 0 1502 3 0 3 3 0 8 0 art_node 16 367 0 327 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 2 1 1 0 1 0 8 0 semapl 112 762 0 752 1 0 1 1 0 8 0 shmpl 112 131 0 17 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 6274 0 4884 46 0 46 46 0 8 0 ffsino 240 6274 0 4884 83 0 83 83 0 8 0 nchpl 144 11640 0 10023 62 1 61 61 0 8 0 uvmvnodes 72 7424 0 0 135 0 135 135 0 8 0 vnodes 208 7424 0 0 391 0 391 391 0 8 0 namei 1024 37914 0 37913 8 7 1 1 0 8 0 vmpool 520 24 0 24 9 9 0 1 0 8 0 scsiplug 64 4 0 4 2 2 0 1 0 8 0 scxspl 192 51865 0 51863 33 32 1 7 0 8 0 plimitpl 152 270 0 263 1 0 1 1 0 8 0 sigapl 432 3303 0 3291 2 0 2 2 0 8 0 futexpl 56 81278 0 81278 7 7 0 1 0 8 0 knotepl 112 933 0 914 1 0 1 1 0 8 0 kqueuepl 104 1040 0 1038 7 6 1 4 0 8 0 pipepl 112 3488 0 3469 20 19 1 2 0 8 0 fdescpl 424 3304 0 3291 2 0 2 2 0 8 0 filepl 120 32795 0 32700 48 44 4 11 0 8 0 lockfpl 104 1451 0 1450 1 0 1 1 0 8 0 lockfspl 48 562 0 561 1 0 1 1 0 8 0 sessionpl 112 44 0 34 1 0 1 1 0 8 0 pgrppl 48 63 0 53 1 0 1 1 0 8 0 ucredpl 96 3339 0 3332 1 0 1 1 0 8 0 zombiepl 144 3293 0 3293 3 2 1 1 0 8 1 processpl 864 3321 0 3293 4 0 4 4 0 8 0 procpl 632 9850 0 9815 25 21 4 5 0 8 0 sosppl 128 57 0 57 16 16 0 1 0 8 0 sockpl 384 12028 0 12008 70 66 4 21 0 8 0 mcl64k 65536 1796 0 1796 142 142 0 64 0 8 0 mcl16k 16384 50 0 50 19 19 0 1 0 8 0 mcl12k 12288 88 0 88 22 22 0 1 0 8 0 mcl9k 9216 62 0 62 23 23 0 1 0 8 0 mcl8k 8192 296 0 296 9 9 0 1 0 8 0 mcl4k 4096 414 0 414 9 9 0 1 0 8 0 mcl2k2 2112 28 0 28 15 15 0 1 0 8 0 mcl2k 2048 54397 0 54351 29 22 7 22 0 8 0 mtagpl 80 141 0 141 9 9 0 1 0 8 0 mbufpl 256 117264 0 117135 129 120 9 40 0 8 0 bufpl 256 22822 0 14384 528 0 528 528 0 8 0 anonpl 16 453814 0 441552 229 153 76 82 0 62 5 amapchunkpl 152 25061 0 24956 87 71 16 16 0 158 8 amappl16 192 19719 0 18836 192 146 46 58 0 8 0 amappl15 184 1383 0 1382 4 3 1 1 0 8 0 amappl14 176 898 0 893 2 1 1 1 0 8 0 amappl13 168 295 0 295 6 6 0 1 0 8 0 amappl12 160 185 0 183 1 0 1 1 0 8 0 amappl11 152 125 0 114 1 0 1 1 0 8 0 amappl10 144 369 0 367 1 0 1 1 0 8 0 amappl9 136 1418 0 1412 1 0 1 1 0 8 0 amappl8 128 919 0 885 3 1 2 2 0 8 0 amappl7 120 504 0 497 1 0 1 1 0 8 0 amappl6 112 85 0 76 1 0 1 1 0 8 0 amappl5 104 505 0 495 1 0 1 1 0 8 0 amappl4 96 3517 0 3488 1 0 1 1 0 8 0 amappl3 88 910 0 903 1 0 1 1 0 8 0 amappl2 80 24923 0 24865 4 2 2 3 0 8 0 amappl1 72 77902 0 77520 32 22 10 20 0 8 1 amappl 80 10451 0 10416 3 1 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 132 0 17 2 0 2 2 0 8 0 uaddrrnd 24 3328 0 3291 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3328 0 3291 1 0 1 1 0 8 0 vmmpekpl 168 35513 0 35484 2 0 2 2 0 8 0 vmmpepl 168 422131 0 420311 519 399 120 130 0 357 26 vmsppl 272 3303 0 3291 15 13 2 2 0 8 1 pdppl 4096 6662 0 6630 7 1 6 6 0 8 1 pvpl 32 1305370 0 1290099 751 480 271 298 0 265 102 pmappl 200 3327 0 3315 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1061 0 403 21 1 20 20 0 8 0