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 *385439 13567 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(ffffffff821e51f3,ffffffff821fa8bc,149,ffffffff821c3932) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8024df4a00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8024df4a00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8024df4a00) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8024df4a00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802cdd4840,2,fffffd803f7c6a80,ffff800014914ee8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803a526d20,0,4,fffffd803f7c6a80) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000148f8c08) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802d5fa500,fffffd802cdd4840,ffff8000148f8d08) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff800014914ee8,ffffff9c,7f7fffff9eb0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000148f8e80) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,89,7f7fffff99f0,89,c71442e8400,7f7fffff9eb0) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff9ea0, 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(ffffffff821e51f3,ffffffff821fa8bc,149,ffffffff821c3932) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8024df4a00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8024df4a00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8024df4a00) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8024df4a00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802cdd4840,2,fffffd803f7c6a80,ffff800014914ee8,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd803a526d20,0,4,fffffd803f7c6a80) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff8000148f8c08) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802d5fa500,fffffd802cdd4840,ffff8000148f8d08) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff800014914ee8,ffffff9c,7f7fffff9eb0,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff8000148f8e80) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,89,7f7fffff99f0,89,c71442e8400,7f7fffff9eb0) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff9ea0, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000148f86e0 rbx 0xffff8000148f8790 rdx 0x2 rcx 0 rax 0 r8 0xffff8000148f86a0 r9 0x1 r10 0 r11 0x54a6af03b8958af4 r12 0x3000000008 r13 0xffff8000148f86f0 r14 0x100 r15 0x1 rip 0xffffffff81d5c6a8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000148f86d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=385439 stat=onproc flags process=2 proc=0 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800014915650,0xffffffff825a4598 process=0xffff8000148a3458 user=0xffff8000148f3000, vmspace=0xfffffd803f014330 estcpu=1, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *13567 385439 96050 0 7 0x2 syz-executor.0 54628 296994 1 0 3 0x100083 ttyin getty 42149 207146 0 0 3 0x14200 bored sosplice 96050 46907 21810 0 3 0x82 thrsleep syz-fuzzer 96050 294335 21810 0 3 0x4000082 nanosleep syz-fuzzer 96050 159782 21810 0 3 0x4000002 biowait syz-fuzzer 96050 192808 21810 0 3 0x4000082 thrsleep syz-fuzzer 96050 38551 21810 0 3 0x4000082 thrsleep syz-fuzzer 96050 448944 21810 0 3 0x4000082 thrsleep syz-fuzzer 96050 89509 21810 0 3 0x4000082 thrsleep syz-fuzzer 96050 71063 21810 0 3 0x4000082 thrsleep syz-fuzzer 21810 312581 30342 0 3 0x10008a pause ksh 30342 219631 22204 0 3 0x92 select sshd 22204 257627 1 0 3 0x80 select sshd 2588 341720 30047 73 3 0x100010 biowait syslogd 30047 488146 1 0 3 0x100082 netio syslogd 61478 343977 1 77 3 0x100090 poll dhclient 31573 58028 1 0 3 0x80 poll dhclient 42289 6334 0 0 3 0x14200 pgzero zerothread 1426 115984 0 0 3 0x14200 aiodoned aiodoned 70895 375213 0 0 3 0x14200 syncer update 455 169824 0 0 3 0x14200 cleaner cleaner 15743 230070 0 0 3 0x14200 reaper reaper 66007 314922 0 0 3 0x14200 pgdaemon pagedaemon 79663 327485 0 0 3 0x14200 bored crynlk 37719 119342 0 0 3 0x14200 bored crypto 88220 110589 0 0 3 0x40014200 acpi0 acpi0 16468 64871 0 0 3 0x14200 bored softnet 96 82935 0 0 3 0x14200 bored systqmp 74813 412258 0 0 3 0x14200 bored systq 8200 240449 0 0 3 0x40014200 bored softclock 65931 286674 0 0 3 0x40014200 idle0 50385 181936 0 0 3 0x14200 bored smr 1 299407 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 9584 7020K 14620K 78643K 40577 0 0 pcb 13 12K 14K 78643K 1238 0 0 rtable 87 11K 13K 78643K 3722 0 0 ifaddr 84 19K 22K 78643K 993 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 317 0 0 iov 0 0K 32K 78643K 1267 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1232 77K 78K 78643K 10279 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 96 0 0 VM map 41 10K 10K 78643K 63 0 0 sem 12 1K 1K 78643K 283 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 3 5K 25K 78643K 6282 0 0 sigio 0 0K 0K 78643K 48 0 0 proc 50 38K 63K 78643K 2645 0 0 subproc 16 1K 2K 78643K 697 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 398 0 0 in_multi 15 0K 2K 78643K 649 0 0 ether_multi 1 0K 0K 78643K 36 0 0 mrt 2 0K 0K 78643K 45 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 90 397K 397K 78643K 90 0 0 exec 0 0K 1K 78643K 1457 0 0 pfkey data 0 0K 0K 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 164 340K 364K 78643K 16382 0 0 UVM aobj 130 4K 4K 78643K 146 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 1168 0 0 NDP 21 0K 1K 78643K 331 0 0 temp 217 3543K 4184K 78643K 300863 0 0 kqueue 0 0K 0K 78643K 58 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 132 0 128 1 0 1 1 0 8 0 rtpcb 80 586 0 584 1 0 1 1 0 8 0 rtentry 112 691 0 665 2 0 2 2 0 8 0 unpcb 120 2692 0 2682 4 3 1 2 0 8 0 syncache 264 21 0 21 10 10 0 1 0 8 0 tcpqe 32 4783 0 4783 3 3 0 1 0 8 0 tcpcb 544 2038 0 2034 19 18 1 14 0 8 0 ipq 40 46 0 44 16 15 1 1 0 8 0 ipqe 40 464 0 462 16 15 1 1 0 8 0 inpcb 280 9068 0 9061 72 71 1 13 0 8 0 rttmr 72 14 0 14 7 7 0 1 0 8 0 ip6q 72 4 0 4 3 3 0 1 0 8 0 ip6af 40 6 0 6 1 1 0 1 0 8 0 nd6 48 97 0 97 4 4 0 1 0 8 0 pkpcb 40 33 0 33 10 10 0 1 0 8 0 swfcl 56 9 0 0 1 0 1 1 0 8 0 ppxss 1128 119 0 119 22 22 0 1 0 8 0 art_heap8 4096 20 0 19 9 8 1 3 0 8 0 art_heap4 256 2850 0 2720 48 38 10 17 0 8 0 art_table 32 2870 0 2739 4 2 2 3 0 8 0 art_node 16 689 0 665 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 2 1 1 0 1 0 8 0 semapl 112 277 0 267 1 0 1 1 0 8 0 shmpl 112 144 0 16 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 10574 0 9163 46 0 46 46 0 8 0 ffsino 240 10574 0 9163 84 0 84 84 0 8 0 nchpl 144 21277 0 19654 63 2 61 61 0 8 0 uvmvnodes 72 7119 0 0 130 0 130 130 0 8 0 vnodes 208 7119 0 0 375 0 375 375 0 8 0 namei 1024 87805 0 87805 6 5 1 1 0 8 1 vcpupl 1984 39 0 0 5 0 5 5 0 8 0 vmpool 520 61 0 22 3 0 3 3 0 8 0 scsiplug 64 6 0 6 4 4 0 1 0 8 0 scxspl 192 78290 0 78288 40 39 1 7 0 8 0 plimitpl 152 517 0 511 1 0 1 1 0 8 0 sigapl 432 6341 0 6330 2 0 2 2 0 8 0 futexpl 56 160528 0 160528 5 5 0 1 0 8 0 knotepl 112 2048 0 2025 7 6 1 3 0 8 0 kqueuepl 104 2148 0 2146 4 3 1 4 0 8 0 pipepl 112 3292 0 3277 16 15 1 2 0 8 0 fdescpl 424 6342 0 6330 2 0 2 2 0 8 0 filepl 120 54630 0 54553 51 48 3 11 0 8 0 lockfpl 104 2561 0 2560 1 0 1 1 0 8 0 lockfspl 48 840 0 839 1 0 1 1 0 8 0 sessionpl 112 61 0 52 1 0 1 1 0 8 0 pgrppl 48 111 0 102 1 0 1 1 0 8 0 ucredpl 96 5839 0 5830 1 0 1 1 0 8 0 zombiepl 144 6335 0 6335 3 2 1 1 0 8 1 processpl 864 6362 0 6335 4 0 4 4 0 8 0 procpl 632 13657 0 13623 5 1 4 5 0 8 0 sosppl 128 48 0 48 13 13 0 1 0 8 0 sockpl 384 12583 0 12564 109 106 3 21 0 8 0 mcl64k 65536 2200 0 2200 197 197 0 33 0 8 0 mcl16k 16384 56 0 56 14 14 0 1 0 8 0 mcl12k 12288 187 0 187 12 12 0 1 0 8 0 mcl9k 9216 507 0 507 12 12 0 1 0 8 0 mcl8k 8192 303 0 303 7 7 0 1 0 8 0 mcl4k 4096 675 0 674 7 6 1 1 0 8 0 mcl2k2 2112 65 0 65 20 20 0 1 0 8 0 mcl2k 2048 75738 0 75694 26 19 7 14 0 8 1 mtagpl 80 245 0 245 7 7 0 1 0 8 0 mbufpl 256 183178 0 183123 210 202 8 34 0 8 1 bufpl 256 30774 0 22569 513 0 513 513 0 8 0 anonpl 16 760842 0 744358 201 113 88 88 0 62 11 amapchunkpl 152 32924 0 32824 104 89 15 18 0 158 10 amappl16 192 38226 0 37261 239 187 52 63 0 8 0 amappl15 184 553 0 549 1 0 1 1 0 8 0 amappl14 176 1461 0 1459 2 1 1 1 0 8 0 amappl13 168 961 0 961 7 6 1 1 0 8 1 amappl12 160 822 0 819 1 0 1 1 0 8 0 amappl11 152 453 0 442 1 0 1 1 0 8 0 amappl10 144 630 0 627 1 0 1 1 0 8 0 amappl9 136 1920 0 1915 1 0 1 1 0 8 0 amappl8 128 1423 0 1375 3 1 2 2 0 8 0 amappl7 120 818 0 811 1 0 1 1 0 8 0 amappl6 112 426 0 412 1 0 1 1 0 8 0 amappl5 104 1298 0 1286 1 0 1 1 0 8 0 amappl4 96 6188 0 6159 1 0 1 1 0 8 0 amappl3 88 1771 0 1766 1 0 1 1 0 8 0 amappl2 80 48574 0 48515 4 2 2 3 0 8 0 amappl1 72 127373 0 126992 28 19 9 20 0 8 0 amappl 80 14557 0 14505 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 145 0 16 3 0 3 3 0 8 0 uaddrrnd 24 6403 0 6330 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 6403 0 6330 1 0 1 1 0 8 0 vmmpekpl 168 40403 0 40361 4 2 2 3 0 8 0 vmmpepl 168 777317 0 775392 336 226 110 133 0 357 8 vmsppl 272 6341 0 6330 4 3 1 2 0 8 0 pdppl 4096 12812 0 12743 16 6 10 10 0 8 0 pvpl 32 2100551 0 2081132 632 341 291 305 0 265 119 pmappl 200 6402 0 6352 3 0 3 3 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 1165 0 525 20 1 19 19 0 8 0