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 *340884 44437 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(ffffffff821e5950,ffffffff821f74f7,149,ffffffff821c0ac2) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8028581100) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8028581100) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8028581100) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8028581100) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802e540350,2,fffffd803f7c6ae0,ffff8000ffff2780,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803663a1f0,0,4,fffffd803f7c6ae0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800017963e78) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd80393b20e0,fffffd802e540350,ffff800017963f78) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff2780,b,c00276d290,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000179640f0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c00002a000,145,38,200) at Xsyscall+0x128 end of kernel end trace frame: 0xc00227d658, 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(ffffffff821e5950,ffffffff821f74f7,149,ffffffff821c0ac2) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8028581100) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8028581100) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8028581100) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8028581100) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802e540350,2,fffffd803f7c6ae0,ffff8000ffff2780,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803663a1f0,0,4,fffffd803f7c6ae0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800017963e78) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd80393b20e0,fffffd802e540350,ffff800017963f78) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff2780,b,c00276d290,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000179640f0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,145,c00002a000,145,38,200) at Xsyscall+0x128 end of kernel end trace frame: 0xc00227d658, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800017963950 rbx 0xffff800017963a00 rdx 0x2 rcx 0 rax 0 r8 0xffff800017963910 r9 0x1 r10 0 r11 0xaff363b12f66bc57 r12 0x3000000008 r13 0xffff800017963960 r14 0x100 r15 0x1 rip 0xffffffff8134ed68 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800017963940 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=340884 stat=onproc flags process=2 proc=4000000 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2018,0xffffffff8259b260 process=0xffff8000148a26d8 user=0xffff80001795f000, vmspace=0xfffffd803f014dd0 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 49562 187490 0 0 3 0x14200 acct acct 81995 309921 0 0 3 0x14200 bored sosplice 44437 74184 20149 0 3 0x82 thrsleep syz-fuzzer 44437 370282 20149 0 3 0x4000082 nanosleep syz-fuzzer 44437 267598 20149 0 3 0x4000082 thrsleep syz-fuzzer 44437 232944 20149 0 3 0x4000082 thrsleep syz-fuzzer 44437 197091 20149 0 3 0x4000082 thrsleep syz-fuzzer 44437 497491 20149 0 3 0x4000082 kqread syz-fuzzer 44437 105009 20149 0 3 0x4000082 thrsleep syz-fuzzer *44437 340884 20149 0 7 0x4000002 syz-fuzzer 20149 439366 31388 0 3 0x10008a pause ksh 31388 466903 93522 0 3 0x92 select sshd 86544 334253 1 0 3 0x100083 ttyin getty 93522 241873 1 0 3 0x80 select sshd 15424 411435 83125 73 3 0x100010 biowait syslogd 83125 64263 1 0 3 0x100082 netio syslogd 59830 477230 1 77 3 0x100090 poll dhclient 87892 476716 1 0 3 0x80 poll dhclient 46293 480582 0 0 3 0x14200 pgzero zerothread 64974 185847 0 0 3 0x14200 aiodoned aiodoned 72595 406255 0 0 3 0x14200 syncer update 33827 181379 0 0 3 0x14200 cleaner cleaner 69080 195254 0 0 3 0x14200 reaper reaper 78067 165684 0 0 3 0x14200 pgdaemon pagedaemon 53751 394248 0 0 3 0x14200 bored crynlk 2200 39482 0 0 3 0x14200 bored crypto 44944 423405 0 0 3 0x40014200 acpi0 acpi0 660 101193 0 0 3 0x14200 bored softnet 93089 510683 0 0 3 0x14200 bored systqmp 21768 414919 0 0 3 0x14200 bored systq 46017 153183 0 0 3 0x40014200 bored softclock 61435 211013 0 0 3 0x40014200 idle0 35963 41767 0 0 3 0x14200 bored smr 1 292522 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 6997K 7645K 78643K 14108 0 0 pcb 13 12K 14K 78643K 307 0 0 rtable 77 7K 8K 78643K 1218 0 0 ifaddr 62 14K 16K 78643K 390 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 86 0 0 iov 0 0K 32K 78643K 365 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1213 76K 77K 78643K 2533 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 24 0 0 VM map 2 0K 0K 78643K 16 0 0 sem 12 0K 0K 78643K 335 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 2 1K 25K 78643K 1651 0 0 sigio 0 0K 0K 78643K 18 0 0 proc 50 38K 55K 78643K 789 0 0 subproc 0 0K 2K 78643K 153 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 111 0 0 in_multi 11 0K 2K 78643K 215 0 0 ether_multi 1 0K 0K 78643K 18 0 0 mrt 0 0K 0K 78643K 7 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 120 530K 530K 78643K 120 0 0 exec 0 0K 1K 78643K 452 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 83 4K 25K 78643K 4895 0 0 UVM aobj 118 3K 3K 78643K 120 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 268 0 0 NDP 15 0K 0K 78643K 119 0 0 temp 157 3541K 4183K 78643K 46775 0 0 kqueue 0 0K 0K 78643K 14 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 40 0 38 1 0 1 1 0 8 0 rtpcb 80 130 0 128 1 0 1 1 0 8 0 rtentry 112 195 0 171 2 0 2 2 0 8 0 unpcb 120 919 0 910 2 1 1 2 0 8 0 syncache 264 12 0 12 4 4 0 1 0 8 0 sackhl 24 2 0 2 2 2 0 1 0 8 0 tcpqe 32 562 0 562 3 3 0 1 0 8 0 tcpcb 544 3570 0 3566 30 29 1 15 0 8 0 ipq 40 12 0 12 5 5 0 1 0 8 0 ipqe 40 118 0 118 5 5 0 1 0 8 0 inpcb 280 4816 0 4809 29 28 1 13 0 8 0 rttmr 72 2 0 2 2 2 0 1 0 8 0 nd6 48 25 0 25 3 3 0 1 0 8 0 pkpcb 40 4 0 4 2 2 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 43 0 43 6 6 0 1 0 8 0 art_heap8 4096 3 0 2 3 2 1 3 0 8 0 art_heap4 256 879 0 757 23 14 9 14 0 8 0 art_table 32 882 0 759 2 0 2 2 0 8 0 art_node 16 193 0 171 1 0 1 1 0 8 0 sysvmsgpl 40 20 0 7 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 333 0 323 1 0 1 1 0 8 0 shmpl 112 118 0 2 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3919 0 2526 46 0 46 46 0 8 0 ffsino 240 3919 0 2526 83 0 83 83 0 8 0 nchpl 144 6494 0 4898 60 0 60 60 0 8 0 uvmvnodes 72 4893 0 0 89 0 89 89 0 8 0 vnodes 208 4893 0 0 258 0 258 258 0 8 0 namei 1024 20328 0 20328 3 2 1 1 0 8 1 vmpool 520 14 0 14 6 6 0 1 0 8 0 scxspl 192 22864 0 22863 16 15 1 7 0 8 0 plimitpl 152 171 0 166 1 0 1 1 0 8 0 sigapl 432 1801 0 1791 2 0 2 2 0 8 0 futexpl 56 48405 0 48405 3 3 0 1 0 8 0 knotepl 112 410 0 389 1 0 1 1 0 8 0 kqueuepl 104 692 0 690 7 6 1 4 0 8 0 pipepl 112 2060 0 2049 3 2 1 2 0 8 0 fdescpl 424 1802 0 1791 2 0 2 2 0 8 0 filepl 120 16018 0 15962 29 26 3 12 0 8 0 lockfpl 104 588 0 587 1 0 1 1 0 8 0 lockfspl 48 202 0 201 1 0 1 1 0 8 0 sessionpl 112 24 0 16 1 0 1 1 0 8 0 pgrppl 48 74 0 66 1 0 1 1 0 8 0 ucredpl 96 1510 0 1503 1 0 1 1 0 8 0 zombiepl 144 1791 0 1791 1 0 1 1 0 8 1 processpl 864 1818 0 1791 4 0 4 4 0 8 0 procpl 632 3832 0 3798 4 0 4 4 0 8 0 sosppl 128 31 0 31 6 6 0 1 0 8 0 sockpl 384 5874 0 5856 47 44 3 22 0 8 0 mcl64k 65536 1168 0 1168 100 100 0 64 0 8 0 mcl16k 16384 19 0 19 7 7 0 1 0 8 0 mcl12k 12288 61 0 61 6 6 0 1 0 8 0 mcl9k 9216 30 0 30 9 9 0 1 0 8 0 mcl8k 8192 68 0 68 3 3 0 1 0 8 0 mcl4k 4096 161 0 161 4 4 0 1 0 8 0 mcl2k2 2112 20 0 20 7 7 0 1 0 8 0 mcl2k 2048 69264 0 69216 20 13 7 17 0 8 0 mtagpl 80 63 0 63 2 2 0 1 0 8 0 mbufpl 256 125353 0 125290 80 71 9 37 0 8 0 bufpl 256 16549 0 10239 395 0 395 395 0 8 0 anonpl 16 245951 0 229811 136 52 84 89 0 62 13 amapchunkpl 152 8926 0 8824 29 14 15 15 0 158 8 amappl16 192 11800 0 10872 124 75 49 63 0 8 1 amappl15 184 490 0 489 1 0 1 1 0 8 0 amappl14 176 81 0 79 1 0 1 1 0 8 0 amappl13 168 420 0 420 1 1 0 1 0 8 0 amappl12 160 138 0 135 1 0 1 1 0 8 0 amappl11 152 259 0 248 1 0 1 1 0 8 0 amappl10 144 17 0 16 1 0 1 1 0 8 0 amappl9 136 844 0 840 1 0 1 1 0 8 0 amappl8 128 751 0 720 2 0 2 2 0 8 0 amappl7 120 68 0 60 1 0 1 1 0 8 0 amappl6 112 273 0 264 1 0 1 1 0 8 0 amappl5 104 1035 0 1025 1 0 1 1 0 8 0 amappl4 96 2182 0 2157 1 0 1 1 0 8 0 amappl3 88 185 0 180 1 0 1 1 0 8 0 amappl2 80 13766 0 13712 3 1 2 3 0 8 0 amappl1 72 41481 0 41104 28 19 9 20 0 8 1 amappl 80 4185 0 4155 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 119 0 2 2 0 2 2 0 8 0 uaddrrnd 24 1816 0 1791 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1816 0 1791 1 0 1 1 0 8 0 vmmpekpl 168 16720 0 16700 2 0 2 2 0 8 0 vmmpepl 168 223944 0 222208 225 119 106 150 0 357 18 vmsppl 272 1801 0 1791 3 2 1 2 0 8 0 pdppl 4096 3638 0 3610 6 1 5 6 0 8 0 pvpl 32 643645 0 624683 368 81 287 302 0 265 121 pmappl 200 1815 0 1805 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 765 0 250 18 2 16 18 0 8 0