panic: kernel diagnostic assertion "pg->wire_count == 1" failed: file "/syzkaller/managers/main/kernel/sys/kern/vfs_biomem.c", line 310 Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *120216 61543 0 0x8000002 0 0 syz-executor.6 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82925045) at panic+0x165 sys/kern/subr_prf.c:198 __assert(ffffffff828dd71c,ffffffff828eda27,136,ffffffff8286bcef) at __assert+0x29 sys/kern/subr_prf.c:157 buf_free_pages(fffffd806ca0f270) at buf_free_pages+0x1d0 sys/kern/vfs_biomem.c:299 buf_dealloc_mem(fffffd806ca0f270) at buf_dealloc_mem+0xe2 sys/kern/vfs_biomem.c:179 buf_put(fffffd806ca0f270) at buf_put+0x15e sys/kern/vfs_bio.c:127 brelse(fffffd806ca0f270) at brelse+0x26b sys/kern/vfs_bio.c:944 vinvalbuf(fffffd8069dde380,2,fffffd807f7d7618,ffff80002a6c54c0,0,ffffffffffffffff) at vinvalbuf+0x3b8 sys/kern/vfs_subr.c:2025 ffs_truncate(fffffd806b40af10,0,4,fffffd807f7d7618) at ffs_truncate+0xb99 ufs_rmdir(ffff8000377cd858) at ufs_rmdir+0x295 sys/ufs/ufs/ufs_vnops.c:1270 VOP_RMDIR(fffffd80690aa2c8,fffffd8069dde380,ffff8000377cd938) at VOP_RMDIR+0x12a sys/kern/vfs_vops.c:407 dounlinkat(ffff80002a6c54c0,ffffff9c,79ca0490f850,8) at dounlinkat+0x20e sys/kern/vfs_syscalls.c:1888 syscall(ffff8000377cdab0) at syscall+0x72a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x79ca0490f840, 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 *cpu0: kernel diagnostic assertion "pg->wire_count == 1" failed: file "/syzkaller/managers/main/kernel/sys/kern/vfs_biomem.c", line 310 ddb> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82925045) at panic+0x165 sys/kern/subr_prf.c:198 __assert(ffffffff828dd71c,ffffffff828eda27,136,ffffffff8286bcef) at __assert+0x29 sys/kern/subr_prf.c:157 buf_free_pages(fffffd806ca0f270) at buf_free_pages+0x1d0 sys/kern/vfs_biomem.c:299 buf_dealloc_mem(fffffd806ca0f270) at buf_dealloc_mem+0xe2 sys/kern/vfs_biomem.c:179 buf_put(fffffd806ca0f270) at buf_put+0x15e sys/kern/vfs_bio.c:127 brelse(fffffd806ca0f270) at brelse+0x26b sys/kern/vfs_bio.c:944 vinvalbuf(fffffd8069dde380,2,fffffd807f7d7618,ffff80002a6c54c0,0,ffffffffffffffff) at vinvalbuf+0x3b8 sys/kern/vfs_subr.c:2025 ffs_truncate(fffffd806b40af10,0,4,fffffd807f7d7618) at ffs_truncate+0xb99 ufs_rmdir(ffff8000377cd858) at ufs_rmdir+0x295 sys/ufs/ufs/ufs_vnops.c:1270 VOP_RMDIR(fffffd80690aa2c8,fffffd8069dde380,ffff8000377cd938) at VOP_RMDIR+0x12a sys/kern/vfs_vops.c:407 dounlinkat(ffff80002a6c54c0,ffffff9c,79ca0490f850,8) at dounlinkat+0x20e sys/kern/vfs_syscalls.c:1888 syscall(ffff8000377cdab0) at syscall+0x72a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x79ca0490f840, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000377cd350 rbx 0 rdx 0 rcx 0 rax 0xffff80002a6c54c0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xe888b8c1ece83b42 r11 0x39f2b5804716711a r12 0 r13 0xfffffd8006059100 r14 0 r15 0x1 rip 0xffffffff82453c3c db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff8000377cd340 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb> show proc PROC (syz-executor.6) tid=120216 pid=61543 tcnt=1 stat=onproc flags process=8000002 proc=0 runpri=17, usrpri=54, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff80002a6c42d0,0xffff80002daf8560 process=0xffff800035dbe198 user=0xffff8000377c8000, vmspace=0xfffffd8055b2b2d8 estcpu=4, cpticks=15, pctcpu=0.0, user=0, sys=15, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 68077 190152 32064 0 2 0x8000002 syz-executor.2 80747 242379 85921 0 2 0x8000000 syz-executor.4 80747 155520 85921 0 2 0xc000000 syz-executor.4 85921 265048 32064 0 3 0x8000082 nanoslp syz-executor.4 *61543 120216 32064 0 7 0x8000002 syz-executor.6 53595 353118 32064 0 3 0x8000082 nanoslp syz-executor.1 68089 163766 59879 0 3 0x18100082 netio arp 59879 181616 1 0 3 0x810008a sigsusp sh 55281 52307 0 0 3 0x14200 acct acct 14426 369633 1 0 3 0x18100083 ttyin getty 84219 156634 0 0 3 0x14200 bored sosplice 32064 391918 27778 0 3 0x1a000082 wait syz-fuzzer 32064 174792 27778 0 3 0x1e000082 nanoslp syz-fuzzer 32064 9095 27778 0 3 0x1e000082 thrsleep syz-fuzzer 32064 98096 27778 0 3 0x1e000082 wait syz-fuzzer 32064 520946 27778 0 3 0x1e000082 thrsleep syz-fuzzer 32064 411679 27778 0 3 0x1e000082 wait syz-fuzzer 32064 135407 27778 0 3 0x1e000082 thrsleep syz-fuzzer 32064 184556 27778 0 3 0x1e000082 wait syz-fuzzer 32064 114728 27778 0 3 0x1e000082 wait syz-fuzzer 32064 109191 27778 0 3 0x1e000082 thrsleep syz-fuzzer 32064 21485 27778 0 3 0x1e000082 thrsleep syz-fuzzer 32064 494625 27778 0 3 0x1e000082 wait syz-fuzzer 32064 169820 27778 0 3 0x1e000082 thrsleep syz-fuzzer 32064 263150 27778 0 3 0x1e000082 thrsleep syz-fuzzer 32064 255258 27778 0 3 0x1e000082 wait syz-fuzzer 27778 474425 97961 0 3 0x810008a sigsusp ksh 97961 242568 97649 0 3 0x1800009a kqread sshd 97649 62366 1 0 3 0x18000088 kqread sshd 68986 91257 350 73 3 0x19100010 ffs_fsync syslogd 350 241896 1 0 3 0x18100082 sbwait syslogd 89955 457733 1 0 3 0x18100080 kqread resolvd 70570 381731 60536 77 3 0x18100092 kqread dhcpleased 36252 371685 60536 77 3 0x18100092 kqread dhcpleased 60536 264798 1 0 3 0x18000080 kqread dhcpleased 65049 13313 0 0 3 0x14200 bored smr 96876 221932 0 0 2 0x14200 zerothread 56940 152542 0 0 3 0x14200 aiodoned aiodoned 37693 255100 0 0 3 0x14200 syncer update 19171 166302 0 0 3 0x14200 cleaner cleaner 30205 96815 0 0 3 0x14200 reaper reaper 91563 502749 0 0 3 0x14200 pgdaemon pagedaemon 1293 246779 0 0 3 0x14200 bored viomb 77652 103155 0 0 3 0x40014200 acpi0 acpi0 55235 381419 0 0 3 0x14200 bored softnet3 74538 430416 0 0 3 0x14200 bored softnet2 980 138864 0 0 3 0x14200 bored softnet1 6006 169906 0 0 3 0x14200 bored softnet0 97187 157675 0 0 3 0x14200 bored systqmp 38980 10388 0 0 3 0x14200 bored systq 58857 493167 0 0 3 0x40014200 tmoslp softclock 84727 120573 0 0 3 0x40014200 idle0 1 384651 0 0 3 0x8080082 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 devbuf 10186 6614K 7097K 166960K 19243 0 pcb 17 13K 14K 166960K 732 0 rtable 209 11K 13K 166960K 6888 0 pf 29 8K 10K 166960K 540 0 ifaddr 37 11K 13K 166960K 903 0 ifgroup 50 2K 2K 166960K 1025 0 sysctl 4 1K 2K 166960K 39 0 counters 30 17K 17K 166960K 269 0 ioctlops 0 0K 2K 166960K 473 0 iov 0 0K 20K 166960K 207 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1628 102K 103K 166960K 7917 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 140 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 412 0 dirhash 15 2K 3K 166960K 147 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 12 38K 109K 166960K 6954 0 sigio 0 0K 0K 166960K 118 0 proc 58 59K 124K 166960K 6531 0 subproc 91 5K 8K 166960K 3139 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 576 0 in_multi 77 5K 7K 166960K 2409 0 ether_multi 1 0K 0K 166960K 21 0 mrt 1 0K 0K 166960K 12 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 97 440K 440K 166960K 97 0 exec 0 0K 1K 166960K 3540 0 pfkey data 0 0K 0K 166960K 6 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 255 146K 181K 166960K 51971 0 UVM aobj 131 8K 8K 166960K 139 0 pinsyscall 33 66K 110K 166960K 13658 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 1K 166960K 285 0 NDP 11 0K 2K 166960K 668 0 temp 67 6811K 14748K 166960K 255265 0 kqueue 12 18K 32K 166960K 656 0 SYN cache 2 16K 16K 166960K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 935 0 931 3 2 1 3 0 8 0 rtentry 112 2456 0 2366 4 0 4 4 0 8 0 unpcb 144 3176 0 3163 7 5 2 6 0 8 1 syncache 336 15 0 15 2 1 1 1 0 8 1 sackhl 24 4 15 4 1 1 0 1 0 8 0 tcpqe 32 42 0 42 1 1 0 1 0 8 0 tcpcb 808 1496 0 1490 9 7 2 8 0 8 1 arp 88 451 0 437 1 0 1 1 0 8 0 ipq 40 11 0 11 2 1 1 1 0 8 1 ipqe 40 106 0 106 2 1 1 1 0 8 1 inpcb 352 5696 0 5687 17 13 4 14 0 8 2 nd6 104 671 0 652 1 0 1 1 0 8 0 pkpcb 40 34 0 34 2 1 1 1 0 8 1 kcovpl 48 241 0 234 1 0 1 1 0 8 0 ppxss 1072 10 0 10 1 1 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 9710 0 9338 147 118 29 31 0 8 3 art_table 32 9711 0 9338 4 0 4 4 0 8 0 art_node 16 2452 0 2371 1 0 1 1 0 8 0 sysvmsgpl 40 32 0 16 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 410 0 400 1 0 1 1 0 8 0 shmpl 112 136 0 8 4 0 4 4 0 8 0 dirhash 1024 107 0 88 3 0 3 3 0 8 0 dino2pl 256 8781 0 7251 98 1 97 97 0 8 0 ffsino 240 8781 0 7251 91 0 91 91 0 8 0 nchpl 144 16996 0 16435 66 41 25 66 0 8 0 uvmvnodes 80 10374 0 0 212 0 212 212 0 8 0 vnodes 216 10374 0 0 577 0 577 577 0 8 0 namei 1024 76349 0 76346 3 2 1 3 0 8 0 vcpupl 3904 18 0 2 3 0 3 3 0 8 0 vmpool 664 31 0 15 2 0 2 2 0 8 0 kstatmem 264 500 0 478 2 0 2 2 0 8 0 scsiplug 72 6 0 6 2 1 1 1 0 8 1 scxspl 216 125708 0 125707 9 7 2 8 1 8 1 plimitpl 152 955 0 939 1 0 1 1 0 8 0 sigapl 424 6814 0 6769 9 2 7 9 0 8 0 futexpl 64 77860 0 77860 1 0 1 1 0 8 1 knotepl 120 24753 0 24681 17 5 12 16 0 8 8 kqueuepl 184 1393 0 1385 4 3 1 4 0 8 0 pipepl 288 1664 0 1639 5 2 3 5 0 8 0 fdescpl 432 6775 0 6752 5 0 5 5 0 8 0 filepl 120 38300 0 38086 16 6 10 15 0 8 1 lockfpl 104 1431 0 1428 1 0 1 1 0 8 0 lockfspl 48 619 0 616 1 0 1 1 0 8 0 sessionpl 144 239 0 224 1 0 1 1 0 8 0 pgrppl 48 300 0 285 1 0 1 1 0 8 0 ucredpl 104 5452 0 5440 1 0 1 1 0 8 0 zombiepl 144 6776 0 6769 1 0 1 1 0 8 0 processpl 1072 6814 0 6769 5 0 5 5 0 8 0 procpl 656 11444 0 11384 9 1 8 9 0 8 0 sosppl 168 72 0 72 2 1 1 1 0 8 1 sockpl 504 9891 0 9865 51 43 8 29 0 8 4 mcl64k 65536 28 0 28 2 1 1 1 0 8 1 mcl16k 16384 2 0 2 1 1 0 1 0 8 0 mcl12k 12288 4 0 4 2 1 1 1 0 8 1 mcl9k 9216 3 0 3 1 1 0 1 0 8 0 mcl8k 8192 160 0 160 1 0 1 1 0 8 1 mcl4k 4096 14 0 14 1 1 0 1 0 8 0 mcl2k2 2112 1 0 1 1 1 0 1 0 8 0 mcl2k 2048 56663 0 56555 55 33 22 38 0 8 7 mtagpl 96 191 0 188 1 0 1 1 0 8 0 mbufpl 256 174037 0 173870 472 451 21 161 0 8 2 bufpl 280 17724 0 7349 742 0 742 742 0 8 0 anonpl 24 873606 0 867506 120 49 71 113 0 188 6 amapchunkpl 152 165508 0 164958 63 22 41 54 0 158 8 amappl16 200 16105 0 15987 63 45 18 24 0 8 8 amappl15 192 15 0 15 1 1 0 1 0 8 0 amappl14 184 974 0 960 2 1 1 2 0 8 0 amappl13 176 13 0 13 1 1 0 1 0 8 0 amappl12 168 10517 0 10492 2 0 2 2 0 8 0 amappl11 160 62 0 50 1 0 1 1 0 8 0 amappl10 152 280 0 271 1 0 1 1 0 8 0 amappl9 144 150 0 150 1 1 0 1 0 8 0 amappl8 136 606 0 574 2 0 2 2 0 8 0 amappl7 128 82 0 68 1 0 1 1 0 8 0 amappl6 120 3096 0 3078 2 0 2 2 0 8 0 amappl5 112 995 0 983 1 0 1 1 0 8 0 amappl4 104 1820 0 1789 2 0 2 2 0 8 0 amappl3 96 29836 0 29779 3 0 3 3 0 8 0 amappl2 88 8148 0 8077 4 1 3 3 0 8 1 amappl1 80 43734 0 43231 23 8 15 22 0 8 1 amappl 88 49727 0 49568 6 0 6 6 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 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 18 0 17 1 0 1 1 0 8 0 aobjpl 72 138 0 8 3 0 3 3 0 8 0 uaddrrnd 24 6806 0 6767 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 6806 0 6767 1 0 1 1 0 8 0 vmmpekpl 168 54708 0 54635 4 0 4 4 0 8 0 vmmpepl 168 480242 0 478623 127 21 106 111 0 357 13 vmsppl 344 6805 0 6767 6 0 6 6 0 8 0 rwobjpl 24 117900 0 106338 72 0 72 72 0 8 0 pdppl 4096 13618 0 13550 602 524 78 103 0 8 10 pvpl 32 2682413 0 2670727 414 229 185 362 0 265 51 pmappl 216 6805 0 6767 4 0 4 4 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1547 0 1187 15 1 14 15 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82925045) at panic+0x165 sys/kern/subr_prf.c:198 __assert(ffffffff828dd71c,ffffffff828eda27,136,ffffffff8286bcef) at __assert+0x29 sys/kern/subr_prf.c:157 buf_free_pages(fffffd806ca0f270) at buf_free_pages+0x1d0 sys/kern/vfs_biomem.c:299 buf_dealloc_mem(fffffd806ca0f270) at buf_dealloc_mem+0xe2 sys/kern/vfs_biomem.c:179 buf_put(fffffd806ca0f270) at buf_put+0x15e sys/kern/vfs_bio.c:127 brelse(fffffd806ca0f270) at brelse+0x26b sys/kern/vfs_bio.c:944 vinvalbuf(fffffd8069dde380,2,fffffd807f7d7618,ffff80002a6c54c0,0,ffffffffffffffff) at vinvalbuf+0x3b8 sys/kern/vfs_subr.c:2025 ffs_truncate(fffffd806b40af10,0,4,fffffd807f7d7618) at ffs_truncate+0xb99 ufs_rmdir(ffff8000377cd858) at ufs_rmdir+0x295 sys/ufs/ufs/ufs_vnops.c:1270 VOP_RMDIR(fffffd80690aa2c8,fffffd8069dde380,ffff8000377cd938) at VOP_RMDIR+0x12a sys/kern/vfs_vops.c:407 dounlinkat(ffff80002a6c54c0,ffffff9c,79ca0490f850,8) at dounlinkat+0x20e sys/kern/vfs_syscalls.c:1888 syscall(ffff8000377cdab0) at syscall+0x72a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x79ca0490f840, count: -14 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82925045) at panic+0x165 sys/kern/subr_prf.c:198 __assert(ffffffff828dd71c,ffffffff828eda27,136,ffffffff8286bcef) at __assert+0x29 sys/kern/subr_prf.c:157 buf_free_pages(fffffd806ca0f270) at buf_free_pages+0x1d0 sys/kern/vfs_biomem.c:299 buf_dealloc_mem(fffffd806ca0f270) at buf_dealloc_mem+0xe2 sys/kern/vfs_biomem.c:179 buf_put(fffffd806ca0f270) at buf_put+0x15e sys/kern/vfs_bio.c:127 brelse(fffffd806ca0f270) at brelse+0x26b sys/kern/vfs_bio.c:944 vinvalbuf(fffffd8069dde380,2,fffffd807f7d7618,ffff80002a6c54c0,0,ffffffffffffffff) at vinvalbuf+0x3b8 sys/kern/vfs_subr.c:2025 ffs_truncate(fffffd806b40af10,0,4,fffffd807f7d7618) at ffs_truncate+0xb99 ufs_rmdir(ffff8000377cd858) at ufs_rmdir+0x295 sys/ufs/ufs/ufs_vnops.c:1270 VOP_RMDIR(fffffd80690aa2c8,fffffd8069dde380,ffff8000377cd938) at VOP_RMDIR+0x12a sys/kern/vfs_vops.c:407 dounlinkat(ffff80002a6c54c0,ffffff9c,79ca0490f850,8) at dounlinkat+0x20e sys/kern/vfs_syscalls.c:1888 syscall(ffff8000377cdab0) at syscall+0x72a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x79ca0490f840, count: -14