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 *306380 73356 0 0x2 0 0 syz-executor.1 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(ffffffff821e4280,ffffffff821f94a6,149,ffffffff821c2688) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd803d13e400) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803d13e400) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803d13e400) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd803d13e400) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd8028d7cc50,2,fffffd803f7c6840,ffff8000ffff8c60,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80273e7970,0,4,fffffd803f7c6840) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800015944098) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802bff1a90,fffffd8028d7cc50,ffff800015944198) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff8c60,ffffff9c,7f7ffffe41b0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800015944310) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,89,7f7ffffe3cf0,89,eb98c64ac40,7f7ffffe41b0) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe41a0, 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(ffffffff821e4280,ffffffff821f94a6,149,ffffffff821c2688) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd803d13e400) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd803d13e400) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd803d13e400) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd803d13e400) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd8028d7cc50,2,fffffd803f7c6840,ffff8000ffff8c60,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80273e7970,0,4,fffffd803f7c6840) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff800015944098) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802bff1a90,fffffd8028d7cc50,ffff800015944198) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff8c60,ffffff9c,7f7ffffe41b0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff800015944310) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,89,7f7ffffe3cf0,89,eb98c64ac40,7f7ffffe41b0) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe41a0, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800015943b70 rbx 0xffff800015943c20 rdx 0x2 rcx 0 rax 0 r8 0xffff800015943b30 r9 0x1 r10 0 r11 0xf6fac48554f4686f r12 0x3000000008 r13 0xffff800015943b80 r14 0x100 r15 0x1 rip 0xffffffff82159ec8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800015943b60 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=306380 stat=onproc flags process=2 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800015953650,0xffff800015952518 process=0xffff8000148a30f8 user=0xffff80001593f000, vmspace=0xfffffd803f014770 estcpu=10, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 50461 139897 75250 0 2 0x10008a sh 75250 171170 66341 0 3 0x82 wait syz-executor.0 *73356 306380 66341 0 7 0x2 syz-executor.1 81547 7448 1 0 3 0x100083 ttyin getty 8063 212423 0 0 3 0x14200 acct acct 16273 522271 0 0 3 0x14200 bored sosplice 66341 154475 63051 0 3 0x82 thrsleep syz-fuzzer 66341 288089 63051 0 3 0x4000082 nanosleep syz-fuzzer 66341 200016 63051 0 3 0x4000082 kqread syz-fuzzer 66341 341327 63051 0 3 0x4000082 thrsleep syz-fuzzer 66341 51431 63051 0 3 0x4000082 thrsleep syz-fuzzer 66341 361932 63051 0 3 0x4000082 thrsleep syz-fuzzer 66341 419948 63051 0 3 0x4000082 thrsleep syz-fuzzer 66341 487526 63051 0 3 0x4000082 thrsleep syz-fuzzer 63051 250815 69269 0 3 0x10008a pause ksh 69269 297868 24283 0 3 0x92 select sshd 24283 233600 1 0 3 0x80 select sshd 57781 440575 97419 73 3 0x100010 biowait syslogd 97419 470347 1 0 3 0x100082 netio syslogd 59662 33037 1 77 3 0x100090 poll dhclient 22828 345070 1 0 3 0x80 poll dhclient 87844 287409 0 0 2 0x14200 zerothread 53934 401880 0 0 3 0x14200 aiodoned aiodoned 32259 412908 0 0 3 0x14200 syncer update 18489 126175 0 0 3 0x14200 cleaner cleaner 435 176946 0 0 3 0x14200 reaper reaper 71412 156212 0 0 3 0x14200 pgdaemon pagedaemon 74304 386943 0 0 3 0x14200 bored crynlk 62041 488017 0 0 3 0x14200 bored crypto 9929 242643 0 0 3 0x40014200 acpi0 acpi0 64584 408405 0 0 3 0x14200 bored softnet 1787 254370 0 0 3 0x14200 bored systqmp 86501 112445 0 0 3 0x14200 bored systq 80040 393409 0 0 3 0x40014200 bored softclock 29839 391821 0 0 3 0x40014200 idle0 72854 73302 0 0 3 0x14200 bored smr 1 409380 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 9604 6373K 7019K 78643K 18875 0 0 pcb 13 12K 14K 78643K 869 0 0 rtable 121 8K 9K 78643K 3122 0 0 ifaddr 92 20K 22K 78643K 787 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 303 0 0 iov 0 0K 32K 78643K 3019 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1219 77K 77K 78643K 4791 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 68 0 0 VM map 50 12K 12K 78643K 72 0 0 sem 12 0K 1K 78643K 1587 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 4151 0 0 sigio 0 0K 0K 78643K 60 0 0 proc 50 38K 63K 78643K 1940 0 0 subproc 32 2K 2K 78643K 531 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 321 0 0 in_multi 36 2K 2K 78643K 550 0 0 ether_multi 1 0K 0K 78643K 44 0 0 mrt 1 0K 0K 78643K 32 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 234 1033K 1033K 78643K 234 0 0 exec 0 0K 1K 78643K 1018 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 171 361K 371K 78643K 11499 0 0 UVM aobj 130 5K 5K 78643K 138 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 915 0 0 NDP 24 0K 1K 78643K 263 0 0 temp 240 3545K 3672K 78643K 165369 0 0 kqueue 0 0K 0K 78643K 39 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 126 0 120 1 0 1 1 0 8 0 rtpcb 80 528 0 526 1 0 1 1 0 8 0 rtentry 112 552 0 508 2 0 2 2 0 8 0 unpcb 120 2616 0 2607 2 1 1 2 0 8 0 syncache 264 21 0 21 8 8 0 1 0 8 0 tcpqe 32 126 0 126 7 7 0 1 0 8 0 tcpcb 544 2545 0 2541 33 32 1 15 0 8 0 ipq 40 45 0 45 13 13 0 1 0 8 0 ipqe 40 1029 0 1029 13 13 0 1 0 8 0 inpcb 280 5945 0 5938 36 35 1 13 0 8 0 rttmr 72 11 0 11 8 8 0 1 0 8 0 ip6q 72 2 0 2 1 1 0 1 0 8 0 ip6af 40 6 0 6 1 1 0 1 0 8 0 nd6 48 71 0 67 7 6 1 1 0 8 0 pkpcb 40 36 0 36 13 13 0 1 0 8 0 ppxss 1128 80 0 80 18 18 0 1 0 8 0 art_heap8 4096 3 0 2 3 2 1 3 0 8 0 art_heap4 256 2103 0 1883 48 34 14 16 0 8 0 art_table 32 2106 0 1885 2 0 2 2 0 8 0 art_node 16 551 0 511 1 0 1 1 0 8 0 sysvmsgpl 40 76 0 59 1 0 1 1 0 8 0 semupl 112 5 0 5 1 1 0 1 0 8 0 semapl 112 1585 0 1575 1 0 1 1 0 8 0 shmpl 112 136 0 8 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 8877 0 7466 46 0 46 46 0 8 0 ffsino 240 8877 0 7466 84 0 84 84 0 8 0 nchpl 144 16263 0 15739 61 41 20 60 0 8 0 uvmvnodes 72 6847 0 0 125 0 125 125 0 8 0 vnodes 208 6847 0 0 361 0 361 361 0 8 0 namei 1024 63754 0 63754 7 6 1 1 0 8 1 vcpupl 1984 48 0 0 6 0 6 6 0 8 0 vmpool 520 70 0 22 5 1 4 4 0 8 0 scsiplug 64 4 0 4 4 4 0 1 0 8 0 scxspl 192 55798 0 55797 36 35 1 7 0 8 0 plimitpl 152 417 0 410 1 0 1 1 0 8 0 sigapl 432 4236 0 4223 2 0 2 2 0 8 0 futexpl 56 141894 0 141894 4 4 0 1 0 8 0 knotepl 112 1977 0 1956 3 2 1 3 0 8 0 kqueuepl 104 2410 0 2408 7 6 1 4 0 8 0 pipepl 112 3220 0 3201 11 10 1 2 0 8 0 fdescpl 424 4237 0 4223 2 0 2 2 0 8 0 filepl 120 45535 0 45440 46 42 4 11 0 8 0 lockfpl 104 4168 0 4167 1 0 1 1 0 8 0 lockfspl 48 1236 0 1235 1 0 1 1 0 8 0 sessionpl 112 47 0 37 1 0 1 1 0 8 0 pgrppl 48 95 0 85 1 0 1 1 0 8 0 ucredpl 96 9043 0 9035 1 0 1 1 0 8 0 zombiepl 144 4227 0 4226 5 4 1 1 0 8 0 processpl 864 4257 0 4226 4 0 4 4 0 8 0 procpl 632 9263 0 9225 4 0 4 4 0 8 0 sosppl 128 44 0 44 11 11 0 1 0 8 0 sockpl 384 9190 0 9172 61 58 3 21 0 8 0 mcl64k 65536 660 0 660 44 44 0 33 0 8 0 mcl16k 16384 58 0 58 19 19 0 1 0 8 0 mcl12k 12288 174 0 174 12 12 0 1 0 8 0 mcl9k 9216 76 0 76 18 18 0 1 0 8 0 mcl8k 8192 208 0 208 12 12 0 1 0 8 0 mcl4k 4096 475 0 475 9 9 0 1 0 8 0 mcl2k2 2112 37 0 37 15 15 0 1 0 8 0 mcl2k 2048 76784 0 76738 18 11 7 14 0 8 0 mtagpl 80 196 0 194 8 7 1 1 0 8 0 mbufpl 256 169274 0 169166 141 132 9 45 0 8 0 bufpl 256 25559 0 18648 433 0 433 433 0 8 0 anonpl 16 535067 0 519953 229 133 96 96 0 62 12 amapchunkpl 152 22987 0 22874 88 72 16 19 0 158 8 amappl16 192 24455 0 23305 210 151 59 70 0 8 0 amappl15 184 1321 0 1321 5 5 0 1 0 8 0 amappl14 176 661 0 655 1 0 1 1 0 8 0 amappl13 168 961 0 960 7 6 1 1 0 8 0 amappl12 160 473 0 469 1 0 1 1 0 8 0 amappl11 152 584 0 573 1 0 1 1 0 8 0 amappl10 144 212 0 211 1 0 1 1 0 8 0 amappl9 136 1111 0 1104 1 0 1 1 0 8 0 amappl8 128 589 0 548 2 0 2 2 0 8 0 amappl7 120 341 0 334 1 0 1 1 0 8 0 amappl6 112 535 0 524 1 0 1 1 0 8 0 amappl5 104 834 0 823 1 0 1 1 0 8 0 amappl4 96 5421 0 5394 1 0 1 1 0 8 0 amappl3 88 865 0 854 1 0 1 1 0 8 0 amappl2 80 32610 0 32546 3 1 2 3 0 8 0 amappl1 72 89143 0 88723 27 17 10 20 0 8 1 amappl 80 9989 0 9929 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 137 0 8 3 0 3 3 0 8 0 uaddrrnd 24 4307 0 4223 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4307 0 4223 1 0 1 1 0 8 0 vmmpekpl 168 30977 0 30940 4 1 3 3 0 8 0 vmmpepl 168 527970 0 525692 354 202 152 156 0 357 41 vmsppl 272 4236 0 4223 7 5 2 2 0 8 1 pdppl 4096 8620 0 8538 14 2 12 12 0 8 1 pvpl 32 1458526 0 1441034 537 232 305 320 0 265 116 pmappl 200 4306 0 4245 4 0 4 4 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 877 0 310 18 0 18 18 0 8 0