panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 97654 60989 0 0x2 0 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830acfd2) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806e068790,41ed,fffffd807f7d76e8,ffff8000313eb3e8) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff8000313eb450) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd80714839a8,ffff8000313eb5b0,ffff8000313eb5e0,ffff8000313eb4e0) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff800035c076f0,ffffff9c,6fc17ddd6270,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3099 syscall(ffff8000313eb760) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6fc17ddd6300, count: 7 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(ffffffff830acfd2) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806e068790,41ed,fffffd807f7d76e8,ffff8000313eb3e8) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff8000313eb450) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd80714839a8,ffff8000313eb5b0,ffff8000313eb5e0,ffff8000313eb4e0) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff800035c076f0,ffffff9c,6fc17ddd6270,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3099 syscall(ffff8000313eb760) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6fc17ddd6300, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000313eb180 rbx 0xfffffd806c13e200 rdx 0 rcx 0 rax 0xffff800035c076f0 r8 0 r9 0x8080808080808080 r10 0x68f4dc9335c4fdfd r11 0x64c184f5b566abba r12 0 r13 0xfffffd806c46df10 r14 0 r15 0x1 rip 0xffffffff820a6335 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff8000313eb170 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=97654 pid=60989 tcnt=1 stat=onproc flags process=2 proc=0 runpri=17, usrpri=50, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff800035c07c00,0xffff800035c07988 process=0xffff8000ffff4018 user=0xffff8000313e6000, vmspace=0xfffffd806c283ad0 estcpu=36, cpticks=0, pctcpu=0.1, user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 92911 73075 79092 0 2 0 syz-executor 92911 107921 79092 0 3 0x4000080 sbwait syz-executor 51454 516258 1795 0 2 0 syz-executor 51454 81008 1795 0 3 0x4000080 fsleep syz-executor 83525 91608 24224 0 2 0 syz-executor 83525 146917 24224 0 2 0x4000000 syz-executor 79092 445929 15020 0 2 0x482 syz-executor 78399 385941 15020 0 3 0x82 nanoslp syz-executor 24873 503657 15020 0 3 0x82 wait syz-executor *60989 97654 15020 0 7 0x2 syz-executor 1795 133107 15020 0 2 0x482 syz-executor 24224 236235 15020 0 2 0x482 syz-executor 29157 441904 15020 0 2 0x82 syz-executor 26798 424370 0 0 3 0x14200 bored sosplice 15417 445543 0 0 3 0x14200 acct acct 15020 499701 92145 0 2 0x2 syz-executor 92145 388665 49719 0 3 0x10008a sigsusp ksh 49719 371541 65731 0 3 0x98 kqread sshd-session 65731 182131 13154 0 3 0x92 kqread sshd-session 90010 362598 1 0 3 0x100083 ttyin getty 13154 368666 1 0 3 0x88 kqread sshd 13721 83375 26473 73 3 0x1100090 kqread syslogd 26473 467594 1 0 3 0x100082 sbwait syslogd 26773 27707 1 0 3 0x100080 kqread resolvd 58722 386352 59120 77 3 0x100092 kqread dhcpleased 63324 301127 59120 77 3 0x100092 kqread dhcpleased 59120 186653 1 0 3 0x80 kqread dhcpleased 55669 10215 0 0 2 0x14200 smr 52799 508750 0 0 2 0x14200 zerothread 55753 403146 0 0 3 0x14200 aiodoned aiodoned 87504 461962 0 0 3 0x14200 syncer update 53014 391156 0 0 3 0x14200 cleaner cleaner 58417 282227 0 0 3 0x14200 reaper reaper 9778 471972 0 0 3 0x14200 pgdaemon pagedaemon 87924 514046 0 0 3 0x14200 bored viomb 53142 334061 0 0 3 0x40014200 acpi0 acpi0 57408 320110 0 0 3 0x14200 bored softnet3 78782 365242 0 0 3 0x14200 bored softnet2 61272 415878 0 0 3 0x14200 bored softnet1 13818 238665 0 0 3 0x14200 bored softnet0 41769 468544 0 0 3 0x14200 bored systqmp 52565 480499 0 0 3 0x14200 bored systq 39815 356493 0 0 2 0x40014200 softclock 93887 514420 0 0 3 0x40014200 idle0 1 242976 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 10195 10095K 10297K 166960K 11850 0 pcb 17 16K 18K 166960K 166 0 rtable 218 7K 8K 166960K 654 0 pf 31 13K 21K 166960K 71 0 ifaddr 39 6K 7K 166960K 86 0 ifgroup 50 2K 2K 166960K 106 0 counters 30 17K 17K 166960K 46 0 ioctlops 0 0K 4K 166960K 57 0 iov 0 0K 18K 166960K 155 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1456 92K 92K 166960K 1867 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 11 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 20 0 dirhash 12 2K 2K 166960K 21 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 15 53K 89K 166960K 593 0 sigio 0 0K 0K 166960K 6 0 proc 58 59K 83K 166960K 726 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 0 0K 0K 166960K 169 0 in_multi 87 6K 7K 166960K 188 0 ether_multi 1 0K 0K 166960K 2 0 mrt 0 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 121 546K 546K 166960K 121 0 exec 0 0K 1K 166960K 579 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 205 72K 93K 166960K 6347 0 UVM aobj 4 2K 2K 166960K 5 0 pinsyscall 36 72K 92K 166960K 1814 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 35 0 NDP 11 0K 2K 166960K 59 0 temp 44 6808K 6872K 166960K 22806 0 kqueue 13 20K 30K 166960K 90 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 89 0 86 1 0 1 1 0 8 0 rtentry 112 209 0 110 4 0 4 4 0 8 1 unpcb 144 496 0 477 6 0 6 6 0 8 5 syncache 336 5 0 5 1 0 1 1 0 8 1 tcpqe 32 2 0 2 1 0 1 1 0 8 1 tcpcb 808 254 0 247 14 2 12 14 0 8 11 arp 88 37 0 21 1 0 1 1 0 8 0 ipq 40 2 0 0 1 0 1 1 0 8 0 ipqe 40 3 0 1 1 0 1 1 0 8 0 inpcb 336 777 0 768 12 2 10 12 0 8 8 nd6 104 49 0 27 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 kcovpl 48 16 0 8 1 0 1 1 0 8 0 ppxss 1072 4 0 4 1 0 1 1 0 8 1 pfstscr 40 1 0 0 1 0 1 1 0 8 0 pfqueue 264 1 0 1 1 0 1 1 0 8 1 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 128 2 0 0 1 0 1 1 0 8 0 pfstate 344 1 0 0 1 0 1 1 0 8 0 pfrule 1344 1 0 1 1 0 1 1 0 8 1 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 817 0 412 29 2 27 29 0 8 1 art_table 32 819 0 412 4 0 4 4 0 8 0 art_node 16 207 0 118 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 1 1 0 1 1 0 8 1 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 16 0 6 1 0 1 1 0 8 0 shmpl 112 2 0 1 1 0 1 1 0 8 0 dirhash 1024 23 0 6 3 0 3 3 0 8 0 dino2pl 256 2205 0 697 95 0 95 95 0 8 0 ffsino 240 2205 0 697 90 0 90 90 0 8 0 nchpl 144 2905 0 1227 63 0 63 63 0 8 0 uvmvnodes 80 2669 0 0 55 0 55 55 0 8 0 vnodes 216 2669 0 0 149 0 149 149 0 8 0 namei 1024 10168 0 10167 2 0 2 2 0 8 1 kstatmem 264 54 0 32 2 0 2 2 0 8 0 scxspl 216 11275 0 11275 8 0 8 8 1 8 8 plimitpl 152 100 0 83 1 0 1 1 0 8 0 sigapl 424 856 0 810 6 0 6 6 0 8 0 futexpl 64 5610 0 5609 1 0 1 1 0 8 0 knotepl 120 14056 0 14009 10 0 10 10 0 8 8 kqueuepl 184 180 0 171 4 0 4 4 0 8 3 pipepl 288 146 0 119 3 0 3 3 0 8 0 fdescpl 432 838 0 811 5 0 5 5 0 8 1 filepl 120 4852 0 4609 15 0 15 15 0 8 5 lockfpl 104 230 0 228 1 0 1 1 0 8 0 lockfspl 48 67 0 65 1 0 1 1 0 8 0 sessionpl 144 29 0 21 1 0 1 1 0 8 0 pgrppl 48 47 0 31 1 0 1 1 0 8 0 ucredpl 104 665 0 653 1 0 1 1 0 8 0 zombiepl 144 814 0 810 1 0 1 1 0 8 0 processpl 1096 856 0 810 4 0 4 4 0 8 0 procpl 648 1347 0 1298 6 0 6 6 0 8 0 sosppl 168 2 0 2 1 0 1 1 0 8 1 sockpl 504 1367 0 1336 33 4 29 29 0 8 25 mcl64k 65536 6 0 6 1 0 1 1 0 8 1 mcl8k 8192 15 0 15 1 0 1 1 0 8 1 mcl4k 4096 3 0 3 1 0 1 1 0 8 1 mcl2k 2048 5871 0 5773 30 9 21 30 0 8 8 mtagpl 96 6 0 5 1 0 1 1 0 8 0 mbufpl 256 11098 0 10891 18 0 18 18 0 8 2 bufpl 280 8031 0 871 512 0 512 512 0 8 0 anonpl 24 169816 0 166694 77 0 77 77 0 187 54 amapchunkpl 152 21785 0 21356 41 0 41 41 0 158 20 amappl16 200 3271 0 3249 14 0 14 14 0 8 12 amappl15 192 8 0 8 1 0 1 1 0 8 1 amappl14 184 126 0 116 1 0 1 1 0 8 0 amappl13 176 24 0 24 1 0 1 1 0 8 1 amappl12 168 1601 0 1574 2 0 2 2 0 8 0 amappl11 160 47 0 37 1 0 1 1 0 8 0 amappl10 152 18 0 18 1 0 1 1 0 8 1 amappl9 144 134 0 133 1 0 1 1 0 8 0 amappl8 136 23 0 22 1 0 1 1 0 8 0 amappl7 128 125 0 115 1 0 1 1 0 8 0 amappl6 120 238 0 237 1 0 1 1 0 8 0 amappl5 112 151 0 142 1 0 1 1 0 8 0 amappl4 104 316 0 300 1 0 1 1 0 8 0 amappl3 96 3840 0 3755 3 0 3 3 0 8 0 amappl2 88 1053 0 984 2 0 2 2 0 8 0 amappl1 80 9294 0 8763 13 0 13 13 0 8 1 amappl 88 5919 0 5768 5 0 5 5 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 838 0 811 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 838 0 811 1 0 1 1 0 8 0 vmmpekpl 168 7970 0 7919 3 0 3 3 0 8 0 vmmpepl 168 57610 0 55960 90 0 90 90 0 357 13 vmsppl 344 837 0 811 4 0 4 4 0 8 1 rwobjpl 24 21254 0 17745 23 0 23 23 0 8 1 pdppl 4096 1683 0 1622 103 36 67 79 0 8 6 pvpl 32 454492 0 445406 355 5 350 355 0 265 265 pmappl 216 837 0 811 2 0 2 2 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 441 0 55 12 0 12 12 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(ffffffff830acfd2) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806e068790,41ed,fffffd807f7d76e8,ffff8000313eb3e8) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff8000313eb450) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd80714839a8,ffff8000313eb5b0,ffff8000313eb5e0,ffff8000313eb4e0) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff800035c076f0,ffffff9c,6fc17ddd6270,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3099 syscall(ffff8000313eb760) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6fc17ddd6300, count: -8 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830acfd2) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd806e068790,41ed,fffffd807f7d76e8,ffff8000313eb3e8) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff8000313eb450) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd80714839a8,ffff8000313eb5b0,ffff8000313eb5e0,ffff8000313eb4e0) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff800035c076f0,ffffff9c,6fc17ddd6270,1ff) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3099 syscall(ffff8000313eb760) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6fc17ddd6300, count: -8