panic: chgproccnt: procs < 0 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 23568 90284 0 0x10 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834a19e8) at panic+0x1cf sys/kern/subr_prf.c:198 chgproccnt(ee00,ffffffff) at chgproccnt+0xcc sys_setresuid(ffff80002f0c0fa8,ffff80003c925910,ffff80003c925860) at sys_setresuid+0x576 sys/kern/kern_prot.c:421 syscall(ffff80003c925910) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c925910) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4fc6a447920, count: 9 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: chgproccnt: procs < 0 ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834a19e8) at panic+0x1cf sys/kern/subr_prf.c:198 chgproccnt(ee00,ffffffff) at chgproccnt+0xcc sys_setresuid(ffff80002f0c0fa8,ffff80003c925910,ffff80003c925860) at sys_setresuid+0x576 sys/kern/kern_prot.c:421 syscall(ffff80003c925910) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c925910) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4fc6a447920, count: -6 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003c9256f0 rbx 0xfffffd8007ffd0d0 rdx 0 rcx 0 rax 0xffff80002f0c0fa8 r8 0x101010101010101 r9 0x8080808080808080 r10 0xfa4818d2e8cb6b24 r11 0x6948ad3464b23cf8 r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff825e18a5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c9256e0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=23568 pid=90284 tcnt=3 stat=onproc flags process=10 proc=4000000 runpri=50, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002f0c0d10,0xffff80002f0c1a18 process=0xffff8000ffff8918 user=0xffff80003c920000, vmspace=0xfffffd806cb1a5d0 estcpu=7, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 7334 298244 66111 0 2 0 syz-executor 7334 515600 66111 0 3 0x4000080 fsleep syz-executor 31371 329281 46535 0 2 0 syz-executor 31371 119499 46535 0 3 0x4000080 fsleep syz-executor 90284 347229 98599 0 2 0x10 syz-executor 90284 177058 98599 0 2 0x4000010 syz-executor *90284 23568 98599 0 7 0x4000010 syz-executor 90861 521037 98745 0 3 0x3000 suspend syz-executor 90861 382909 98745 0 2 0x4081000 syz-executor 90861 344391 98745 0 3 0x4081000 inode syz-executor 57737 148014 34979 0 3 0x82 nanoslp syz-executor 66111 31865 34979 0 3 0x82 nanoslp syz-executor 46535 290739 34979 0 3 0x82 nanoslp syz-executor 82908 228587 34979 0 2 0x2 syz-executor 58757 97234 34979 0 3 0x82 nanoslp syz-executor 98745 391953 34979 0 3 0x82 nanoslp syz-executor 22918 426209 34979 0 2 0x2 syz-executor 98599 264825 34979 0 3 0x82 nanoslp syz-executor 34979 206603 24569 0 3 0x82 kqread syz-executor 24569 496932 24278 0 3 0x10008a sigsusp ksh 24278 136500 83180 0 3 0x98 kqread sshd-session 83180 446824 69892 0 3 0x92 kqread sshd-session 92164 100614 1 0 3 0x100083 ttyopn getty 69892 477312 1 0 3 0x88 kqread sshd 59321 20240 45118 73 3 0x1100090 kqread syslogd 45118 9945 1 0 3 0x100082 sbwait syslogd 72551 138368 1 0 3 0x100080 kqread resolvd 6728 200438 4775 77 3 0x100092 kqread dhcpleased 43336 265337 4775 77 3 0x100092 kqread dhcpleased 4775 392866 1 0 3 0x80 kqread dhcpleased 96299 210101 0 0 3 0x14200 bored smr 31806 103520 0 0 2 0x14200 zerothread 10210 248068 0 0 3 0x14200 aiodoned aiodoned 22236 242350 0 0 3 0x14200 syncer update 84120 148658 0 0 3 0x14200 cleaner cleaner 12863 30186 0 0 3 0x14200 reaper reaper 60829 80339 0 0 3 0x14200 pgdaemon pagedaemon 7618 425031 0 0 3 0x14200 bored viomb 27610 264003 0 0 3 0x40014200 acpi0 acpi0 37304 226499 0 0 2 0x14200 softnet0 57211 213200 0 0 3 0x14200 bored systqmp 3532 105058 0 0 3 0x14200 bored systq 77014 76639 0 0 3 0x40014200 tmoslp softclock 68122 78620 0 0 3 0x40014200 idle0 1 328015 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 11047 12126K 12335K 166960K 12206 0 pcb 17 14K 16K 166960K 109 0 rtable 207 6K 7K 166960K 376 0 pf 34 13K 13K 166960K 38 0 ifaddr 38 6K 7K 166960K 47 0 ifgroup 58 2K 2K 166960K 60 0 sysctl 1 1K 9K 166960K 5 0 counters 35 18K 18K 166960K 36 0 ioctlops 0 0K 4K 166960K 44 0 iov 0 0K 12K 166960K 5 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1292 81K 82K 166960K 1504 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 4 0 VM map 2 1K 1K 166960K 2 0 sem 2 0K 0K 166960K 2 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 16 57K 89K 166960K 207 0 sigio 0 0K 0K 166960K 1 0 proc 60 59K 83K 166960K 504 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 13 0 in_multi 77 5K 7K 166960K 99 0 ether_multi 1 0K 0K 166960K 1 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 67 307K 307K 166960K 67 0 exec 0 0K 1K 166960K 401 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 209 142K 150K 166960K 3645 0 UVM aobj 8 4K 4K 166960K 8 0 pinsyscall 37 74K 96K 166960K 1291 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 4 0 NDP 13 0K 2K 166960K 30 0 temp 35 9066K 9130K 166960K 6847 0 kqueue 13 20K 27K 166960K 39 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 42 0 39 1 0 1 1 0 8 0 rtentry 136 112 0 23 4 0 4 4 0 8 0 unpcb 144 74 0 56 1 0 1 1 0 8 0 syncache 336 3 0 3 1 1 0 1 0 8 0 tcpcb 736 24 0 20 1 0 1 1 0 8 0 arp 96 18 0 4 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 209 0 202 7 6 1 7 0 8 0 ip6q 72 1 0 0 1 0 1 1 0 8 0 ip6af 40 1 0 0 1 0 1 1 0 8 0 nd6 112 25 0 6 1 0 1 1 0 8 0 pkpcb 40 1 0 1 1 1 0 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1072 1 0 1 1 1 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 464 0 88 29 3 26 29 0 8 0 art_table 40 465 0 88 5 0 5 5 0 8 0 art_node 32 112 0 31 1 0 1 1 0 8 0 shmpl 112 5 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1751 0 290 92 0 92 92 0 8 0 ffsino 256 1751 0 290 92 0 92 92 0 8 0 nchpl 144 2052 0 359 64 0 64 64 0 8 0 vnodes 216 1893 0 0 106 0 106 106 0 8 0 namei 1024 6336 0 6335 1 0 1 1 0 8 0 kstatmem 264 29 0 2 2 0 2 2 0 8 0 scsiplug 72 1 0 1 1 1 0 1 0 8 0 scxspl 216 8568 0 8568 3 2 1 3 1 8 1 plimitpl 152 43 0 26 1 0 1 1 0 8 0 sigapl 424 498 0 457 6 1 5 6 0 8 0 knotepl 120 17639 0 17592 23 14 9 17 0 8 6 kqueuepl 184 40 0 31 1 0 1 1 0 8 0 pipepl 304 122 0 95 3 0 3 3 0 8 0 fdescpl 448 485 0 457 5 1 4 5 0 8 0 filepl 120 2164 0 1952 10 2 8 10 0 8 0 lockfpl 104 98 0 96 1 0 1 1 0 8 0 lockfspl 48 17 0 15 1 0 1 1 0 8 0 sessionpl 144 57 0 49 1 0 1 1 0 8 0 pgrppl 48 65 0 49 1 0 1 1 0 8 0 ucredpl 104 352 0 338 1 0 1 1 0 8 0 zombiepl 144 466 0 463 1 0 1 1 0 8 0 processpl 1152 498 0 457 4 0 4 4 0 8 0 procpl 664 627 0 580 5 0 5 5 0 8 0 sockpl 552 326 0 298 7 4 3 7 0 8 0 mcl64k 65536 4 0 4 2 1 1 1 0 8 1 mcl16k 16384 2 0 2 1 1 0 1 0 8 0 mcl8k 8192 4 0 4 1 1 0 1 0 8 0 mcl4k 4096 2557 0 2501 14 6 8 14 0 8 0 mcl2k 2048 210 0 209 1 0 1 1 0 8 0 mtagpl 96 38 0 4 1 0 1 1 0 8 0 mbufpl 256 4849 0 4671 13 1 12 13 0 8 0 bufpl 280 3436 0 102 239 0 239 239 0 8 0 anonpl 24 106216 0 99374 43 0 43 43 0 187 0 amapchunkpl 152 10310 0 9873 21 1 20 21 0 158 0 amappl16 200 2133 0 1874 14 0 14 14 0 8 0 amappl15 192 7 0 7 1 1 0 1 0 8 0 amappl14 184 443 0 442 1 0 1 1 0 8 0 amappl13 176 110 0 100 1 0 1 1 0 8 0 amappl12 168 736 0 709 2 0 2 2 0 8 0 amappl11 160 7 0 7 1 1 0 1 0 8 0 amappl10 152 61 0 50 1 0 1 1 0 8 0 amappl9 144 263 0 263 1 1 0 1 0 8 0 amappl8 136 100 0 99 1 0 1 1 0 8 0 amappl7 128 135 0 124 1 0 1 1 0 8 0 amappl6 120 145 0 143 1 0 1 1 0 8 0 amappl5 112 88 0 81 1 0 1 1 0 8 0 amappl4 104 251 0 234 1 0 1 1 0 8 0 amappl3 96 1857 0 1757 3 0 3 3 0 8 0 amappl2 88 498 0 444 2 0 2 2 0 8 0 amappl1 80 9295 0 8755 13 1 12 13 0 8 0 amappl 88 2961 0 2813 4 0 4 4 0 92 0 uvmvnodes 80 102 0 0 3 0 3 3 0 8 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 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 7 0 0 1 0 1 1 0 8 0 uaddrrnd 24 485 0 457 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 485 0 457 1 0 1 1 0 8 0 vmmpekpl 168 5577 0 5541 2 0 2 2 0 8 0 vmmpepl 168 39002 0 37055 91 1 90 90 0 357 0 vmsppl 368 484 0 457 4 1 3 4 0 8 0 rwobjpl 40 14347 0 13176 13 0 13 13 0 8 0 pdppl 4096 976 0 914 98 32 66 78 0 8 4 pvpl 32 245324 0 233467 108 0 108 108 0 265 0 pmappl 216 484 0 457 2 0 2 2 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 362 0 50 10 0 10 10 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(ffffffff834a19e8) at panic+0x1cf sys/kern/subr_prf.c:198 chgproccnt(ee00,ffffffff) at chgproccnt+0xcc sys_setresuid(ffff80002f0c0fa8,ffff80003c925910,ffff80003c925860) at sys_setresuid+0x576 sys/kern/kern_prot.c:421 syscall(ffff80003c925910) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c925910) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4fc6a447920, count: -6 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834a19e8) at panic+0x1cf sys/kern/subr_prf.c:198 chgproccnt(ee00,ffffffff) at chgproccnt+0xcc sys_setresuid(ffff80002f0c0fa8,ffff80003c925910,ffff80003c925860) at sys_setresuid+0x576 sys/kern/kern_prot.c:421 syscall(ffff80003c925910) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c925910) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4fc6a447920, count: -6