panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *236343 46963 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830ab318) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806c4ac100,8000,fffffd807f7d77b8,ffff800037696d30) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_makeinode(8000,fffffd806c497c00,ffff800037697068,ffff800037697098) at ufs_makeinode+0xcb sys/ufs/ufs/ufs_vnops.c:1728 ufs_create(ffff800037696de0) at ufs_create+0x4e sys/ufs/ufs/ufs_vnops.c:147 VOP_CREATE(fffffd806c497c00,ffff800037697068,ffff800037697098,ffff800037696e68) at VOP_CREATE+0xff sys/kern/vfs_vops.c:103 vn_open(ffff800037697038,206,0) at vn_open+0x491 sys/kern/vfs_vnops.c:116 doopenat(ffff80002a5b4cc0,ffffff9c,200000c0,205,0,ffff8000376971e0) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff800037697290) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5909c242470, count: 5 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: ffs_valloc: dup alloc ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830ab318) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806c4ac100,8000,fffffd807f7d77b8,ffff800037696d30) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_makeinode(8000,fffffd806c497c00,ffff800037697068,ffff800037697098) at ufs_makeinode+0xcb sys/ufs/ufs/ufs_vnops.c:1728 ufs_create(ffff800037696de0) at ufs_create+0x4e sys/ufs/ufs/ufs_vnops.c:147 VOP_CREATE(fffffd806c497c00,ffff800037697068,ffff800037697098,ffff800037696e68) at VOP_CREATE+0xff sys/kern/vfs_vops.c:103 vn_open(ffff800037697038,206,0) at vn_open+0x491 sys/kern/vfs_vnops.c:116 doopenat(ffff80002a5b4cc0,ffffff9c,200000c0,205,0,ffff8000376971e0) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff800037697290) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5909c242470, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800037696ad0 rbx 0xfffffd807312a100 rdx 0xffff800001190d00 rcx 0 rax 0xffff80002a5b4cc0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x6ffbf61796c27546 r11 0xbc8ccf262b5c8f2b r12 0 r13 0xfffffd806c4ac4c0 r14 0 r15 0x1 rip 0xffffffff81c57035 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800037696ac0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=236343 pid=46963 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=17, usrpri=50, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a4f1470,0xffff80002a5b5c00 process=0xffff8000ffff77c0 user=0xffff800037692000, vmspace=0xfffffd807e440008 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 46963 106173 76403 0 2 0 syz-executor *46963 236343 76403 0 7 0x4000000 syz-executor 75200 304637 56803 0 3 0x80 nanoslp syz-executor 75200 151774 56803 0 2 0x4000000 syz-executor 75200 24297 56803 0 3 0x4000080 fsleep syz-executor 75200 59081 56803 0 3 0x4000080 fsleep syz-executor 92566 17521 76287 0 3 0x80 nanoslp syz-executor 92566 512526 76287 0 3 0x4000080 sbwait syz-executor 92566 300779 76287 0 3 0x4000080 fsleep syz-executor 70921 240073 6278 0 2 0x490 syz-executor 70921 491937 6278 0 3 0x4000090 kqsel syz-executor 70921 458386 6278 0 3 0x4000090 fsleep syz-executor 64825 92425 85567 0 2 0x490 syz-executor 64825 404164 85567 0 3 0x4000090 sbwait syz-executor 64825 433660 85567 0 3 0x4000090 fsleep syz-executor 64825 150906 85567 0 3 0x4000090 fsleep syz-executor 76971 75096 98679 0 2 0x490 syz-executor 76971 69161 98679 0 3 0x4000090 kqread syz-executor 76971 22374 98679 0 3 0x4000090 sbwait syz-executor 91116 491554 0 0 3 0x14200 bored sosplice 56803 127873 21057 0 3 0x82 nanoslp syz-executor 6278 14166 21057 0 2 0x482 syz-executor 14647 500412 21057 0 2 0x2 syz-executor 85567 366513 21057 0 2 0x482 syz-executor 76287 368854 21057 0 2 0x482 syz-executor 76403 15923 21057 0 2 0x482 syz-executor 98679 370590 21057 0 2 0x482 syz-executor 21057 168129 58378 0 3 0x82 wait syz-executor 58378 223734 91954 0 3 0x10008a sigsusp ksh 91954 353912 48101 0 3 0x98 kqread sshd-session 48101 330200 78250 0 3 0x92 kqread sshd-session 5950 187689 1 0 3 0x100083 ttyin getty 78250 146714 1 0 3 0x88 kqread sshd 13836 407528 84037 73 3 0x1100090 kqread syslogd 84037 461419 1 0 3 0x100082 sbwait syslogd 51245 300809 1 0 3 0x100080 kqread resolvd 76227 103254 18056 77 3 0x100092 kqread dhcpleased 37538 181414 18056 77 3 0x100092 kqread dhcpleased 18056 352774 1 0 3 0x80 kqread dhcpleased 55433 322118 0 0 3 0x14200 bored smr 75100 22143 0 0 2 0x14200 zerothread 49850 193996 0 0 3 0x14200 aiodoned aiodoned 10067 201818 0 0 3 0x14200 syncer update 58632 230594 0 0 3 0x14200 cleaner cleaner 46210 72764 0 0 3 0x14200 reaper reaper 47186 329495 0 0 3 0x14200 pgdaemon pagedaemon 29787 377301 0 0 3 0x14200 bored viomb 4716 422691 0 0 3 0x40014200 acpi0 acpi0 97537 178440 0 0 3 0x14200 bored softnet3 1995 132474 0 0 3 0x14200 bored softnet2 19390 455833 0 0 3 0x14200 bored softnet1 26626 424416 0 0 3 0x14200 bored softnet0 31191 449776 0 0 3 0x14200 bored systqmp 50200 33847 0 0 3 0x14200 bored systq 68787 410834 0 0 2 0x40014200 softclock 68684 384908 0 0 3 0x40014200 idle0 1 252306 0 0 3 0x80082 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 10170 10081K 10342K 166960K 11657 0 pcb 19 12K 12K 166960K 66 0 rtable 197 8K 9K 166960K 631 0 pf 31 13K 17K 166960K 72 0 ifaddr 36 6K 7K 166960K 82 0 ifgroup 50 2K 2K 166960K 99 0 sysctl 2 0K 0K 166960K 2 0 counters 30 17K 17K 166960K 42 0 ioctlops 0 0K 4K 166960K 132 0 iov 2 4K 20K 166960K 21 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1460 92K 92K 166960K 1787 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 5 0 VM map 2 1K 1K 166960K 2 0 sem 9 0K 0K 166960K 10 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 16 57K 97K 166960K 514 0 sigio 0 0K 0K 166960K 37 0 proc 58 59K 124K 166960K 721 0 subproc 104 6K 6K 166960K 208 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 2 0K 0K 166960K 38 0 in_multi 78 5K 7K 166960K 193 0 ether_multi 1 0K 0K 166960K 2 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 67 307K 307K 166960K 67 0 exec 0 0K 1K 166960K 475 0 pfkey data 0 0K 0K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 225 72K 89K 166960K 5732 0 UVM aobj 7 2K 2K 166960K 9 0 pinsyscall 37 74K 102K 166960K 1735 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 19 0 NDP 11 0K 2K 166960K 55 0 temp 76 6812K 6876K 166960K 12583 0 kqueue 14 22K 26K 166960K 64 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 166 0 163 4 1 3 3 0 8 2 rtentry 112 206 0 118 4 1 3 4 0 8 0 unpcb 144 379 0 354 7 5 2 6 0 8 0 syncache 336 3 0 3 1 1 0 1 0 8 0 tcpcb 808 248 0 240 11 7 4 8 0 8 3 arp 88 35 0 21 1 0 1 1 0 8 0 ipq 40 3 0 1 2 1 1 1 0 8 0 ipqe 40 7 0 4 2 1 1 1 0 8 0 inpcb 336 781 0 765 18 11 7 7 0 8 4 nd6 104 52 0 33 1 0 1 1 0 8 0 pkpcb 40 3 0 3 1 1 0 1 0 8 0 kcovpl 48 16 0 8 1 0 1 1 0 8 0 pfstscr 40 1 0 1 1 1 0 1 0 8 0 pfrktable 1344 1 0 1 1 1 0 1 0 8 0 pfanchor 1288 4 0 3 1 0 1 1 0 8 0 pftag 88 1 0 1 1 1 0 1 0 8 0 pfstkey 128 2 0 2 1 1 0 1 0 8 0 pfstate 344 1 0 1 1 1 0 1 0 8 0 pfrule 1344 6 0 6 2 1 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 815 0 447 29 3 26 29 0 8 0 art_table 32 816 0 447 4 0 4 4 0 8 0 art_node 16 204 0 125 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 2 1 1 0 1 0 8 0 semapl 112 8 0 1 1 0 1 1 0 8 0 shmpl 112 6 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2064 0 551 96 0 96 96 0 8 0 ffsino 240 2066 0 553 90 0 90 90 0 8 0 nchpl 144 2667 0 978 63 0 63 63 0 8 0 uvmvnodes 80 2469 0 0 51 0 51 51 0 8 0 vnodes 216 2469 0 0 138 0 138 138 0 8 0 namei 1024 10469 0 10468 3 2 1 2 0 8 0 vcpupl 3904 1 0 0 1 0 1 1 0 8 0 vmpool 664 4 0 3 3 2 1 1 0 8 0 kstatmem 264 46 0 24 2 0 2 2 0 8 0 scsiplug 72 1 0 1 1 0 1 1 0 8 1 scxspl 216 11064 0 11064 10 9 1 8 1 8 1 plimitpl 152 77 0 58 1 0 1 1 0 8 0 sigapl 424 777 0 732 7 1 6 7 0 8 0 futexpl 64 4713 0 4707 1 0 1 1 0 8 0 knotepl 120 12079 0 12031 8 0 8 8 0 8 6 kqueuepl 184 216 0 205 8 5 3 6 0 8 2 pipepl 288 182 0 155 5 2 3 5 0 8 0 fdescpl 432 759 0 731 5 1 4 5 0 8 0 filepl 120 5081 0 4755 21 7 14 14 0 8 3 lockfpl 104 241 0 239 2 1 1 2 0 8 0 lockfspl 48 79 0 77 1 0 1 1 0 8 0 sessionpl 144 29 0 21 1 0 1 1 0 8 0 pgrppl 48 80 0 64 1 0 1 1 0 8 0 ucredpl 104 711 0 696 1 0 1 1 0 8 0 zombiepl 144 794 0 793 3 2 1 1 0 8 0 processpl 1096 777 0 732 4 0 4 4 0 8 0 procpl 648 1212 0 1154 8 2 6 7 0 8 0 sosppl 168 2 0 2 2 1 1 1 0 8 1 sockpl 504 1334 0 1290 47 29 18 21 0 8 11 mcl64k 65536 2 0 2 2 2 0 1 0 8 0 mcl8k 8192 10 0 9 3 2 1 1 0 8 0 mcl4k 4096 6 0 6 3 2 1 1 0 8 1 mcl2k 2048 5743 0 5649 28 15 13 28 0 8 0 mtagpl 96 70 0 69 2 1 1 1 0 8 0 mbufpl 256 10163 0 9982 17 4 13 17 0 8 0 bufpl 280 5001 0 90 351 0 351 351 0 8 0 anonpl 24 145558 0 142270 50 28 22 49 0 187 0 amapchunkpl 152 18380 0 17894 35 13 22 33 0 158 2 amappl16 200 2887 0 2865 4 2 2 4 0 8 0 amappl15 192 5 0 5 1 1 0 1 0 8 0 amappl14 184 119 0 109 1 0 1 1 0 8 0 amappl13 176 5 0 5 1 1 0 1 0 8 0 amappl12 168 1497 0 1468 3 1 2 3 0 8 0 amappl11 160 49 0 39 1 0 1 1 0 8 0 amappl10 152 6 0 6 1 1 0 1 0 8 0 amappl9 144 133 0 133 1 1 0 1 0 8 0 amappl8 136 19 0 18 1 0 1 1 0 8 0 amappl7 128 112 0 102 1 0 1 1 0 8 0 amappl6 120 254 0 253 1 0 1 1 0 8 0 amappl5 112 154 0 145 1 0 1 1 0 8 0 amappl4 104 322 0 306 1 0 1 1 0 8 0 amappl3 96 3750 0 3640 4 0 4 4 0 8 0 amappl2 88 702 0 646 2 0 2 2 0 8 0 amappl1 80 9013 0 8479 14 2 12 14 0 8 0 amappl 88 5310 0 5140 6 1 5 5 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma2048 2048 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 8 0 2 1 0 1 1 0 8 0 uaddrrnd 24 763 0 734 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 763 0 734 1 0 1 1 0 8 0 vmmpekpl 168 7957 0 7903 3 0 3 3 0 8 0 vmmpepl 168 53129 0 51406 87 7 80 81 0 357 0 vmsppl 344 762 0 734 4 1 3 4 0 8 0 rwobjpl 24 20012 0 16673 21 0 21 21 0 8 0 pdppl 4096 1532 0 1469 123 56 67 82 0 8 4 pvpl 32 372139 0 362648 209 125 84 204 0 265 0 pmappl 216 762 0 734 3 1 2 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 484 0 139 11 0 11 11 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830ab318) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806c4ac100,8000,fffffd807f7d77b8,ffff800037696d30) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_makeinode(8000,fffffd806c497c00,ffff800037697068,ffff800037697098) at ufs_makeinode+0xcb sys/ufs/ufs/ufs_vnops.c:1728 ufs_create(ffff800037696de0) at ufs_create+0x4e sys/ufs/ufs/ufs_vnops.c:147 VOP_CREATE(fffffd806c497c00,ffff800037697068,ffff800037697098,ffff800037696e68) at VOP_CREATE+0xff sys/kern/vfs_vops.c:103 vn_open(ffff800037697038,206,0) at vn_open+0x491 sys/kern/vfs_vnops.c:116 doopenat(ffff80002a5b4cc0,ffffff9c,200000c0,205,0,ffff8000376971e0) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff800037697290) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5909c242470, count: -10 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830ab318) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806c4ac100,8000,fffffd807f7d77b8,ffff800037696d30) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_makeinode(8000,fffffd806c497c00,ffff800037697068,ffff800037697098) at ufs_makeinode+0xcb sys/ufs/ufs/ufs_vnops.c:1728 ufs_create(ffff800037696de0) at ufs_create+0x4e sys/ufs/ufs/ufs_vnops.c:147 VOP_CREATE(fffffd806c497c00,ffff800037697068,ffff800037697098,ffff800037696e68) at VOP_CREATE+0xff sys/kern/vfs_vops.c:103 vn_open(ffff800037697038,206,0) at vn_open+0x491 sys/kern/vfs_vnops.c:116 doopenat(ffff80002a5b4cc0,ffffff9c,200000c0,205,0,ffff8000376971e0) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff800037697290) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5909c242470, count: -10