panic: chgproccnt: procs < 0 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *380808 13515 0 0x10 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8354286e) at panic+0x1cf sys/kern/subr_prf.c:198 chgproccnt(ee00,ffffffff) at chgproccnt+0xcc sys_setuid(ffff80002a7914e0,ffff8000320cff30,ffff8000320cfe80) at sys_setuid+0x2d7 sys/kern/kern_prot.c:746 syscall(ffff8000320cff30) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff8000320cff30) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x37c3a640570, 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(ffffffff8354286e) at panic+0x1cf sys/kern/subr_prf.c:198 chgproccnt(ee00,ffffffff) at chgproccnt+0xcc sys_setuid(ffff80002a7914e0,ffff8000320cff30,ffff8000320cfe80) at sys_setuid+0x2d7 sys/kern/kern_prot.c:746 syscall(ffff8000320cff30) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff8000320cff30) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x37c3a640570, count: -6 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000320cfd20 rbx 0 rdx 0xffff80000163ff00 rcx 0 rax 0xffff80002a7914e0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x17d4d2e7c0c23396 r11 0xb6a8feda87c0f892 r12 0 r13 0xffffee8007ffd548 r14 0 r15 0x1 rip 0xffffffff83404d45 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff8000320cfd10 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=380808 pid=13515 tcnt=5 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=0xffff80002a790fb0,0xffff80002a74a028 process=0xffff8000364cf1f0 user=0xffff8000320ca000, vmspace=0xffffee806ffccb88 estcpu=34, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 13515 226685 44005 0 2 0x10 0 syz-executor *13515 380808 44005 0 7 0x10 0x4000000 syz-executor 13515 11308 44005 0 3 0x10 0x4000080 fsleep syz-executor 13515 12773 44005 0 2 0x10 0x4000000 syz-executor 13515 320584 44005 0 3 0x10 0x4000080 fsleep syz-executor 85773 414835 64794 0 3 0x2 0x80 piperd syz-executor 83340 24368 64794 0 3 0x2 0x80 piperd syz-executor 7148 150179 64794 0 3 0x2 0x80 piperd syz-executor 2603 320194 91382 0 3 0x100002 0x80 sbwait ndp 91382 368128 55787 0 3 0x100002 0x88 sigsusp sh 55787 235828 64794 0 3 0x2 0x80 wait syz-executor 44005 392518 64794 0 3 0x2 0x80 nanoslp syz-executor 11580 10066 64794 0 3 0x2 0x80 piperd syz-executor 71848 61238 0 0 3 0x14000 0x280 nfsidl nfsio 75499 382325 0 0 3 0x14000 0x280 nfsidl nfsio 49974 289435 0 0 3 0x14000 0x280 nfsidl nfsio 44094 442732 0 0 3 0x14000 0x280 nfsidl nfsio 40725 259916 0 0 3 0x14000 0x280 nfsidl nfsio 38770 95370 0 0 3 0x14000 0x280 nfsidl nfsio 38759 462264 0 0 3 0x14000 0x280 nfsidl nfsio 41021 210229 0 0 3 0x14000 0x280 nfsidl nfsio 51591 164788 0 0 3 0x14000 0x280 nfsidl nfsio 11320 342458 0 0 3 0x14000 0x280 nfsidl nfsio 39465 131378 0 0 3 0x14000 0x280 nfsidl nfsio 98878 91773 0 0 3 0x14000 0x280 nfsidl nfsio 20014 310375 0 0 3 0x14000 0x280 nfsidl nfsio 56994 327103 0 0 3 0x14000 0x280 nfsidl nfsio 24693 376410 0 0 3 0x14000 0x280 nfsidl nfsio 92814 268049 0 0 3 0x14000 0x280 nfsidl nfsio 92755 416210 0 0 3 0x14000 0x280 nfsidl nfsio 92476 450720 0 0 3 0x14000 0x280 nfsidl nfsio 85859 461624 0 0 3 0x14000 0x280 nfsidl nfsio 52658 23210 0 0 3 0x14000 0x280 nfsidl nfsio 64794 477854 24700 0 3 0x2 0x80 nanoslp syz-executor 24700 254616 75990 0 3 0x100002 0x88 sigsusp ksh 75990 503146 21968 0 3 0x10 0x88 kqread sshd-session 21968 217341 60007 0 3 0x12 0x80 kqread sshd-session 50662 460983 1 0 3 0x100003 0x80 ttyin getty 60007 323832 1 0 3 0 0x88 kqread sshd 10031 225063 21008 73 3 0x1100010 0x80 kqread syslogd 21008 269057 1 0 3 0x100002 0x80 sbwait syslogd 49870 46390 1 0 3 0x100000 0x80 kqread resolvd 16915 458376 60796 77 3 0x100012 0x80 kqread dhcpleased 81021 303689 60796 77 3 0x100012 0x80 kqread dhcpleased 60796 47900 1 0 3 0 0x80 kqread dhcpleased 30275 414844 0 0 3 0x14000 0x200 bored smr 22773 501745 0 0 2 0x14000 0x200 zerothread 89452 153728 0 0 3 0x14000 0x200 aiodoned aiodoned 19797 482855 0 0 3 0x14000 0x200 syncer update 10687 55727 0 0 3 0x14000 0x200 cleaner cleaner 55624 485116 0 0 3 0x14000 0x200 reaper reaper 23910 45278 0 0 3 0x14000 0x200 pgdaemon pagedaemon 93963 393952 0 0 3 0x14000 0x200 bored viomb 26541 49438 0 0 3 0x14000 0x40000200 acpi0 acpi0 64774 409212 0 0 3 0x14000 0x200 bored softnet0 5049 310087 0 0 3 0x14000 0x200 bored systqmp 52850 356277 0 0 3 0x14000 0x200 bored systq 53253 112295 0 0 3 0x14000 0x40000200 tmoslp softclock 92044 499082 0 0 3 0x14000 0x40000200 idle0 1 28067 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 11028 12102K 12177K 166960K 12382 0 pcb 17 12K 12K 166960K 56 0 rtable 221 6K 7K 166960K 1423 0 pf 28 12K 19K 166960K 241 0 ifaddr 39 7K 8K 166960K 186 0 ifgroup 46 2K 2K 166960K 190 0 sysctl 1 1K 9K 166960K 7 0 counters 32 17K 17K 166960K 69 0 ioctlops 0 0K 4K 166960K 91 0 iov 0 0K 12K 166960K 9 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1359 85K 86K 166960K 1907 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 9 0K 0K 166960K 10 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1734 201K 291K 166960K 11964 0 file desc 12 41K 97K 166960K 788 0 sigio 0 0K 0K 166960K 3 0 proc 61 59K 91K 166960K 1481 0 subproc 63 3K 4K 166960K 378 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 8 0 in_multi 88 5K 6K 166960K 477 0 ether_multi 1 0K 0K 166960K 2 0 mrt 0 0K 0K 166960K 16 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 61 281K 281K 166960K 61 0 exec 0 0K 2K 166960K 825 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 180 151K 167K 166960K 7099 0 UVM aobj 7 2K 2K 166960K 9 0 pinsyscall 34 68K 98K 166960K 2771 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 16 0K 2K 166960K 131 0 temp 36 9118K 9184K 166960K 15338 0 kqueue 13 20K 26K 166960K 46 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 118 0 114 1 0 1 1 0 8 0 rtentry 136 485 0 386 4 0 4 4 0 8 0 unpcb 144 86 0 69 1 0 1 1 0 8 0 syncache 336 7 0 7 2 1 1 1 0 8 1 tcpqe 32 2 0 2 1 1 0 1 0 8 0 tcpcb 736 41 0 35 1 0 1 1 0 8 0 arp 96 86 0 70 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 306 0 297 3 1 2 2 0 8 1 ip6q 80 2 0 0 1 0 1 1 0 8 0 ip6af 40 1 0 0 1 0 1 1 0 8 0 nd6 112 126 0 106 1 0 1 1 0 8 0 kcovpl 48 42 0 35 1 0 1 1 0 8 0 ppxss 1072 2 0 2 1 1 0 1 0 8 0 pfanchor 1288 4 0 0 1 0 1 1 0 8 0 pfrule 1360 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 1961 0 1547 35 6 29 32 0 8 3 art_table 40 1962 0 1547 6 0 6 6 0 8 1 art_node 32 485 0 396 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 72 8 0 1 1 0 1 1 0 8 0 shmpl 120 6 0 2 1 0 1 1 0 8 0 dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 1960 0 418 97 0 97 97 0 8 0 ffsino 256 1960 0 418 97 0 97 97 0 8 0 nchpl 144 2358 0 539 68 0 68 68 0 8 0 vnodes 216 2472 0 0 138 0 138 138 0 8 0 namei 1024 11902 0 11902 6 3 3 4 0 8 3 kstatmem 264 95 0 74 2 0 2 2 0 8 0 scsiplug 72 1 0 1 1 1 0 1 0 8 0 scxspl 216 7774 0 7774 10 2 8 8 1 8 8 plimitpl 152 78 0 63 1 0 1 1 0 8 0 sigapl 424 1034 0 977 9 1 8 8 0 8 0 knotepl 120 6567 0 6520 10 6 4 10 0 8 2 kqueuepl 184 60 0 51 1 0 1 1 0 8 0 pipepl 304 237 0 210 3 0 3 3 0 8 0 fdescpl 448 1001 0 977 5 1 4 5 0 8 0 filepl 120 3539 0 3347 9 0 9 9 0 8 1 lockfpl 104 59 0 57 1 0 1 1 0 8 0 lockfspl 48 28 0 26 1 0 1 1 0 8 0 sessionpl 144 105 0 97 1 0 1 1 0 8 0 pgrppl 48 150 0 135 1 0 1 1 0 8 0 ucredpl 104 426 0 413 1 0 1 1 0 8 0 zombiepl 144 1112 0 1111 1 0 1 1 0 8 0 processpl 1160 1034 0 977 5 0 5 5 0 8 0 procpl 664 1360 0 1299 7 0 7 7 0 8 0 sosppl 176 3 0 3 2 1 1 1 0 8 1 sockpl 552 514 0 484 3 0 3 3 0 8 0 mcl64k 65536 6 0 5 2 1 1 1 0 8 0 mcl9k128 9344 2 0 2 2 1 1 1 0 8 1 mcl8k 8192 6 0 6 2 1 1 1 0 8 1 mcl4k 4096 2644 0 2583 14 5 9 13 0 8 1 mcl2k 2048 836 0 835 5 1 4 4 0 8 3 mextrefs 64 463 0 463 2 1 1 1 0 8 1 mtagpl 96 4 0 4 1 1 0 1 0 8 0 mbufpl 256 9538 0 9388 18 1 17 17 0 8 3 bufpl 272 2557 0 102 164 0 164 164 0 8 0 anonpl 24 139255 0 136433 67 22 45 45 0 187 19 amapchunkpl 152 19520 0 19195 29 4 25 25 0 158 10 amappl16 200 1999 0 1984 26 16 10 14 0 8 8 amappl15 192 2 0 2 2 1 1 1 0 8 1 amappl14 184 819 0 817 1 0 1 1 0 8 0 amappl13 176 185 0 174 1 0 1 1 0 8 0 amappl12 168 1371 0 1348 2 0 2 2 0 8 0 amappl11 160 11 0 10 1 0 1 1 0 8 0 amappl10 152 58 0 48 1 0 1 1 0 8 0 amappl9 144 273 0 273 1 1 0 1 0 8 0 amappl8 136 229 0 228 1 0 1 1 0 8 0 amappl7 128 209 0 196 1 0 1 1 0 8 0 amappl6 120 486 0 484 1 0 1 1 0 8 0 amappl5 112 90 0 83 1 0 1 1 0 8 0 amappl4 104 361 0 342 1 0 1 1 0 8 0 amappl3 96 3605 0 3539 3 0 3 3 0 8 0 amappl2 88 996 0 930 2 0 2 2 0 8 0 amappl1 80 15068 0 14518 15 2 13 14 0 8 0 amappl 88 5810 0 5697 4 0 4 4 0 92 0 uvmvnodes 80 106 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 7 0 7 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 2 1 1 1 0 8 1 dma16 16 19 0 18 1 0 1 1 0 8 0 aobjpl 72 8 0 2 1 0 1 1 0 8 0 uaddrrnd 24 1001 0 977 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1001 0 977 1 0 1 1 0 8 0 vmmpekpl 168 9614 0 9557 5 1 4 4 0 8 0 vmmpepl 168 73051 0 71550 104 13 91 91 0 357 12 vmsppl 368 1000 0 977 5 1 4 4 0 8 1 rwobjpl 40 23371 0 22439 15 2 13 13 0 8 1 pdppl 4096 2008 0 1954 132 66 66 82 0 8 12 pvpl 32 386610 0 379274 133 31 102 103 0 265 26 pmappl 216 1000 0 977 3 1 2 3 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 593 0 90 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(ffffffff8354286e) at panic+0x1cf sys/kern/subr_prf.c:198 chgproccnt(ee00,ffffffff) at chgproccnt+0xcc sys_setuid(ffff80002a7914e0,ffff8000320cff30,ffff8000320cfe80) at sys_setuid+0x2d7 sys/kern/kern_prot.c:746 syscall(ffff8000320cff30) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff8000320cff30) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x37c3a640570, 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(ffffffff8354286e) at panic+0x1cf sys/kern/subr_prf.c:198 chgproccnt(ee00,ffffffff) at chgproccnt+0xcc sys_setuid(ffff80002a7914e0,ffff8000320cff30,ffff8000320cfe80) at sys_setuid+0x2d7 sys/kern/kern_prot.c:746 syscall(ffff8000320cff30) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff8000320cff30) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x37c3a640570, count: -6