panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *103679 11018 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(fffffd8069252698,8000,fffffd807f7d7750,ffff8000374b59b0) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_makeinode(8000,fffffd80765d21d0,ffff8000374b5ce8,ffff8000374b5d18) at ufs_makeinode+0xcb sys/ufs/ufs/ufs_vnops.c:1728 ufs_create(ffff8000374b5a60) at ufs_create+0x4e sys/ufs/ufs/ufs_vnops.c:147 VOP_CREATE(fffffd80765d21d0,ffff8000374b5ce8,ffff8000374b5d18,ffff8000374b5ae8) at VOP_CREATE+0xff sys/kern/vfs_vops.c:103 vn_open(ffff8000374b5cb8,70f,0) at vn_open+0x491 sys/kern/vfs_vnops.c:116 doopenat(ffff80002a4d76e8,ffffff9c,20000040,70e,0,ffff8000374b5e60) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff8000374b5f10) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x81769206d30, 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(fffffd8069252698,8000,fffffd807f7d7750,ffff8000374b59b0) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_makeinode(8000,fffffd80765d21d0,ffff8000374b5ce8,ffff8000374b5d18) at ufs_makeinode+0xcb sys/ufs/ufs/ufs_vnops.c:1728 ufs_create(ffff8000374b5a60) at ufs_create+0x4e sys/ufs/ufs/ufs_vnops.c:147 VOP_CREATE(fffffd80765d21d0,ffff8000374b5ce8,ffff8000374b5d18,ffff8000374b5ae8) at VOP_CREATE+0xff sys/kern/vfs_vops.c:103 vn_open(ffff8000374b5cb8,70f,0) at vn_open+0x491 sys/kern/vfs_vnops.c:116 doopenat(ffff80002a4d76e8,ffffff9c,20000040,70e,0,ffff8000374b5e60) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff8000374b5f10) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x81769206d30, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000374b5750 rbx 0xfffffd806c503a00 rdx 0xffff800001186d40 rcx 0 rax 0xffff80002a4d76e8 r8 0x101010101010101 r9 0x8080808080808080 r10 0x3b80cb5451ab5ec8 r11 0xa2a5da783370b842 r12 0 r13 0xfffffd80692525a8 r14 0 r15 0x1 rip 0xffffffff81c57035 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff8000374b5740 ss 0 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=103679 pid=11018 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=17, usrpri=82, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff8000376471e0,0xffffffff834bb3e8 process=0xffff800037600028 user=0xffff8000374b0000, vmspace=0xfffffd806f6d7c20 estcpu=32, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 519 359742 14549 0 2 0 syz-executor 519 164714 14549 0 3 0x4000080 sbwait syz-executor 27320 28834 74388 0 2 0 syz-executor 27320 393628 74388 0 3 0x4000080 sbwait syz-executor 73954 276211 40846 0 2 0 syz-executor 73954 436800 40846 0 3 0x4000080 fsleep syz-executor 24186 319624 96251 0 2 0x2 sh 11018 374389 4063 0 2 0 syz-executor *11018 103679 4063 0 7 0x4000000 syz-executor 48110 379395 82700 0 3 0x80 nanoslp syz-executor 48110 292574 82700 0 3 0x4000080 ttyout syz-executor 48110 6446 82700 0 3 0x4000080 fsleep syz-executor 48110 297209 82700 0 3 0x4000080 fsleep syz-executor 48110 469600 82700 0 3 0x4000080 fsleep syz-executor 96251 502044 45075 0 3 0x82 wait syz-executor 82700 483205 45075 0 3 0x82 nanoslp syz-executor 14549 61198 45075 0 2 0x482 syz-executor 4063 238195 45075 0 2 0x482 syz-executor 74388 506144 45075 0 2 0x482 syz-executor 23030 56489 45075 0 2 0x82 syz-executor 40846 394795 45075 0 2 0x482 syz-executor 86312 121121 0 0 3 0x14280 nfsidl nfsio 14394 346597 0 0 3 0x14280 nfsidl nfsio 80461 239277 0 0 3 0x14280 nfsidl nfsio 79805 79862 0 0 3 0x14280 nfsidl nfsio 56223 414646 0 0 3 0x14280 nfsidl nfsio 42751 181011 0 0 3 0x14280 nfsidl nfsio 14616 359699 0 0 3 0x14280 nfsidl nfsio 44862 187858 0 0 3 0x14280 nfsidl nfsio 42074 369623 0 0 3 0x14280 nfsidl nfsio 51780 311132 0 0 3 0x14280 nfsidl nfsio 95744 487277 0 0 3 0x14280 nfsidl nfsio 30445 513574 0 0 3 0x14280 nfsidl nfsio 596 390081 0 0 3 0x14280 nfsidl nfsio 3955 376 0 0 3 0x14280 nfsidl nfsio 55643 95799 0 0 3 0x14280 nfsidl nfsio 34888 84459 0 0 3 0x14280 nfsidl nfsio 48212 130956 0 0 3 0x14280 nfsidl nfsio 28477 145068 0 0 3 0x14280 nfsidl nfsio 98395 401075 0 0 3 0x14280 nfsidl nfsio 7584 186538 0 0 3 0x14280 nfsidl nfsio 81809 118098 1 0 3 0x3000 suspend syz-executor 81809 510364 1 0 2 0x4081000 syz-executor 50004 158145 0 0 3 0x14200 bored sosplice 91905 108956 1 0 3 0x100083 ttyin getty 45075 167645 34106 0 3 0x82 wait syz-executor 34106 50512 54707 0 3 0x10008a sigsusp ksh 54707 16297 7695 0 3 0x98 kqread sshd-session 7695 318020 20286 0 3 0x92 kqread sshd-session 20286 430818 1 0 3 0x88 kqread sshd 92265 444065 75960 73 3 0x1100090 kqread syslogd 75960 424395 1 0 3 0x100082 sbwait syslogd 86752 264534 1 0 3 0x100080 kqread resolvd 20135 263978 34822 77 3 0x100092 kqread dhcpleased 52109 242799 34822 77 3 0x100092 kqread dhcpleased 34822 17811 1 0 3 0x80 kqread dhcpleased 971 426328 0 0 3 0x14200 bored smr 73137 61812 0 0 2 0x14200 zerothread 69370 12398 0 0 3 0x14200 aiodoned aiodoned 45634 307626 0 0 3 0x14200 syncer update 38748 148132 0 0 3 0x14200 cleaner cleaner 83723 461711 0 0 3 0x14200 reaper reaper 95678 22493 0 0 3 0x14200 pgdaemon pagedaemon 65749 278001 0 0 3 0x14200 bored viomb 28655 153343 0 0 3 0x40014200 acpi0 acpi0 21510 28372 0 0 3 0x14200 bored softnet3 35392 383300 0 0 3 0x14200 bored softnet2 40671 4453 0 0 3 0x14200 bored softnet1 26361 225730 0 0 3 0x14200 bored softnet0 54 521812 0 0 3 0x14200 bored systqmp 96161 376330 0 0 3 0x14200 bored systq 64986 465078 0 0 3 0x40014200 tmoslp softclock 50370 411201 0 0 3 0x40014200 idle0 1 402077 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 10186 10088K 10346K 166960K 11589 0 pcb 17 12K 12K 166960K 111 0 rtable 226 10K 10K 166960K 1293 0 pf 38 14K 18K 166960K 133 0 ifaddr 44 8K 8K 166960K 179 0 ifgroup 58 2K 2K 166960K 201 0 counters 32 17K 18K 166960K 67 0 ioctlops 0 0K 4K 166960K 93 0 iov 0 0K 16K 166960K 29 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1377 87K 87K 166960K 2008 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 13 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 13 0 dirhash 18 3K 3K 166960K 39 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 17 61K 97K 166960K 1309 0 sigio 0 0K 0K 166960K 19 0 proc 58 59K 124K 166960K 1325 0 subproc 117 7K 7K 166960K 507 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 63 0 in_multi 99 7K 7K 166960K 473 0 ether_multi 1 0K 0K 166960K 10 0 mrt 1 0K 0K 166960K 6 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 115 519K 519K 166960K 115 0 exec 0 0K 1K 166960K 771 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 226 84K 87K 166960K 11266 0 UVM aobj 15 2K 2K 166960K 17 0 pinsyscall 38 76K 102K 166960K 3077 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 56 0 NDP 13 0K 2K 166960K 122 0 temp 45 6804K 6870K 166960K 16098 0 kqueue 21 27K 29K 166960K 132 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 107 0 104 1 0 1 1 0 8 0 rtentry 112 452 0 353 4 0 4 4 0 8 0 unpcb 144 398 0 374 1 0 1 1 0 8 0 syncache 336 3 0 3 1 1 0 1 0 8 0 tcpcb 808 155 0 151 1 0 1 1 0 8 0 arp 88 80 0 62 1 0 1 1 0 8 0 ipq 40 7 0 6 1 0 1 1 0 8 0 ipqe 40 97 0 96 1 0 1 1 0 8 0 inpcb 336 663 0 656 3 1 2 2 0 8 1 nd6 104 110 0 87 1 0 1 1 0 8 0 pkpcb 40 5 0 5 2 1 1 1 0 8 1 kcovpl 48 39 0 30 1 0 1 1 0 8 0 ppxss 1072 4 0 4 2 1 1 1 0 8 1 pfstscr 40 7 0 5 1 0 1 1 0 8 0 pfosfp 40 1 0 0 1 0 1 1 0 8 0 pfosfpen 112 1 0 0 1 0 1 1 0 8 0 pfrktable 1344 3 0 1 1 0 1 1 0 8 0 pfanchor 1288 7 0 5 1 0 1 1 0 8 0 pfstitem 24 6 0 0 1 0 1 1 0 8 0 pfstkey 128 11 0 5 1 0 1 1 0 8 0 pfstate 344 7 0 4 1 0 1 1 0 8 0 pfrule 1344 7 0 5 1 0 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 1895 0 1453 43 15 28 30 0 8 0 art_table 32 1897 0 1453 4 0 4 4 0 8 0 art_node 16 451 0 364 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 0 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 10 0 0 1 0 1 1 0 8 0 shmpl 112 14 0 2 1 0 1 1 0 8 0 dirhash 1024 35 0 14 3 0 3 3 0 8 0 dino2pl 256 2762 0 1209 98 0 98 98 0 8 0 ffsino 240 2763 0 1210 92 0 92 92 0 8 0 nchpl 144 3883 0 2172 64 0 64 64 0 8 0 uvmvnodes 80 3387 0 0 70 0 70 70 0 8 0 vnodes 216 3387 0 0 189 0 189 189 0 8 0 namei 1024 13925 0 13924 3 2 1 2 0 8 0 vcpupl 3904 3 0 0 1 0 1 1 0 8 0 vmpool 664 5 0 2 1 0 1 1 0 8 0 pfiaddrpl 120 1 0 0 1 0 1 1 0 8 0 kstatmem 264 96 0 70 3 0 3 3 0 8 0 scsiplug 72 1 0 1 1 0 1 1 0 8 1 scxspl 216 24015 0 24015 8 7 1 8 1 8 1 plimitpl 152 215 0 197 1 0 1 1 0 8 0 sigapl 424 1547 0 1480 10 1 9 9 0 8 1 futexpl 64 6922 0 6918 1 0 1 1 0 8 0 knotepl 120 33346 0 33286 18 8 10 10 0 8 8 kqueuepl 184 157 0 145 1 0 1 1 0 8 0 pipepl 288 225 0 197 3 0 3 3 0 8 0 fdescpl 432 1509 0 1480 5 1 4 5 0 8 0 filepl 120 5457 0 5187 10 1 9 9 0 8 0 lockfpl 104 183 0 181 1 0 1 1 0 8 0 lockfspl 48 76 0 74 1 0 1 1 0 8 0 sessionpl 144 51 0 43 1 0 1 1 0 8 0 pgrppl 48 97 0 80 1 0 1 1 0 8 0 ucredpl 104 1061 0 1050 1 0 1 1 0 8 0 zombiepl 144 1483 0 1480 1 0 1 1 0 8 0 processpl 1096 1547 0 1480 6 0 6 6 0 8 0 procpl 648 2462 0 2386 8 1 7 7 0 8 0 sosppl 168 8 0 8 2 1 1 1 0 8 1 sockpl 504 1175 0 1141 6 1 5 5 0 8 0 mcl64k 65536 340 0 340 2 1 1 1 0 8 1 mcl16k 16384 123 0 123 2 1 1 1 0 8 1 mcl12k 12288 63 0 63 2 1 1 1 0 8 1 mcl9k 9216 20 0 20 2 1 1 1 0 8 1 mcl8k 8192 120 0 120 2 1 1 1 0 8 1 mcl4k 4096 68 0 68 2 1 1 1 0 8 1 mcl2k2 2112 3 0 3 2 1 1 1 0 8 1 mcl2k 2048 7352 0 7254 31 13 18 26 0 8 5 mtagpl 96 10 0 9 1 0 1 1 0 8 0 mbufpl 256 18185 0 17976 25 8 17 24 0 8 1 bufpl 280 8610 0 1610 501 0 501 501 0 8 0 anonpl 24 254479 0 248899 125 40 85 85 0 187 45 amapchunkpl 152 37243 0 36763 54 12 42 42 0 158 21 amappl16 200 4233 0 4087 20 12 8 14 0 8 0 amappl15 192 10 0 10 1 1 0 1 0 8 0 amappl14 184 173 0 163 1 0 1 1 0 8 0 amappl13 176 7 0 7 1 1 0 1 0 8 0 amappl12 168 2579 0 2551 3 1 2 3 0 8 0 amappl11 160 50 0 40 1 0 1 1 0 8 0 amappl10 152 10 0 10 1 1 0 1 0 8 0 amappl9 144 132 0 131 1 0 1 1 0 8 0 amappl8 136 32 0 31 1 0 1 1 0 8 0 amappl7 128 154 0 144 1 0 1 1 0 8 0 amappl6 120 448 0 446 1 0 1 1 0 8 0 amappl5 112 239 0 231 1 0 1 1 0 8 0 amappl4 104 365 0 352 1 0 1 1 0 8 0 amappl3 96 7318 0 7211 5 1 4 4 0 8 1 amappl2 88 990 0 935 2 0 2 2 0 8 0 amappl1 80 12697 0 12159 15 2 13 14 0 8 1 amappl 88 10701 0 10533 5 0 5 5 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 254 0 254 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 8 0 8 1 1 0 1 0 8 0 dma16 16 22 0 21 1 0 1 1 0 8 0 aobjpl 72 16 0 2 1 0 1 1 0 8 0 uaddrrnd 24 1514 0 1482 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1514 0 1482 1 0 1 1 0 8 0 vmmpekpl 168 12102 0 12040 3 0 3 3 0 8 0 vmmpepl 168 95630 0 93786 99 12 87 92 0 357 2 vmsppl 344 1513 0 1482 4 0 4 4 0 8 0 rwobjpl 24 30856 0 26457 27 0 27 27 0 8 0 pdppl 4096 3034 0 2967 154 81 73 82 0 8 6 pvpl 32 797716 0 784590 546 167 379 382 0 265 265 pmappl 216 1513 0 1482 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 476 0 128 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(fffffd8069252698,8000,fffffd807f7d7750,ffff8000374b59b0) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_makeinode(8000,fffffd80765d21d0,ffff8000374b5ce8,ffff8000374b5d18) at ufs_makeinode+0xcb sys/ufs/ufs/ufs_vnops.c:1728 ufs_create(ffff8000374b5a60) at ufs_create+0x4e sys/ufs/ufs/ufs_vnops.c:147 VOP_CREATE(fffffd80765d21d0,ffff8000374b5ce8,ffff8000374b5d18,ffff8000374b5ae8) at VOP_CREATE+0xff sys/kern/vfs_vops.c:103 vn_open(ffff8000374b5cb8,70f,0) at vn_open+0x491 sys/kern/vfs_vnops.c:116 doopenat(ffff80002a4d76e8,ffffff9c,20000040,70e,0,ffff8000374b5e60) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff8000374b5f10) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x81769206d30, 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(fffffd8069252698,8000,fffffd807f7d7750,ffff8000374b59b0) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_makeinode(8000,fffffd80765d21d0,ffff8000374b5ce8,ffff8000374b5d18) at ufs_makeinode+0xcb sys/ufs/ufs/ufs_vnops.c:1728 ufs_create(ffff8000374b5a60) at ufs_create+0x4e sys/ufs/ufs/ufs_vnops.c:147 VOP_CREATE(fffffd80765d21d0,ffff8000374b5ce8,ffff8000374b5d18,ffff8000374b5ae8) at VOP_CREATE+0xff sys/kern/vfs_vops.c:103 vn_open(ffff8000374b5cb8,70f,0) at vn_open+0x491 sys/kern/vfs_vnops.c:116 doopenat(ffff80002a4d76e8,ffffff9c,20000040,70e,0,ffff8000374b5e60) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff8000374b5f10) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x81769206d30, count: -10