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 *424841 74150 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(ffffffff821dee2b,ffffffff821f3832,149,ffffffff821bc7be) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8039d96f00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8039d96f00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8039d96f00) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8039d96f00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802f1f2c30,2,fffffd803f7c6ae0,ffff8000ffff3b40,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80274f8b50,0,4,fffffd803f7c6ae0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff80001796c7a8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802add4ec0,fffffd802f1f2c30,ffff80001796c8a8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff3b40,ffffff9c,7f7ffffdf710,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff80001796ca20) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,89,7f7ffffdf250,89,a175e9fb740,7f7ffffdf710) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdf700, 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(ffffffff821dee2b,ffffffff821f3832,149,ffffffff821bc7be) at __assert+0x2b sys/kern/subr_prf.c:154 buf_free_pages(fffffd8039d96f00) at buf_free_pages+0x1ee sys/kern/vfs_biomem.c:318 buf_dealloc_mem(fffffd8039d96f00) at buf_dealloc_mem+0xe1 sys/kern/vfs_biomem.c:194 buf_put(fffffd8039d96f00) at buf_put+0x16b sys/kern/vfs_bio.c:131 brelse(fffffd8039d96f00) at brelse+0x257 sys/kern/vfs_bio.c:922 vinvalbuf(fffffd802f1f2c30,2,fffffd803f7c6ae0,ffff8000ffff3b40,0,ffffffffffffffff) at vinvalbuf+0x3b1 sys/kern/vfs_subr.c:1977 ffs_truncate(fffffd80274f8b50,0,4,fffffd803f7c6ae0) at ffs_truncate+0xeb1 sys/ufs/ffs/ffs_inode.c:326 ufs_rmdir(ffff80001796c7a8) at ufs_rmdir+0x3af sys/ufs/ufs/ufs_vnops.c:1357 VOP_RMDIR(fffffd802add4ec0,fffffd802f1f2c30,ffff80001796c8a8) at VOP_RMDIR+0xf8 sys/kern/vfs_vops.c:474 dounlinkat(ffff8000ffff3b40,ffffff9c,7f7ffffdf710,8) at dounlinkat+0x14c sys/kern/vfs_syscalls.c:1818 syscall(ffff80001796ca20) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,89,7f7ffffdf250,89,a175e9fb740,7f7ffffdf710) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdf700, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001796c280 rbx 0xffff80001796c330 rdx 0x2 rcx 0 rax 0 r8 0xffff80001796c240 r9 0x1 r10 0 r11 0xe98264e9c1f1dbdd r12 0x3000000008 r13 0xffff80001796c290 r14 0x100 r15 0x1 rip 0xffffffff816e8ef8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001796c270 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=424841 stat=onproc flags process=2 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2ee8,0xffffffff82562a20 process=0xffff8000148a2a38 user=0xffff800017967000, vmspace=0xfffffd803f014cc0 estcpu=2, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *74150 424841 35005 0 7 0x2 syz-executor.0 21231 288586 0 0 3 0x14200 acct acct 56620 231763 0 0 3 0x14200 bored sosplice 35005 485704 39419 0 3 0x82 thrsleep syz-fuzzer 35005 478848 39419 0 3 0x4000082 nanosleep syz-fuzzer 35005 257408 39419 0 3 0x4000082 thrsleep syz-fuzzer 35005 110977 39419 0 3 0x4000082 thrsleep syz-fuzzer 35005 459614 39419 0 3 0x4000082 thrsleep syz-fuzzer 35005 134180 39419 0 3 0x4000002 biowait syz-fuzzer 35005 106513 39419 0 3 0x4000082 thrsleep syz-fuzzer 35005 471563 39419 0 3 0x4000082 kqread syz-fuzzer 39419 1204 49990 0 3 0x10008a pause ksh 49990 240638 51890 0 3 0x92 select sshd 20388 144239 1 0 3 0x100083 ttyin getty 51890 63103 1 0 3 0x80 select sshd 26506 234806 691 73 3 0x100010 ffs_fsync syslogd 691 119958 1 0 3 0x100082 netio syslogd 19959 384963 1 77 3 0x100090 poll dhclient 15844 267179 1 0 3 0x80 poll dhclient 3260 117506 0 0 3 0x14200 pgzero zerothread 42526 455720 0 0 3 0x14200 aiodoned aiodoned 96661 458215 0 0 3 0x14200 syncer update 67325 134549 0 0 3 0x14200 cleaner cleaner 91657 39451 0 0 3 0x14200 reaper reaper 69706 86032 0 0 3 0x14200 pgdaemon pagedaemon 88848 214162 0 0 3 0x14200 bored crynlk 69494 141840 0 0 3 0x14200 bored crypto 75073 487957 0 0 3 0x40014200 acpi0 acpi0 4500 332053 0 0 3 0x14200 bored softnet 47238 201398 0 0 3 0x14200 bored systqmp 33477 223729 0 0 3 0x14200 bored systq 69545 364224 0 0 3 0x40014200 bored softclock 88306 412102 0 0 3 0x40014200 idle0 13544 5841 0 0 3 0x14200 bored smr 1 93465 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 9572 6395K 15088K 78643K 28540 0 0 pcb 13 8K 8K 78643K 956 0 0 rtable 98 11K 12K 78643K 2650 0 0 ifaddr 71 17K 20K 78643K 824 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 383 0 0 iov 0 0K 32K 78643K 907 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1220 77K 77K 78643K 8112 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 121 0 0 VM map 2 0K 0K 78643K 14 0 0 sem 12 0K 1K 78643K 958 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 3 5K 25K 78643K 7508 0 0 sigio 0 0K 0K 78643K 80 0 0 proc 50 38K 63K 78643K 2392 0 0 subproc 16 1K 2K 78643K 595 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 726 0 0 in_multi 22 1K 2K 78643K 608 0 0 ether_multi 1 0K 0K 78643K 29 0 0 mrt 1 0K 0K 78643K 19 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 150 662K 662K 78643K 150 0 0 exec 0 0K 1K 78643K 1271 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 92 13K 40K 78643K 18964 0 0 UVM aobj 130 4K 4K 78643K 156 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 923 0 0 NDP 17 0K 1K 78643K 269 0 0 temp 189 3535K 4176K 78643K 142639 0 0 kqueue 0 0K 0K 78643K 81 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 73 0 69 1 0 1 1 0 8 0 rtpcb 80 498 0 496 1 0 1 1 0 8 0 rtentry 112 382 0 347 2 0 2 2 0 8 0 unpcb 120 2840 0 2821 2 1 1 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 4144 0 4144 1 1 0 1 0 8 0 tcpcb 544 1644 0 1640 2 1 1 2 0 8 0 ipq 40 13 0 13 7 7 0 1 0 8 0 ipqe 40 33 0 33 7 7 0 1 0 8 0 inpcb 280 4778 0 4771 13 12 1 3 0 8 0 rttmr 72 2 0 2 2 2 0 1 0 8 0 nd6 48 68 0 66 1 0 1 1 0 8 0 pkpcb 40 40 0 40 13 13 0 1 0 8 0 swfcl 56 4 0 0 1 0 1 1 0 8 0 ppxss 1128 110 0 110 31 31 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1699 0 1527 21 8 13 15 0 8 0 art_table 32 1700 0 1527 2 0 2 2 0 8 0 art_node 16 372 0 341 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 4 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 954 0 944 1 0 1 1 0 8 0 shmpl 112 154 0 26 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 15337 0 13933 46 0 46 46 0 8 0 ffsino 240 15337 0 13933 84 0 84 84 0 8 0 nchpl 144 27747 0 26118 61 0 61 61 0 8 0 uvmvnodes 72 8200 0 0 150 0 150 150 0 8 0 vnodes 208 8200 0 0 432 0 432 432 0 8 0 namei 1024 96142 0 96142 8 7 1 1 0 8 1 vmpool 520 12 0 12 6 6 0 1 0 8 0 scsiplug 64 12 0 12 9 9 0 1 0 8 0 scxspl 192 89320 0 89318 38 37 1 7 0 8 0 plimitpl 152 711 0 705 1 0 1 1 0 8 0 sigapl 432 7580 0 7569 2 0 2 2 0 8 0 futexpl 56 181047 0 181047 10 10 0 1 0 8 0 knotepl 112 2043 0 2018 9 8 1 3 0 8 0 kqueuepl 104 1891 0 1889 1 0 1 1 0 8 0 pipepl 112 7086 0 7071 31 30 1 2 0 8 0 fdescpl 424 7581 0 7569 2 0 2 2 0 8 0 filepl 120 63182 0 63104 27 24 3 5 0 8 0 lockfpl 104 2504 0 2503 1 0 1 1 0 8 0 lockfspl 48 869 0 868 1 0 1 1 0 8 0 sessionpl 112 50 0 41 1 0 1 1 0 8 0 pgrppl 48 84 0 75 1 0 1 1 0 8 0 ucredpl 96 9202 0 9194 1 0 1 1 0 8 0 zombiepl 144 7570 0 7570 3 2 1 1 0 8 1 processpl 864 7598 0 7570 4 0 4 4 0 8 0 procpl 632 16655 0 16620 4 0 4 4 0 8 0 sosppl 128 92 0 92 25 25 0 1 0 8 0 sockpl 384 8223 0 8195 21 17 4 5 0 8 0 mcl64k 65536 676 0 676 83 83 0 33 0 8 0 mcl16k 16384 42 0 42 26 26 0 1 0 8 0 mcl12k 12288 127 0 127 25 25 0 1 0 8 0 mcl9k 9216 90 0 90 28 28 0 1 0 8 0 mcl8k 8192 206 0 206 19 19 0 1 0 8 0 mcl4k 4096 599 0 599 11 11 0 1 0 8 0 mcl2k2 2112 45 0 45 29 29 0 1 0 8 0 mcl2k 2048 70754 0 70715 14 8 6 13 0 8 0 mtagpl 80 219 0 217 5 4 1 1 0 8 0 mbufpl 256 154896 0 154825 45 37 8 23 0 8 0 bufpl 256 28246 0 20045 513 0 513 513 0 8 0 anonpl 16 750411 0 737095 273 200 73 75 0 62 11 amapchunkpl 152 37562 0 37449 142 126 16 30 0 158 9 amappl16 192 39277 0 38511 243 203 40 53 0 8 0 amappl15 184 632 0 631 1 0 1 1 0 8 0 amappl14 176 2085 0 2083 2 1 1 1 0 8 0 amappl13 168 422 0 422 6 6 0 1 0 8 0 amappl12 160 185 0 182 1 0 1 1 0 8 0 amappl11 152 1115 0 1104 1 0 1 1 0 8 0 amappl10 144 2159 0 2158 1 0 1 1 0 8 0 amappl9 136 1666 0 1661 1 0 1 1 0 8 0 amappl8 128 1196 0 1170 1 0 1 1 0 8 0 amappl7 120 2322 0 2315 1 0 1 1 0 8 0 amappl6 112 1056 0 1044 1 0 1 1 0 8 0 amappl5 104 594 0 582 1 0 1 1 0 8 0 amappl4 96 7849 0 7822 1 0 1 1 0 8 0 amappl3 88 2091 0 2084 1 0 1 1 0 8 0 amappl2 80 58306 0 58253 4 2 2 3 0 8 0 amappl1 72 143861 0 143479 28 19 9 20 0 8 0 amappl 80 17452 0 17417 2 0 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 dma64 64 259 0 259 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 155 0 26 3 0 3 3 0 8 0 uaddrrnd 24 7593 0 7569 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 7593 0 7569 1 0 1 1 0 8 0 vmmpekpl 168 55271 0 55240 2 0 2 2 0 8 0 vmmpepl 168 890706 0 889067 515 427 88 127 0 357 2 vmsppl 272 7580 0 7569 6 5 1 2 0 8 0 pdppl 4096 15192 0 15162 7 2 5 6 0 8 0 pvpl 32 2208114 0 2191871 813 549 264 284 0 265 117 pmappl 200 7592 0 7581 1 0 1 1 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 845 0 209 20 0 20 20 0 8 0