panic: chgproccnt: procs < 0 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *191654 89387 0 0x10 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff835379d4) at panic+0x1cf sys/kern/subr_prf.c:198 chgproccnt(ee00,ffffffff) at chgproccnt+0xcc sys_setreuid(ffff80002a795a08,ffff80003c5bde80,ffff80003c5bddd0) at sys_setreuid+0x593 sys/kern/kern_prot.c:688 syscall(ffff80003c5bde80) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c5bde80) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x68abd46f080, 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> show kasan No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff835379d4) at panic+0x1cf sys/kern/subr_prf.c:198 chgproccnt(ee00,ffffffff) at chgproccnt+0xcc sys_setreuid(ffff80002a795a08,ffff80003c5bde80,ffff80003c5bddd0) at sys_setreuid+0x593 sys/kern/kern_prot.c:688 syscall(ffff80003c5bde80) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c5bde80) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x68abd46f080, count: -6 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003c5bdc60 rbx 0xfffff60007ffd2d8 rdx 0xffff8000015ec840 rcx 0 rax 0xffff80002a795a08 r8 0x101010101010101 r9 0x8080808080808080 r10 0x9eb30300e2c43b31 r11 0x2d635dc7a0e5b6a2 r12 0 r13 0xfffff60007ffd1a0 r14 0 r15 0x1 rip 0xffffffff824e2de5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c5bdc50 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=191654 pid=89387 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=0xffff80002a794a78,0xffff80002a75da10 process=0xffff80002a7c5b50 user=0xffff80003c5b8000, vmspace=0xfffff6007f21b8a0 estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 50528 409435 97800 0 2 0x1 0 syz-executor 50528 82528 97800 0 3 0x1 0x4000080 fsleep syz-executor 2967 172748 60237 0 3 0x2 0 clonelk ifconfig 60237 383617 94337 0 3 0x100002 0x88 sigsusp sh 89387 328300 41071 0 2 0x10 0 syz-executor *89387 191654 41071 0 7 0x10 0x4000000 syz-executor 89387 294576 41071 0 2 0x10 0x4000000 syz-executor 41199 169207 3777 0 2 0 0 syz-executor 41199 8214 3777 0 3 0 0x4000080 wsevent_r syz-executor 94337 468647 6336 0 3 0x2 0x80 wait syz-executor 4493 323812 92698 0 3 0x2 0 clonelk ifconfig 92698 102602 29662 0 3 0x100002 0x88 sigsusp sh 29662 231521 6336 0 3 0x2 0x80 wait syz-executor 97800 422951 6336 0 3 0x2 0x80 nanoslp syz-executor 57760 256364 6336 0 3 0x2 0x80 piperd syz-executor 41071 36925 6336 0 3 0x2 0x80 nanoslp syz-executor 3777 492275 6336 0 3 0x2 0x80 nanoslp syz-executor 9930 401615 0 0 3 0x14000 0x280 nfsidl nfsio 9012 511674 0 0 3 0x14000 0x280 nfsidl nfsio 41690 474913 0 0 3 0x14000 0x280 nfsidl nfsio 56369 224031 0 0 3 0x14000 0x280 nfsidl nfsio 79073 9135 0 0 3 0x14000 0x280 nfsidl nfsio 86094 368395 0 0 3 0x14000 0x280 nfsidl nfsio 13545 462310 0 0 3 0x14000 0x280 nfsidl nfsio 81921 281052 0 0 3 0x14000 0x280 nfsidl nfsio 56206 361693 0 0 3 0x14000 0x280 nfsidl nfsio 58903 390442 0 0 3 0x14000 0x280 nfsidl nfsio 52885 341018 0 0 3 0x14000 0x280 nfsidl nfsio 57859 199485 0 0 3 0x14000 0x280 nfsidl nfsio 45788 96549 0 0 3 0x14000 0x280 nfsidl nfsio 61422 452663 0 0 3 0x14000 0x280 nfsidl nfsio 4942 508470 0 0 3 0x14000 0x280 nfsidl nfsio 56035 391891 0 0 3 0x14000 0x280 nfsidl nfsio 42903 83264 0 0 3 0x14000 0x280 nfsidl nfsio 81655 107050 0 0 3 0x14000 0x280 nfsidl nfsio 69049 42843 0 0 3 0x14000 0x280 nfsidl nfsio 81934 343917 0 0 3 0x14000 0x280 nfsidl nfsio 6336 281671 15655 0 3 0x2 0x80 wait syz-executor 15655 476073 7992 0 3 0x100002 0x88 sigsusp ksh 7992 207808 61748 0 3 0x10 0x88 kqread sshd-session 61748 508484 95744 0 3 0x12 0x80 kqread sshd-session 13048 84092 1 0 3 0x100003 0x80 ttyin getty 95744 163767 1 0 3 0 0x88 kqread sshd 55573 246975 18054 73 3 0x1100010 0x80 kqread syslogd 18054 129492 1 0 3 0x100002 0x80 sbwait syslogd-parent 36146 4584 1 0 3 0x100000 0x80 kqread resolvd 1609 158445 47208 77 3 0x100012 0x80 kqread dhcpleased 39122 356573 47208 77 3 0x100012 0x80 kqread dhcpleased 47208 350663 1 0 3 0 0x80 kqread dhcpleased 21391 288801 0 0 3 0x14000 0x200 bored smr 53725 448985 0 0 2 0x14000 0x200 zerothread 45994 267132 0 0 3 0x14000 0x200 aiodoned aiodoned 53100 139331 0 0 3 0x14000 0x200 syncer update 66330 76284 0 0 3 0x14000 0x200 cleaner cleaner 32311 3762 0 0 3 0x14000 0x200 reaper reaper 37658 265576 0 0 3 0x14000 0x200 pgdaemon pagedaemon 95362 446061 0 0 3 0x14000 0x200 bored viomb 51599 160555 0 0 3 0x14000 0x40000200 acpi0 acpi0 42492 458192 0 0 3 0x14000 0x200 bored softnet0 56853 405971 0 0 3 0x14000 0x200 smrbar systqmp 79259 307112 0 0 3 0x14000 0x200 bored systq 54495 227093 0 0 3 0x14000 0x40000200 tmoslp softclock 43062 418585 0 0 3 0x14000 0x40000200 idle0 1 219709 0 0 3 0x2 0x80 wait init 0 0 -1 0 3 0x10000 0x200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11024 12106K 12250K 166960K 12432 0 pcb 17 12K 12K 166960K 44 0 rtable 174 5K 7K 166960K 1480 0 pf 23 11K 16K 166960K 192 0 ifaddr 30 5K 7K 166960K 199 0 ifgroup 35 1K 2K 166960K 205 0 sysctl 1 1K 9K 166960K 5 0 counters 30 17K 18K 166960K 73 0 ioctlops 0 0K 4K 166960K 372 0 iov 0 0K 12K 166960K 14 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1361 86K 86K 166960K 1979 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 6 0 VM map 2 1K 1K 166960K 2 0 sem 7 0K 0K 166960K 9 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1734 201K 291K 166960K 11964 0 file desc 17 61K 93K 166960K 872 0 proc 74 75K 100K 166960K 1564 0 subproc 72 4K 4K 166960K 423 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 9 0 in_multi 66 4K 6K 166960K 507 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 21 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 73 334K 334K 166960K 73 0 exec 0 0K 1K 166960K 870 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 191 159K 167K 166960K 7719 0 UVM aobj 9 2K 2K 166960K 9 0 pinsyscall 38 76K 93K 166960K 2936 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 NDP 14 0K 2K 166960K 140 0 temp 35 9114K 9178K 166960K 14067 0 kqueue 15 24K 26K 166960K 61 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 117 0 114 1 0 1 1 0 8 0 rtentry 136 522 0 445 4 0 4 4 0 8 0 unpcb 144 146 0 129 1 0 1 1 0 8 0 syncache 336 5 0 5 2 1 1 1 0 8 1 tcpcb 736 39 0 35 1 0 1 1 0 8 0 arp 96 92 0 80 1 0 1 1 0 8 0 ipq 40 3 0 0 1 0 1 1 0 8 0 ipqe 40 4 0 1 1 0 1 1 0 8 0 inpcb 328 300 0 291 2 0 2 2 0 8 1 ip6q 80 2 0 1 1 0 1 1 0 8 0 ip6af 40 5 0 4 1 0 1 1 0 8 0 nd6 112 138 0 123 1 0 1 1 0 8 0 kcovpl 48 47 0 39 1 0 1 1 0 8 0 ppxss 1072 2 0 2 1 0 1 1 0 8 1 pppxif 1416 1 0 1 1 0 1 1 0 8 1 pfrule 1360 5 0 5 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 2101 0 1730 34 2 32 32 0 8 8 art_table 40 2102 0 1730 6 0 6 6 0 8 1 art_node 32 522 0 441 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 1 1 0 1 1 0 8 0 semapl 72 7 0 2 1 0 1 1 0 8 0 shmpl 120 6 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1959 0 417 97 0 97 97 0 8 0 ffsino 256 1959 0 417 97 0 97 97 0 8 0 nchpl 144 2403 0 566 69 0 69 69 0 8 0 vnodes 216 2560 0 0 143 0 143 143 0 8 0 namei 1024 12511 0 12511 6 4 2 4 0 8 2 kstatmem 264 101 0 84 2 0 2 2 0 8 0 scsiplug 72 1 0 1 1 0 1 1 0 8 1 scxspl 216 8127 0 8127 11 3 8 8 1 8 8 plimitpl 152 105 0 89 1 0 1 1 0 8 0 sigapl 424 1101 0 1039 8 0 8 8 0 8 0 knotepl 120 9196 0 9144 17 7 10 10 0 8 8 kqueuepl 184 99 0 87 1 0 1 1 0 8 0 pipepl 304 249 0 222 3 0 3 3 0 8 0 fdescpl 448 1068 0 1039 5 1 4 5 0 8 0 filepl 120 3860 0 3654 10 0 10 10 0 8 3 lockfpl 104 72 0 70 1 0 1 1 0 8 0 lockfspl 48 31 0 29 1 0 1 1 0 8 0 sessionpl 144 66 0 57 1 0 1 1 0 8 0 pgrppl 48 113 0 96 1 0 1 1 0 8 0 ucredpl 104 362 0 349 1 0 1 1 0 8 0 zombiepl 144 1227 0 1225 1 0 1 1 0 8 0 processpl 1160 1101 0 1039 5 0 5 5 0 8 0 procpl 664 1490 0 1424 7 0 7 7 0 8 0 sosppl 176 2 0 2 1 0 1 1 0 8 1 sockpl 552 571 0 542 3 0 3 3 0 8 0 mcl64k 65536 11 0 8 2 1 1 1 0 8 0 mcl8k 8192 16 0 16 2 1 1 1 0 8 1 mcl4k 4096 2745 0 2688 13 4 9 13 0 8 1 mcl2k 2048 1187 0 1187 3 1 2 2 0 8 2 mextrefs 64 201 0 201 2 1 1 1 0 8 1 mtagpl 96 4 0 4 1 1 0 1 0 8 0 mbufpl 256 9117 0 8997 19 1 18 19 0 8 8 bufpl 272 2807 0 88 182 0 182 182 0 8 0 anonpl 24 135253 0 132308 27 0 27 27 0 187 5 amapchunkpl 152 20772 0 20420 22 0 22 22 0 158 8 amappl16 200 1500 0 1490 8 2 6 6 0 8 4 amappl15 192 6 0 6 1 1 0 1 0 8 0 amappl14 184 851 0 847 1 0 1 1 0 8 0 amappl13 176 199 0 189 1 0 1 1 0 8 0 amappl12 168 1508 0 1482 2 0 2 2 0 8 0 amappl11 160 15 0 14 1 0 1 1 0 8 0 amappl10 152 58 0 50 1 0 1 1 0 8 0 amappl9 144 311 0 311 1 1 0 1 0 8 0 amappl8 136 236 0 232 1 0 1 1 0 8 0 amappl7 128 216 0 206 1 0 1 1 0 8 0 amappl6 120 337 0 333 1 0 1 1 0 8 0 amappl5 112 274 0 266 1 0 1 1 0 8 0 amappl4 104 374 0 360 1 0 1 1 0 8 0 amappl3 96 4331 0 4242 4 0 4 4 0 8 1 amappl2 88 588 0 537 2 0 2 2 0 8 0 amappl1 80 15651 0 15105 13 1 12 13 0 8 0 amappl 88 6390 0 6263 5 0 5 5 0 92 1 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 253 0 253 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 8 0 0 1 0 1 1 0 8 0 uaddrrnd 24 1068 0 1039 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1068 0 1039 1 0 1 1 0 8 0 vmmpekpl 168 9732 0 9679 3 0 3 3 0 8 0 vmmpepl 168 76894 0 75299 82 1 81 81 0 357 10 vmsppl 368 1067 0 1039 4 1 3 4 0 8 0 rwobjpl 40 23819 0 22901 11 0 11 11 0 8 0 pdppl 4096 2142 0 2078 134 66 68 80 0 8 4 pvpl 32 403203 0 395380 86 0 86 86 0 265 15 pmappl 216 1067 0 1039 3 0 3 3 0 8 1 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 609 0 85 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(ffffffff835379d4) at panic+0x1cf sys/kern/subr_prf.c:198 chgproccnt(ee00,ffffffff) at chgproccnt+0xcc sys_setreuid(ffff80002a795a08,ffff80003c5bde80,ffff80003c5bddd0) at sys_setreuid+0x593 sys/kern/kern_prot.c:688 syscall(ffff80003c5bde80) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c5bde80) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x68abd46f080, 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(ffffffff835379d4) at panic+0x1cf sys/kern/subr_prf.c:198 chgproccnt(ee00,ffffffff) at chgproccnt+0xcc sys_setreuid(ffff80002a795a08,ffff80003c5bde80,ffff80003c5bddd0) at sys_setreuid+0x593 sys/kern/kern_prot.c:688 syscall(ffff80003c5bde80) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c5bde80) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x68abd46f080, count: -6