panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *188788 63035 0 0x2 0 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:208 malloc(200000,2a,9) at malloc+0xa79 sys/kern/kern_malloc.c:242 kcovioctl(1b1300,80084b01,ffff8000149c8d40,3,ffff8000ffff2bd0) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149c8d40,3,ffff8000ffff2bd0) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd802e081830,80084b01,ffff8000149c8d40,3,fffffd803f7c6a80,ffff8000ffff2bd0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8039bbfa50,80084b01,ffff8000149c8d40,ffff8000ffff2bd0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff2bd0,ffff8000149c8e80,ffff8000149c8e70) at sys_ioctl+0x638 syscall(ffff8000149c8f20) at syscall+0x541 Xsyscall(6,36,7f7ffffc9eb8,36,3,1880923c890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc99d0, count: 6 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 malloc: out of space in kmem_map ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:208 malloc(200000,2a,9) at malloc+0xa79 sys/kern/kern_malloc.c:242 kcovioctl(1b1300,80084b01,ffff8000149c8d40,3,ffff8000ffff2bd0) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149c8d40,3,ffff8000ffff2bd0) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd802e081830,80084b01,ffff8000149c8d40,3,fffffd803f7c6a80,ffff8000ffff2bd0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8039bbfa50,80084b01,ffff8000149c8d40,ffff8000ffff2bd0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff2bd0,ffff8000149c8e80,ffff8000149c8e70) at sys_ioctl+0x638 syscall(ffff8000149c8f20) at syscall+0x541 Xsyscall(6,36,7f7ffffc9eb8,36,3,1880923c890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc99d0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149c8970 rbx 0xffff8000149c8a20 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149c8930 r9 0x1 r10 0 r11 0x6aec5ded0725475a r12 0x3000000008 r13 0xffff8000149c8980 r14 0x100 r15 0x1 rip 0xffffffff819129c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149c8960 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=188788 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff24c8,0xffffffff822dfc38 process=0xffff800014953a58 user=0xffff8000149c3000, vmspace=0xfffffd803f013c60 estcpu=1, cpticks=3, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *63035 188788 21709 0 7 0x2 syz-executor.0 31102 495113 21709 0 3 0x82 piperd syz-executor.1 76302 128118 1 0 3 0x100083 ttyin getty 29431 359164 0 0 3 0x14200 bored sosplice 21709 283386 73836 0 3 0x82 thrsleep syz-fuzzer 21709 301289 73836 0 3 0x4000082 thrsleep syz-fuzzer 21709 202040 73836 0 3 0x4000082 thrsleep syz-fuzzer 21709 122911 73836 0 3 0x4000082 thrsleep syz-fuzzer 21709 393081 73836 0 3 0x4000082 thrsleep syz-fuzzer 21709 414653 73836 0 3 0x4000082 kqread syz-fuzzer 21709 169673 73836 0 3 0x4000082 thrsleep syz-fuzzer 21709 139901 73836 0 3 0x4000082 thrsleep syz-fuzzer 73836 409334 59004 0 3 0x10008a pause ksh 59004 500093 96944 0 3 0x92 select sshd 96944 500429 1 0 3 0x80 select sshd 76765 485074 69235 73 3 0x100090 kqread syslogd 69235 182833 1 0 3 0x100082 netio syslogd 61258 249777 1 77 3 0x100090 poll dhclient 46982 122592 1 0 3 0x80 poll dhclient 49116 366766 0 0 3 0x14200 pgzero zerothread 47759 102910 0 0 3 0x14200 aiodoned aiodoned 68302 426438 0 0 3 0x14200 syncer update 18343 1031 0 0 3 0x14200 cleaner cleaner 59662 448961 0 0 3 0x14200 reaper reaper 15990 329518 0 0 3 0x14200 pgdaemon pagedaemon 53182 52201 0 0 3 0x14200 bored crynlk 43627 442965 0 0 3 0x14200 bored crypto 11146 481098 0 0 3 0x40014200 acpi0 acpi0 89709 225184 0 0 3 0x14200 bored softnet 96237 504551 0 0 3 0x14200 bored systqmp 90418 186261 0 0 3 0x14200 bored systq 32060 263486 0 0 3 0x40014200 bored softclock 58320 339618 0 0 3 0x40014200 idle0 91371 503150 0 0 3 0x14200 bored smr 1 484799 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 Kern Lim devbuf 9504 71886K 71894K 78643K 10985 0 0 pcb 23 9K 11K 78643K 515 0 0 rtable 82 3K 3K 78643K 729 0 0 ifaddr 53 12K 14K 78643K 221 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 38 0 0 iov 0 0K 24K 78643K 167 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1202 75K 76K 78643K 1939 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 15 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 141 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 4 9K 21K 78643K 949 0 0 sigio 0 0K 0K 78643K 12 0 0 proc 42 30K 46K 78643K 601 0 0 subproc 53 55297K 67586K 78643K 499 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 86 0 0 in_multi 22 1K 2K 78643K 191 0 0 ether_multi 1 0K 0K 78643K 7 0 0 mrt 0 0K 0K 78643K 3 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 311 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 73 12K 38K 78643K 3139 0 0 UVM aobj 52 2K 2K 78643K 56 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 37 0 0 NDP 11 0K 0K 78643K 75 0 0 temp 156 2358K 2425K 78643K 6264 0 0 kqueue 0 0K 0K 78643K 11 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 16 0 13 1 0 1 1 0 8 0 inpcbpl 280 470 0 463 1 0 1 1 0 8 0 plimitpl 152 52 0 45 1 0 1 1 0 8 0 rtentry 112 149 0 118 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 158 0 154 1 0 1 1 0 8 0 nd6 48 28 0 26 1 0 1 1 0 8 0 ppxss 1128 21 0 21 7 7 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 703 0 556 12 0 12 12 0 8 1 art_table 32 704 0 556 2 0 2 2 0 8 0 art_node 16 148 0 120 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 4 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 137 0 127 1 0 1 1 0 8 0 shmpl 112 54 0 4 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3089 0 1633 47 0 47 47 0 8 0 ffsino 240 3089 0 1633 86 0 86 86 0 8 0 nchpl 144 4601 0 2948 62 0 62 62 0 8 0 uvmvnodes 72 3433 0 0 63 0 63 63 0 8 0 vnodes 200 3433 0 0 181 0 181 181 0 8 0 namei 1024 14320 0 14320 3 2 1 1 0 8 1 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 18641 0 18641 11 7 4 6 0 8 4 sigapl 432 1082 0 1070 2 0 2 2 0 8 0 futexpl 56 15265 0 15265 2 1 1 1 0 8 1 knotepl 112 567 0 546 1 0 1 1 0 8 0 kqueuepl 104 297 0 295 1 0 1 1 0 8 0 pipepl 112 734 0 715 3 2 1 2 0 8 0 fdescpl 424 1083 0 1070 2 0 2 2 0 8 0 filepl 120 7136 0 7048 6 2 4 5 0 8 1 lockfpl 104 391 0 391 3 2 1 1 0 8 1 lockfspl 32 467 0 467 3 2 1 1 0 8 1 sessionpl 112 31 0 22 1 0 1 1 0 8 0 pgrppl 48 45 0 36 1 0 1 1 0 8 0 ucredpl 96 1784 0 1777 1 0 1 1 0 8 0 zombiepl 144 1070 0 1070 2 1 1 1 0 8 1 processpl 840 1098 0 1070 4 0 4 4 0 8 0 procpl 600 2298 0 2263 4 0 4 4 0 8 0 sosppl 128 20 0 20 4 4 0 1 0 8 0 sockpl 384 912 0 895 5 2 3 4 0 8 1 mcl64k 65536 408 0 408 50 49 1 47 0 8 1 mcl16k 16384 3 0 3 2 2 0 1 0 8 0 mcl12k 12288 22 0 22 6 5 1 1 0 8 1 mcl9k 9216 20 0 20 3 3 0 1 0 8 0 mcl8k 8192 17 0 17 6 5 1 1 0 8 1 mcl4k 4096 58 0 58 3 2 1 1 0 8 1 mcl2k2 2112 8 0 8 5 5 0 1 0 8 0 mcl2k 2048 48817 0 48776 15 9 6 12 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 85996 0 85932 34 27 7 28 0 8 0 bufpl 256 9038 0 3346 357 0 357 357 0 8 0 anonpl 16 139476 0 132112 91 39 52 53 0 62 14 amapchunkpl 152 5157 0 5070 15 10 5 15 0 158 0 amappl16 192 6178 0 5715 85 53 32 36 0 8 8 amappl15 184 485 0 481 1 0 1 1 0 8 0 amappl14 176 92 0 91 2 1 1 1 0 8 0 amappl13 168 210 0 206 1 0 1 1 0 8 0 amappl12 160 17 0 13 1 0 1 1 0 8 0 amappl11 152 456 0 445 1 0 1 1 0 8 0 amappl10 144 194 0 189 2 1 1 1 0 8 0 amappl9 136 631 0 627 1 0 1 1 0 8 0 amappl8 128 281 0 267 1 0 1 1 0 8 0 amappl7 120 186 0 179 1 0 1 1 0 8 0 amappl6 112 223 0 216 1 0 1 1 0 8 0 amappl5 104 316 0 306 1 0 1 1 0 8 0 amappl4 96 1321 0 1297 2 1 1 2 0 8 0 amappl3 88 200 0 195 1 0 1 1 0 8 0 amappl2 80 8568 0 8525 2 0 2 2 0 8 0 amappl1 72 28708 0 28315 26 17 9 19 0 8 0 amappl 72 2594 0 2563 1 0 1 1 0 75 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 55 0 4 1 0 1 1 0 8 0 uaddrrnd 24 1083 0 1070 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1083 0 1070 1 0 1 1 0 8 0 vmmpekpl 168 11321 0 11302 2 0 2 2 0 8 0 vmmpepl 168 125355 0 124072 123 45 78 79 0 357 11 vmsppl 264 1082 0 1070 4 3 1 2 0 8 0 pdppl 4096 2172 0 2140 5 0 5 5 0 8 0 pvpl 32 441147 0 430766 250 113 137 238 0 265 36 pmappl 192 1082 0 1070 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 580 0 98 16 0 16 16 0 8 0