panic: ffs2_balloc: unwind failed Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *344114 68692 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8340eae2) at panic+0x1cf sys/kern/subr_prf.c:198 ffs2_balloc(fffff6806bc32600,6001000003,1,fffff68007ffd820,1,ffff8000338cd740) at ffs2_balloc+0x1965 ffs_truncate(fffff6806bc32600,6001000004,0,fffff68007ffd820) at ffs_truncate+0x4f8 sys/ufs/ffs/ffs_inode.c:217 ufs_setattr(ffff8000338cd860) at ufs_setattr+0x8e0 sys/ufs/ufs/ufs_vnops.c:403 VOP_SETATTR(fffff68068e5a2e8,ffff8000338cd8e8,fffff68007ffd820,ffff80002a764d10) at VOP_SETATTR+0x112 sys/kern/vfs_vops.c:210 dotruncate(ffff80002a764d10,fffff68068e5a2e8,6001000004) at dotruncate+0x1da sys/kern/vfs_syscalls.c:2811 sys_truncate(ffff80002a764d10,ffff8000338cdbb0,ffff8000338cdb00) at sys_truncate+0x13e sys/kern/vfs_syscalls.c:2835 syscall(ffff8000338cdbb0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff8000338cdbb0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x40f6974d070, 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: ffs2_balloc: unwind failed ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8340eae2) at panic+0x1cf sys/kern/subr_prf.c:198 ffs2_balloc(fffff6806bc32600,6001000003,1,fffff68007ffd820,1,ffff8000338cd740) at ffs2_balloc+0x1965 ffs_truncate(fffff6806bc32600,6001000004,0,fffff68007ffd820) at ffs_truncate+0x4f8 sys/ufs/ffs/ffs_inode.c:217 ufs_setattr(ffff8000338cd860) at ufs_setattr+0x8e0 sys/ufs/ufs/ufs_vnops.c:403 VOP_SETATTR(fffff68068e5a2e8,ffff8000338cd8e8,fffff68007ffd820,ffff80002a764d10) at VOP_SETATTR+0x112 sys/kern/vfs_vops.c:210 dotruncate(ffff80002a764d10,fffff68068e5a2e8,6001000004) at dotruncate+0x1da sys/kern/vfs_syscalls.c:2811 sys_truncate(ffff80002a764d10,ffff8000338cdbb0,ffff8000338cdb00) at sys_truncate+0x13e sys/kern/vfs_syscalls.c:2835 syscall(ffff8000338cdbb0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff8000338cdbb0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x40f6974d070, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000338cd3c0 rbx 0xfffff6806bc32600 rdx 0xffff8000015e2c40 rcx 0 rax 0xffff80002a764d10 r8 0x101010101010101 r9 0x8080808080808080 r10 0x94649a4e2a851507 r11 0x91b35df4d241ccf8 r12 0 r13 0xffff800000c48800 r14 0 r15 0x1 rip 0xffffffff818234f5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff8000338cd3b0 ss 0 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=344114 pid=68692 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=0xffff80002a765770,0xffff80002a764028 process=0xffff800045ff8498 user=0xffff8000338c8000, vmspace=0xfffff6806cf8c2f8 estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 3241 275283 61865 0 2 0 syz-executor 3241 503784 61865 0 3 0x4000080 fsleep syz-executor 68692 49062 83194 0 2 0 syz-executor *68692 344114 83194 0 7 0x4000000 syz-executor 59897 55128 17774 0 2 0 syz-executor 59897 476708 17774 0 3 0x4000080 fsleep syz-executor 51873 76862 84161 0 2 0 syz-executor 51873 380757 84161 0 3 0x4000080 fsleep syz-executor 16831 428811 91977 0 2 0 syz-executor 16831 119002 91977 0 3 0x4000080 fsleep syz-executor 46199 155802 1755 0 2 0xc80 syz-executor 46199 251796 1755 0 3 0x4000080 lockf syz-executor 46199 351091 1755 0 3 0x4000080 fsleep syz-executor 61865 174020 49157 0 3 0x82 nanoslp syz-executor 26564 387768 49157 0 2 0x2 syz-executor 96778 138819 49157 0 2 0xc82 syz-executor 83194 393256 49157 0 2 0xc82 syz-executor 84161 132484 49157 0 3 0x82 nanoslp syz-executor 1755 20039 49157 0 3 0x82 nanoslp syz-executor 91977 268382 49157 0 3 0x82 nanoslp syz-executor 17774 119770 49157 0 2 0xc82 syz-executor 49157 303988 71196 0 3 0x82 kqread syz-executor 71196 424297 56684 0 3 0x10008a sigsusp ksh 56684 127630 97382 0 3 0x98 kqread sshd-session 97382 386110 55946 0 3 0x92 kqread sshd-session 37270 191296 1 0 3 0x100083 ttyin getty 55946 371799 1 0 3 0x88 kqread sshd 42581 53938 74698 73 3 0x1100090 kqread syslogd 74698 468542 1 0 3 0x100082 sbwait syslogd 15070 519034 1 0 3 0x100080 kqread resolvd 58279 2692 6736 77 3 0x100092 kqread dhcpleased 9456 27245 6736 77 3 0x100092 kqread dhcpleased 6736 250177 1 0 3 0x80 kqread dhcpleased 89915 147118 0 0 3 0x14200 bored smr 52973 80265 0 0 2 0x14200 zerothread 42041 44725 0 0 3 0x14200 aiodoned aiodoned 34233 33810 0 0 3 0x14200 syncer update 68729 133012 0 0 3 0x14200 cleaner cleaner 50826 306511 0 0 3 0x14200 reaper reaper 6949 321138 0 0 3 0x14200 pgdaemon pagedaemon 54889 348232 0 0 3 0x14200 bored viomb 25715 288366 0 0 3 0x40014200 acpi0 acpi0 29253 40871 0 0 3 0x14200 bored softnet0 44625 293152 0 0 3 0x14200 smrbar systqmp 26911 345092 0 0 3 0x14200 bored systq 63070 159345 0 0 3 0x40014200 tmoslp softclock 58780 247600 0 0 3 0x40014200 idle0 1 135099 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 11058 12436K 12436K 166960K 12226 0 pcb 17 12K 12K 166960K 39 0 rtable 233 7K 7K 166960K 384 0 pf 33 13K 17K 166960K 43 0 ifaddr 42 7K 7K 166960K 45 0 ifgroup 55 2K 2K 166960K 55 0 sysctl 1 1K 9K 166960K 5 0 counters 35 18K 18K 166960K 35 0 ioctlops 0 0K 4K 166960K 54 0 iov 0 0K 8K 166960K 6 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1301 82K 82K 166960K 1436 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 3 5K 5K 166960K 4 0 VM map 2 1K 1K 166960K 2 0 sem 5 0K 0K 166960K 5 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1734 201K 291K 166960K 11964 0 file desc 17 61K 93K 166960K 234 0 sigio 0 0K 0K 166960K 2 0 proc 60 59K 91K 166960K 512 0 subproc 72 4K 4K 166960K 72 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 18 0 in_multi 96 7K 7K 166960K 99 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 5 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 378 0 fusefs mount 1 32K 32K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 211 142K 157K 166960K 3837 0 UVM aobj 6 2K 2K 166960K 6 0 pinsyscall 38 76K 94K 166960K 1334 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 2 0 NDP 12 0K 2K 166960K 28 0 temp 36 9110K 9174K 166960K 10319 0 kqueue 13 20K 31K 166960K 44 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 40 0 36 1 0 1 1 0 8 0 rtentry 136 115 0 12 4 0 4 4 0 8 0 unpcb 144 89 0 74 1 0 1 1 0 8 0 syncache 336 7 0 7 1 0 1 1 0 8 1 tcpcb 736 45 0 40 2 0 2 2 0 8 1 arp 96 18 0 0 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 1 0 0 1 0 1 1 0 8 0 inpcb 328 207 0 198 7 0 7 7 0 8 5 nd6 112 26 0 0 1 0 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 mppekey 1024 1 0 0 1 0 1 1 0 8 0 ppxss 1072 2 0 0 1 0 1 1 0 8 0 pfrule 1360 3 0 3 1 0 1 1 0 8 1 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 501 0 41 30 0 30 30 0 8 1 art_table 40 503 0 41 5 0 5 5 0 8 0 art_node 32 115 0 11 1 0 1 1 0 8 0 semapl 72 3 0 0 1 0 1 1 0 8 0 shmpl 112 3 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1742 0 279 92 0 92 92 0 8 0 ffsino 256 1742 0 279 92 0 92 92 0 8 0 nchpl 144 2083 0 385 64 0 64 64 0 8 0 rtmask 32 1 0 0 1 0 1 1 0 8 0 vnodes 216 1870 0 0 104 0 104 104 0 8 0 namei 1024 6282 0 6282 1 0 1 1 0 8 1 kstatmem 264 25 0 0 2 0 2 2 0 8 0 scxspl 216 6859 0 6859 4 0 4 4 1 8 4 plimitpl 152 42 0 25 1 0 1 1 0 8 0 sigapl 424 529 0 487 6 0 6 6 0 8 1 knotepl 120 6162 0 6115 16 0 16 16 0 8 14 kqueuepl 184 113 0 104 4 0 4 4 0 8 3 pipepl 304 128 0 101 3 0 3 3 0 8 0 fdescpl 448 516 0 487 5 0 5 5 0 8 1 filepl 120 2255 0 2043 11 0 11 11 0 8 3 lockfpl 104 65 0 60 1 0 1 1 0 8 0 lockfspl 48 23 0 19 1 0 1 1 0 8 0 sessionpl 144 28 0 18 1 0 1 1 0 8 0 pgrppl 48 38 0 20 1 0 1 1 0 8 0 ucredpl 104 192 0 180 1 0 1 1 0 8 0 zombiepl 144 488 0 487 1 0 1 1 0 8 0 processpl 1152 529 0 487 4 0 4 4 0 8 0 procpl 664 684 0 635 6 0 6 6 0 8 1 sockpl 552 339 0 311 7 0 7 7 0 8 4 mcl64k 65536 5 0 5 1 0 1 1 0 8 1 mcl8k 8192 6 0 6 1 0 1 1 0 8 1 mcl4k 4096 2632 0 2581 14 0 14 14 0 8 7 mcl2k 2048 206 0 205 1 0 1 1 0 8 0 mtagpl 96 5 0 4 1 0 1 1 0 8 0 mbufpl 256 5310 0 5158 11 0 11 11 0 8 0 bufpl 272 2491 0 102 160 0 160 160 0 8 0 anonpl 24 96668 0 93532 45 0 45 45 0 187 22 amapchunkpl 152 11434 0 10989 30 0 30 30 0 158 11 amappl16 200 1541 0 1514 11 0 11 11 0 8 8 amappl15 192 4 0 4 1 0 1 1 0 8 1 amappl14 184 452 0 451 1 0 1 1 0 8 0 amappl13 176 114 0 104 1 0 1 1 0 8 0 amappl12 168 758 0 729 2 0 2 2 0 8 0 amappl11 160 7 0 7 1 0 1 1 0 8 1 amappl10 152 59 0 49 1 0 1 1 0 8 0 amappl9 144 274 0 274 1 0 1 1 0 8 1 amappl8 136 91 0 90 1 0 1 1 0 8 0 amappl7 128 160 0 149 1 0 1 1 0 8 0 amappl6 120 150 0 148 1 0 1 1 0 8 0 amappl5 112 89 0 81 1 0 1 1 0 8 0 amappl4 104 264 0 248 1 0 1 1 0 8 0 amappl3 96 2007 0 1902 3 0 3 3 0 8 0 amappl2 88 523 0 467 2 0 2 2 0 8 0 amappl1 80 10660 0 10108 13 0 13 13 0 8 1 amappl 88 3138 0 2988 4 0 4 4 0 92 0 uvmvnodes 80 103 0 0 3 0 3 3 0 8 0 dma65536 65536 1 0 1 1 0 1 1 0 8 1 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 5 0 0 1 0 1 1 0 8 0 uaddrrnd 24 516 0 487 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 516 0 487 1 0 1 1 0 8 0 vmmpekpl 168 6043 0 6011 2 0 2 2 0 8 0 vmmpepl 168 41755 0 39986 88 0 88 88 0 357 8 vmsppl 368 515 0 487 4 0 4 4 0 8 1 rwobjpl 40 14857 0 13914 12 0 12 12 0 8 1 pdppl 4096 1038 0 974 94 28 66 80 0 8 2 pvpl 32 242051 0 233424 105 0 105 105 0 265 26 pmappl 216 515 0 487 3 0 3 3 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 520 0 28 15 0 15 15 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:438 panic(ffffffff8340eae2) at panic+0x1cf sys/kern/subr_prf.c:198 ffs2_balloc(fffff6806bc32600,6001000003,1,fffff68007ffd820,1,ffff8000338cd740) at ffs2_balloc+0x1965 ffs_truncate(fffff6806bc32600,6001000004,0,fffff68007ffd820) at ffs_truncate+0x4f8 sys/ufs/ffs/ffs_inode.c:217 ufs_setattr(ffff8000338cd860) at ufs_setattr+0x8e0 sys/ufs/ufs/ufs_vnops.c:403 VOP_SETATTR(fffff68068e5a2e8,ffff8000338cd8e8,fffff68007ffd820,ffff80002a764d10) at VOP_SETATTR+0x112 sys/kern/vfs_vops.c:210 dotruncate(ffff80002a764d10,fffff68068e5a2e8,6001000004) at dotruncate+0x1da sys/kern/vfs_syscalls.c:2811 sys_truncate(ffff80002a764d10,ffff8000338cdbb0,ffff8000338cdb00) at sys_truncate+0x13e sys/kern/vfs_syscalls.c:2835 syscall(ffff8000338cdbb0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff8000338cdbb0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x40f6974d070, count: -10 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8340eae2) at panic+0x1cf sys/kern/subr_prf.c:198 ffs2_balloc(fffff6806bc32600,6001000003,1,fffff68007ffd820,1,ffff8000338cd740) at ffs2_balloc+0x1965 ffs_truncate(fffff6806bc32600,6001000004,0,fffff68007ffd820) at ffs_truncate+0x4f8 sys/ufs/ffs/ffs_inode.c:217 ufs_setattr(ffff8000338cd860) at ufs_setattr+0x8e0 sys/ufs/ufs/ufs_vnops.c:403 VOP_SETATTR(fffff68068e5a2e8,ffff8000338cd8e8,fffff68007ffd820,ffff80002a764d10) at VOP_SETATTR+0x112 sys/kern/vfs_vops.c:210 dotruncate(ffff80002a764d10,fffff68068e5a2e8,6001000004) at dotruncate+0x1da sys/kern/vfs_syscalls.c:2811 sys_truncate(ffff80002a764d10,ffff8000338cdbb0,ffff8000338cdb00) at sys_truncate+0x13e sys/kern/vfs_syscalls.c:2835 syscall(ffff8000338cdbb0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff8000338cdbb0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x40f6974d070, count: -10