panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 30752 18213 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830aeb00) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806c8ded28,2000,fffffd807f7d7820,ffff80003763ebd0) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_makeinode(2000,fffffd806c4876d0,ffff80003763edf0,ffff80003763ee20) at ufs_makeinode+0xcb sys/ufs/ufs/ufs_vnops.c:1728 ufs_mknod(ffff80003763ec90) at ufs_mknod+0x5b sys/ufs/ufs/ufs_vnops.c:167 VOP_MKNOD(fffffd806c4876d0,ffff80003763edf0,ffff80003763ee20,ffff80003763ed20) at VOP_MKNOD+0x102 sys/kern/vfs_vops.c:121 domknodat(ffff800037620cc8,ffffff9c,20000080,2000,205b1a) at domknodat+0x47e sys/kern/vfs_syscalls.c:1624 syscall(ffff80003763efc0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x599911483b0, count: 6 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(ffffffff830aeb00) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806c8ded28,2000,fffffd807f7d7820,ffff80003763ebd0) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_makeinode(2000,fffffd806c4876d0,ffff80003763edf0,ffff80003763ee20) at ufs_makeinode+0xcb sys/ufs/ufs/ufs_vnops.c:1728 ufs_mknod(ffff80003763ec90) at ufs_mknod+0x5b sys/ufs/ufs/ufs_vnops.c:167 VOP_MKNOD(fffffd806c4876d0,ffff80003763edf0,ffff80003763ee20,ffff80003763ed20) at VOP_MKNOD+0x102 sys/kern/vfs_vops.c:121 domknodat(ffff800037620cc8,ffffff9c,20000080,2000,205b1a) at domknodat+0x47e sys/kern/vfs_syscalls.c:1624 syscall(ffff80003763efc0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x599911483b0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003763e970 rbx 0xfffffd8067d26400 rdx 0xffff8000011786c0 rcx 0 rax 0xffff800037620cc8 r8 0x101010101010101 r9 0x8080808080808080 r10 0xca34246b52ccf45b r11 0x3033daad108b20bb r12 0 r13 0xfffffd806c8de2d8 r14 0 r15 0x1 rip 0xffffffff81301ee5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003763e960 ss 0 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=30752 pid=18213 tcnt=3 stat=onproc flags process=0 proc=4000000 runpri=17, usrpri=60, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff800037620530,0xffff8000376216f8 process=0xffff8000327faae8 user=0xffff80003763a000, vmspace=0xfffffd806c276d80 estcpu=10, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 53787 203795 86954 0 2 0 syz-executor 18213 96414 24564 0 2 0 syz-executor *18213 30752 24564 0 7 0x4000000 syz-executor 18213 240750 24564 0 2 0x4000000 syz-executor 57700 521889 98541 0 2 0x480 syz-executor 57700 405247 98541 0 3 0x4000080 fsleep syz-executor 57700 4997 98541 0 3 0x4000080 fsleep syz-executor 9788 21604 91769 0 2 0 syz-executor 9788 426325 91769 0 3 0x4000080 fsleep syz-executor 99914 46221 1727 0 2 0x480 syz-executor 99914 490787 1727 0 3 0x4000080 fsleep syz-executor 99914 223760 1727 0 3 0x4000080 fsleep syz-executor 99914 321310 1727 0 3 0x4000080 fsleep syz-executor 98541 434586 76832 0 2 0x482 syz-executor 86954 143137 76832 0 3 0x82 nanoslp syz-executor 24564 293268 76832 0 2 0x482 syz-executor 91769 133834 76832 0 2 0x482 syz-executor 85104 185106 76832 0 2 0x82 syz-executor 1727 141186 76832 0 2 0x482 syz-executor 76832 100792 12295 0 3 0x82 wait syz-executor 12295 159594 74259 0 3 0x10008a sigsusp ksh 74259 259310 99134 0 3 0x98 kqread sshd-session 99134 385781 28244 0 3 0x92 kqread sshd-session 4861 319695 1 0 3 0x100083 ttyin getty 28244 110504 1 0 3 0x88 kqread sshd 72199 320728 83980 73 3 0x1100090 kqread syslogd 83980 406546 1 0 3 0x100082 sbwait syslogd 68030 22706 1 0 3 0x100080 kqread resolvd 63755 405657 78607 77 3 0x100092 kqread dhcpleased 38204 110561 78607 77 3 0x100092 kqread dhcpleased 78607 317186 1 0 3 0x80 kqread dhcpleased 57695 468572 0 0 3 0x14200 bored smr 99938 420064 0 0 2 0x14200 zerothread 59121 39180 0 0 3 0x14200 aiodoned aiodoned 14357 468493 0 0 3 0x14200 syncer update 55394 368642 0 0 3 0x14200 cleaner cleaner 16886 340846 0 0 3 0x14200 reaper reaper 97572 192805 0 0 3 0x14200 pgdaemon pagedaemon 14178 94780 0 0 3 0x14200 bored viomb 89859 471014 0 0 3 0x40014200 acpi0 acpi0 67841 35047 0 0 3 0x14200 bored softnet3 74519 294016 0 0 3 0x14200 bored softnet2 62612 51517 0 0 3 0x14200 bored softnet1 92273 473470 0 0 3 0x14200 bored softnet0 58302 208688 0 0 3 0x14200 bored systqmp 68021 44217 0 0 3 0x14200 bored systq 29775 131556 0 0 3 0x40014200 tmoslp softclock 23280 216244 0 0 3 0x40014200 idle0 1 494438 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 devbuf 10176 10090K 10154K 166960K 11268 0 pcb 17 12K 12K 166960K 26 0 rtable 234 6K 6K 166960K 353 0 pf 30 12K 12K 166960K 30 0 ifaddr 42 7K 7K 166960K 44 0 ifgroup 50 2K 2K 166960K 50 0 sysctl 2 0K 0K 166960K 2 0 counters 30 17K 17K 166960K 30 0 ioctlops 0 0K 2K 166960K 32 0 iov 0 0K 4K 166960K 2 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1367 86K 86K 166960K 1388 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 1K 166960K 2 0 VM map 2 1K 1K 166960K 2 0 sem 2 0K 0K 166960K 2 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 15 53K 97K 166960K 156 0 proc 57 59K 116K 166960K 473 0 subproc 104 6K 6K 166960K 104 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 2 0 in_multi 99 7K 7K 166960K 99 0 ether_multi 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 61 281K 281K 166960K 61 0 exec 0 0K 1K 166960K 347 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 203 74K 74K 166960K 2862 0 UVM aobj 4 2K 2K 166960K 5 0 pinsyscall 36 72K 102K 166960K 1179 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 NDP 13 0K 1K 166960K 27 0 temp 33 6802K 6866K 166960K 7353 0 kqueue 14 22K 22K 166960K 24 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 39 0 36 1 0 1 1 0 8 0 rtentry 112 111 0 1 4 0 4 4 0 8 0 unpcb 144 80 0 65 2 0 2 2 0 8 1 syncache 336 3 0 3 1 0 1 1 0 8 1 tcpcb 808 10 0 6 1 0 1 1 0 8 0 arp 88 18 0 0 1 0 1 1 0 8 0 inpcb 336 74 0 66 2 0 2 2 0 8 1 nd6 104 24 0 0 1 0 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 452 0 0 29 0 29 29 0 8 0 art_table 32 453 0 0 4 0 4 4 0 8 0 art_node 16 110 0 10 1 0 1 1 0 8 0 shmpl 112 2 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1575 0 76 94 0 94 94 0 8 0 ffsino 240 1575 0 76 89 0 89 89 0 8 0 nchpl 144 1788 0 117 63 0 63 63 0 8 0 uvmvnodes 80 1693 0 0 35 0 35 35 0 8 0 vnodes 216 1693 0 0 95 0 95 95 0 8 0 namei 1024 5266 0 5265 2 0 2 2 0 8 1 kstatmem 264 22 0 0 2 0 2 2 0 8 0 scxspl 216 5146 0 5146 2 0 2 2 1 8 2 plimitpl 152 30 0 12 1 0 1 1 0 8 0 sigapl 424 436 0 392 7 0 7 7 0 8 1 futexpl 64 330 0 324 1 0 1 1 0 8 0 knotepl 120 3352 0 3304 2 0 2 2 0 8 0 kqueuepl 184 23 0 13 1 0 1 1 0 8 0 pipepl 288 102 0 75 2 0 2 2 0 8 0 fdescpl 432 420 0 393 5 0 5 5 0 8 1 filepl 120 1484 0 1243 10 0 10 10 0 8 2 lockfpl 104 22 0 20 1 0 1 1 0 8 0 lockfspl 48 10 0 8 1 0 1 1 0 8 0 sessionpl 144 21 0 13 1 0 1 1 0 8 0 pgrppl 48 29 0 13 1 0 1 1 0 8 0 ucredpl 104 84 0 72 1 0 1 1 0 8 0 zombiepl 144 395 0 392 1 0 1 1 0 8 0 processpl 1096 436 0 392 4 0 4 4 0 8 0 procpl 648 469 0 417 5 0 5 5 0 8 0 sockpl 504 193 0 167 9 0 9 9 0 8 4 mcl8k 8192 8 0 8 1 0 1 1 0 8 1 mcl4k 4096 4 0 4 1 0 1 1 0 8 1 mcl2k 2048 4845 0 4748 28 8 20 28 0 8 5 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 6597 0 6431 18 0 18 18 0 8 0 bufpl 280 4555 0 89 319 0 319 319 0 8 0 anonpl 24 169185 0 161435 50 0 50 50 0 187 2 amapchunkpl 152 10048 0 9367 30 0 30 30 0 158 0 amappl16 200 4822 0 4810 5 0 5 5 0 8 4 amappl15 192 15 0 15 1 0 1 1 0 8 1 amappl14 184 112 0 102 1 0 1 1 0 8 0 amappl13 176 15 0 15 1 0 1 1 0 8 1 amappl12 168 1034 0 1008 3 0 3 3 0 8 1 amappl11 160 52 0 42 1 0 1 1 0 8 0 amappl10 152 22 0 22 1 0 1 1 0 8 1 amappl9 144 134 0 134 1 0 1 1 0 8 1 amappl8 136 25 0 24 1 0 1 1 0 8 0 amappl7 128 99 0 89 1 0 1 1 0 8 0 amappl6 120 162 0 161 1 0 1 1 0 8 0 amappl5 112 123 0 115 1 0 1 1 0 8 0 amappl4 104 287 0 273 1 0 1 1 0 8 0 amappl3 96 1761 0 1678 3 0 3 3 0 8 0 amappl2 88 627 0 559 2 0 2 2 0 8 0 amappl1 80 7534 0 7011 14 0 14 14 0 8 2 amappl 88 2521 0 2373 4 0 4 4 0 92 0 dma4096 4096 1 0 1 1 0 1 1 0 8 1 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 0 1 1 0 8 1 dma128 128 253 0 253 1 0 1 1 0 8 1 dma64 64 6 0 6 1 0 1 1 0 8 1 dma32 32 7 0 7 1 0 1 1 0 8 1 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 4 0 1 1 0 1 1 0 8 0 uaddrrnd 24 420 0 393 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 420 0 393 1 0 1 1 0 8 0 vmmpekpl 168 5392 0 5352 2 0 2 2 0 8 0 vmmpepl 168 35830 0 34212 80 0 80 80 0 357 2 vmsppl 344 419 0 393 4 0 4 4 0 8 1 rwobjpl 24 17165 0 14645 17 0 17 17 0 8 1 pdppl 4096 846 0 786 96 28 68 82 0 8 8 pvpl 32 298270 0 274123 208 0 208 208 0 265 3 pmappl 216 419 0 393 3 0 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 380 0 36 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(ffffffff830aeb00) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806c8ded28,2000,fffffd807f7d7820,ffff80003763ebd0) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_makeinode(2000,fffffd806c4876d0,ffff80003763edf0,ffff80003763ee20) at ufs_makeinode+0xcb sys/ufs/ufs/ufs_vnops.c:1728 ufs_mknod(ffff80003763ec90) at ufs_mknod+0x5b sys/ufs/ufs/ufs_vnops.c:167 VOP_MKNOD(fffffd806c4876d0,ffff80003763edf0,ffff80003763ee20,ffff80003763ed20) at VOP_MKNOD+0x102 sys/kern/vfs_vops.c:121 domknodat(ffff800037620cc8,ffffff9c,20000080,2000,205b1a) at domknodat+0x47e sys/kern/vfs_syscalls.c:1624 syscall(ffff80003763efc0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x599911483b0, count: -9 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830aeb00) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806c8ded28,2000,fffffd807f7d7820,ffff80003763ebd0) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_makeinode(2000,fffffd806c4876d0,ffff80003763edf0,ffff80003763ee20) at ufs_makeinode+0xcb sys/ufs/ufs/ufs_vnops.c:1728 ufs_mknod(ffff80003763ec90) at ufs_mknod+0x5b sys/ufs/ufs/ufs_vnops.c:167 VOP_MKNOD(fffffd806c4876d0,ffff80003763edf0,ffff80003763ee20,ffff80003763ed20) at VOP_MKNOD+0x102 sys/kern/vfs_vops.c:121 domknodat(ffff800037620cc8,ffffff9c,20000080,2000,205b1a) at domknodat+0x47e sys/kern/vfs_syscalls.c:1624 syscall(ffff80003763efc0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x599911483b0, count: -9