panic: chgproccnt: procs < 0 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *433492 19480 0 0x10 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8349ad05) at panic+0x1cf sys/kern/subr_prf.c:198 chgproccnt(ee00,ffffffff) at chgproccnt+0xcc sys_setresuid(ffff80002a786548,ffff80002f0cd8d0,ffff80002f0cd820) at sys_setresuid+0x576 sys/kern/kern_prot.c:421 syscall(ffff80002f0cd8d0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002f0cd8d0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xec444a1e6c0, 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(ffffffff8349ad05) at panic+0x1cf sys/kern/subr_prf.c:198 chgproccnt(ee00,ffffffff) at chgproccnt+0xcc sys_setresuid(ffff80002a786548,ffff80002f0cd8d0,ffff80002f0cd820) at sys_setresuid+0x576 sys/kern/kern_prot.c:421 syscall(ffff80002f0cd8d0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002f0cd8d0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xec444a1e6c0, count: -6 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002f0cd6b0 rbx 0xfffffd8007ffd068 rdx 0xffff8000015ac940 rcx 0 rax 0xffff80002a786548 r8 0x101010101010101 r9 0x8080808080808080 r10 0x7ff181d9facb6d67 r11 0x387e8aeebf6bb1d6 r12 0 r13 0xee01 __ALIGN_SIZE+0xde01 r14 0 r15 0x1 rip 0xffffffff82a6e045 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002f0cd6a0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=433492 pid=19480 tcnt=4 stat=onproc flags process=10 proc=4000000 runpri=75, usrpri=75, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a786018,0xffff80002a7a1ca8 process=0xffff8000ffffb198 user=0xffff80002f0c8000, vmspace=0xfffffd806cb3ee70 estcpu=25, cpticks=1, pctcpu=0.1, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 87917 146385 28958 0 2 0 syz-executor 87917 470437 28958 0 3 0x4000080 fsleep syz-executor 87917 381663 28958 0 3 0x4000080 fsleep syz-executor 36644 81750 45779 0 2 0 syz-executor 36644 487378 45779 0 3 0x4000080 fsleep syz-executor 587 496645 2021 0 2 0x2 ndp 2021 321882 95563 0 3 0x10008a sigsusp sh 66233 422426 58863 0 2 0x10 syz-executor 66233 2472 58863 0 2 0x4000010 syz-executor 73972 57620 14035 0 2 0 syz-executor 73972 321020 14035 0 3 0x4000080 fsleep syz-executor 73972 116032 14035 0 3 0x4000080 fsleep syz-executor 46127 392709 26907 0 2 0 syz-executor 46127 375232 26907 0 3 0x4000080 kqsel syz-executor 46127 440726 26907 0 2 0x4000000 syz-executor 46127 103211 26907 0 3 0x4000080 fsleep syz-executor 35146 422387 14261 0 2 0 syz-executor 35146 361482 14261 0 2 0x4000000 syz-executor 35146 186725 14261 0 3 0x4000000 inode syz-executor 19480 313803 1473 0 2 0x10 syz-executor *19480 433492 1473 0 7 0x4000010 syz-executor 19480 504022 1473 0 3 0x4000090 fsleep syz-executor 19480 297854 1473 0 2 0x4000010 syz-executor 95563 456986 9781 0 3 0x82 wait syz-executor 46546 375979 0 0 3 0x14200 acct acct 58863 130090 9781 0 3 0x82 nanoslp syz-executor 14035 299005 9781 0 3 0x82 nanoslp syz-executor 28958 92770 9781 0 3 0x82 nanoslp syz-executor 26907 290043 9781 0 3 0x82 nanoslp syz-executor 14261 106070 9781 0 3 0x82 nanoslp syz-executor 1473 342812 9781 0 3 0x82 nanoslp syz-executor 45779 84530 9781 0 3 0x82 nanoslp syz-executor 9781 498128 23957 0 3 0x82 kqread syz-executor 23957 71925 39749 0 3 0x10008a sigsusp ksh 39749 137126 66465 0 3 0x98 kqread sshd-session 66465 96375 62057 0 3 0x92 kqread sshd-session 99580 513346 1 0 3 0x100083 ttyin getty 62057 307654 1 0 3 0x88 kqread sshd 94977 501388 73578 73 3 0x1100090 kqread syslogd 73578 516165 1 0 3 0x100082 sbwait syslogd 84048 13682 1 0 3 0x100080 kqread resolvd 45663 415480 50936 77 3 0x100092 kqread dhcpleased 80806 226832 50936 77 3 0x100092 kqread dhcpleased 50936 366986 1 0 3 0x80 kqread dhcpleased 45243 441498 0 0 3 0x14200 bored smr 24543 258345 0 0 2 0x14200 zerothread 30230 180967 0 0 3 0x14200 aiodoned aiodoned 69331 445897 0 0 3 0x14200 syncer update 18880 416057 0 0 3 0x14200 cleaner cleaner 80211 259602 0 0 3 0x14200 reaper reaper 45403 355631 0 0 3 0x14200 pgdaemon pagedaemon 51409 444178 0 0 3 0x14200 bored viomb 75847 189039 0 0 3 0x40014200 acpi0 acpi0 81010 157729 0 0 3 0x14200 bored softnet0 78662 55068 0 0 3 0x14200 bored systqmp 97866 201389 0 0 3 0x14200 bored systq 69401 9384 0 0 3 0x40014200 tmoslp softclock 6638 32557 0 0 3 0x40014200 idle0 1 74275 0 0 3 0x82 wait init 0 0 -1 0 3 0x10010200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11034 12103K 12654K 166960K 12813 0 pcb 17 16K 18K 166960K 110 0 rtable 232 7K 10K 166960K 888 0 pf 29 12K 17K 166960K 110 0 ifaddr 39 7K 7K 166960K 125 0 ifgroup 43 1K 2K 166960K 144 0 sysctl 3 1K 9K 166960K 7 0 counters 32 17K 17K 166960K 63 0 ioctlops 0 0K 4K 166960K 208 0 iov 0 0K 12K 166960K 11 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1355 85K 86K 166960K 1841 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 10 0 VM map 2 1K 1K 166960K 2 0 sem 12 1K 1K 166960K 63 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 19 69K 97K 166960K 717 0 sigio 0 0K 0K 166960K 2 0 proc 60 59K 124K 166960K 948 0 subproc 72 4K 4K 166960K 207 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 2 0K 0K 166960K 57 0 in_multi 89 6K 7K 166960K 280 0 ether_multi 1 0K 0K 166960K 3 0 mrt 0 0K 0K 166960K 20 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 79 360K 360K 166960K 79 0 exec 0 0K 1K 166960K 594 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 232 136K 153K 166960K 7368 0 UVM aobj 11 2K 2K 166960K 12 0 pinsyscall 40 80K 96K 166960K 2220 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 13 0 NDP 12 0K 2K 166960K 85 0 temp 57 9067K 9135K 166960K 15129 0 kqueue 13 20K 27K 166960K 100 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 86 0 83 1 0 1 1 0 8 0 rtentry 136 288 0 192 4 0 4 4 0 8 0 unpcb 144 522 0 505 9 3 6 6 0 8 5 syncache 336 8 0 8 3 2 1 1 0 8 1 tcpqe 32 1 0 1 1 0 1 1 0 8 1 tcpcb 736 234 0 228 13 12 1 13 0 8 0 arp 96 52 0 32 1 0 1 1 0 8 0 ipq 40 5 0 2 2 1 1 1 0 8 0 ipqe 40 12 0 9 2 1 1 1 0 8 0 inpcb 328 674 0 629 16 11 5 13 0 8 1 ip6q 72 1 0 1 1 1 0 1 0 8 0 ip6af 40 2 0 2 1 1 0 1 0 8 0 nd6 112 70 0 49 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 kcovpl 48 23 0 15 1 0 1 1 0 8 0 mppekey 1024 1 0 1 1 0 1 1 0 8 1 ppxss 1072 12 0 12 1 0 1 1 0 8 1 pppxif 1416 1 0 1 1 1 0 1 0 8 0 pfstscr 40 2 0 0 1 0 1 1 0 8 0 pfrktable 1344 9 0 9 1 0 1 1 0 8 1 pfsrclim 320 1 0 0 1 0 1 1 0 8 0 pfanchor 1288 2 0 2 1 0 1 1 0 8 1 pfstitem 24 1 0 0 1 0 1 1 0 8 0 pfstkey 128 3 0 2 1 0 1 1 0 8 0 pfstate 384 2 0 1 1 0 1 1 0 8 0 pfrule 1360 3 0 3 2 1 1 1 0 8 1 rttmr 136 1 0 1 1 0 1 1 0 8 1 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 1240 0 817 35 6 29 30 0 8 2 art_table 40 1243 0 817 5 0 5 5 0 8 0 art_node 32 287 0 201 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 9 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 28 0 18 1 0 1 1 0 8 0 shmpl 112 9 0 1 1 0 1 1 0 8 0 dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 2245 0 763 93 0 93 93 0 8 0 ffsino 256 2245 0 763 93 0 93 93 0 8 0 nchpl 144 2954 0 1219 65 0 65 65 0 8 0 vnodes 216 2676 0 0 149 0 149 149 0 8 0 namei 1024 10888 0 10886 6 3 3 3 0 8 2 pfiaddrpl 120 3 0 3 1 0 1 1 0 8 1 kstatmem 264 79 0 58 2 0 2 2 0 8 0 scsiplug 72 4 0 4 1 0 1 1 0 8 1 scxspl 216 9718 0 9718 10 2 8 8 1 8 8 plimitpl 152 117 0 99 1 0 1 1 0 8 0 sigapl 424 987 0 942 6 0 6 6 0 8 0 knotepl 120 18032 0 17985 30 20 10 16 0 8 8 kqueuepl 184 198 0 188 4 3 1 4 0 8 0 pipepl 304 190 0 163 3 0 3 3 0 8 0 fdescpl 448 972 0 941 5 1 4 5 0 8 0 filepl 120 4655 0 4409 16 5 11 12 0 8 3 lockfpl 104 253 0 251 1 0 1 1 0 8 0 lockfspl 48 112 0 110 1 0 1 1 0 8 0 sessionpl 144 112 0 104 1 0 1 1 0 8 0 pgrppl 48 135 0 119 1 0 1 1 0 8 0 ucredpl 104 540 0 524 1 0 1 1 0 8 0 zombiepl 144 1098 0 1098 2 1 1 1 0 8 1 processpl 1152 987 0 942 4 0 4 4 0 8 0 procpl 664 1607 0 1548 7 1 6 6 0 8 0 sosppl 176 5 0 5 2 1 1 1 0 8 1 sockpl 552 1296 0 1231 23 12 11 13 0 8 6 mcl64k 65536 30 0 28 3 2 1 1 0 8 0 mcl8k 8192 10 0 9 2 1 1 1 0 8 0 mcl4k 4096 2984 0 2935 13 5 8 12 0 8 0 mcl2k 2048 872 0 868 7 5 2 6 0 8 1 mtagpl 96 82 0 10 2 0 2 2 0 8 0 mbufpl 256 9596 0 9353 26 6 20 22 0 8 1 bufpl 280 3134 0 103 217 0 217 217 0 8 0 anonpl 24 147778 0 144461 35 3 32 32 0 187 8 amapchunkpl 152 21899 0 21401 25 1 24 24 0 158 4 amappl16 200 2357 0 2326 6 3 3 5 0 8 0 amappl15 192 6 0 6 1 1 0 1 0 8 0 amappl14 184 595 0 593 1 0 1 1 0 8 0 amappl13 176 149 0 139 1 0 1 1 0 8 0 amappl12 168 1275 0 1245 2 0 2 2 0 8 0 amappl11 160 6 0 6 1 1 0 1 0 8 0 amappl10 152 58 0 48 1 0 1 1 0 8 0 amappl9 144 283 0 283 1 1 0 1 0 8 0 amappl8 136 167 0 165 1 0 1 1 0 8 0 amappl7 128 174 0 162 1 0 1 1 0 8 0 amappl6 120 301 0 299 1 0 1 1 0 8 0 amappl5 112 101 0 94 1 0 1 1 0 8 0 amappl4 104 320 0 303 1 0 1 1 0 8 0 amappl3 96 4429 0 4314 5 1 4 4 0 8 1 amappl2 88 659 0 603 2 0 2 2 0 8 0 amappl1 80 13463 0 12901 17 2 15 15 0 8 2 amappl 88 6365 0 6196 5 1 4 5 0 92 0 uvmvnodes 80 105 0 0 3 0 3 3 0 8 0 dma65536 65536 3 0 3 1 1 0 1 0 8 0 dma4096 4096 2 0 2 2 2 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 256 0 256 2 1 1 1 0 8 1 dma64 64 7 0 7 2 1 1 1 0 8 1 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 11 0 1 1 0 1 1 0 8 0 uaddrrnd 24 972 0 941 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 972 0 941 1 0 1 1 0 8 0 vmmpekpl 168 9268 0 9228 3 0 3 3 0 8 0 vmmpepl 168 69495 0 67652 95 8 87 91 0 357 6 vmsppl 368 971 0 941 4 1 3 4 0 8 0 rwobjpl 40 21711 0 20712 13 1 12 12 0 8 0 pdppl 4096 1950 0 1882 124 56 68 82 0 8 0 pvpl 32 405027 0 396448 92 3 89 89 0 265 15 pmappl 216 971 0 941 3 1 2 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 441 0 105 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:438 panic(ffffffff8349ad05) at panic+0x1cf sys/kern/subr_prf.c:198 chgproccnt(ee00,ffffffff) at chgproccnt+0xcc sys_setresuid(ffff80002a786548,ffff80002f0cd8d0,ffff80002f0cd820) at sys_setresuid+0x576 sys/kern/kern_prot.c:421 syscall(ffff80002f0cd8d0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002f0cd8d0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xec444a1e6c0, 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(ffffffff8349ad05) at panic+0x1cf sys/kern/subr_prf.c:198 chgproccnt(ee00,ffffffff) at chgproccnt+0xcc sys_setresuid(ffff80002a786548,ffff80002f0cd8d0,ffff80002f0cd820) at sys_setresuid+0x576 sys/kern/kern_prot.c:421 syscall(ffff80002f0cd8d0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002f0cd8d0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xec444a1e6c0, count: -6