panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 4694 15423 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,ffff8000149f2d50,3,ffff8000ffff2978) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149f2d50,3,ffff8000ffff2978) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8039a01af0,80084b01,ffff8000149f2d50,3,fffffd803f7c6900,ffff8000ffff2978) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f6a5178,80084b01,ffff8000149f2d50,ffff8000ffff2978) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff2978,ffff8000149f2e90,ffff8000149f2e80) at sys_ioctl+0x638 syscall(ffff8000149f2f30) at syscall+0x541 Xsyscall(6,36,7f7ffffd04b8,36,3,cb6f5893890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcffd0, 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,ffff8000149f2d50,3,ffff8000ffff2978) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149f2d50,3,ffff8000ffff2978) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8039a01af0,80084b01,ffff8000149f2d50,3,fffffd803f7c6900,ffff8000ffff2978) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f6a5178,80084b01,ffff8000149f2d50,ffff8000ffff2978) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff2978,ffff8000149f2e90,ffff8000149f2e80) at sys_ioctl+0x638 syscall(ffff8000149f2f30) at syscall+0x541 Xsyscall(6,36,7f7ffffd04b8,36,3,cb6f5893890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcffd0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149f2980 rbx 0xffff8000149f2a30 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149f2940 r9 0x1 r10 0 r11 0x7285c0460977f5ab r12 0x3000000008 r13 0xffff8000149f2990 r14 0x100 r15 0x1 rip 0xffffffff8161b028 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149f2970 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=4694 stat=onproc flags process=2 proc=0 pri=52, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3530,0xffffffff82290d98 process=0xffff800014962018 user=0xffff8000149ed000, vmspace=0xfffffd803f014738 estcpu=2, cpticks=3, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *15423 4694 72408 0 7 0x2 syz-executor.0 94385 349979 1 0 3 0x100083 ttyin getty 22105 81903 72408 0 3 0x82 piperd syz-executor.1 13437 269212 0 0 3 0x14200 bored sosplice 72408 117093 18373 0 3 0x82 thrsleep syz-fuzzer 72408 179633 18373 0 3 0x4000082 thrsleep syz-fuzzer 72408 350648 18373 0 3 0x4000082 thrsleep syz-fuzzer 72408 97556 18373 0 3 0x4000082 kqread syz-fuzzer 72408 157483 18373 0 3 0x4000082 thrsleep syz-fuzzer 72408 69003 18373 0 3 0x4000082 thrsleep syz-fuzzer 72408 208406 18373 0 3 0x4000082 thrsleep syz-fuzzer 72408 313636 18373 0 3 0x4000082 thrsleep syz-fuzzer 18373 120893 47313 0 3 0x10008a pause ksh 47313 469548 27424 0 3 0x92 select sshd 27424 98159 1 0 3 0x80 select sshd 93716 70486 40338 73 3 0x100090 kqread syslogd 40338 187611 1 0 3 0x100082 netio syslogd 62504 360285 1 77 3 0x100090 poll dhclient 22779 35370 1 0 3 0x80 poll dhclient 99043 250422 0 0 3 0x14200 pgzero zerothread 46749 401477 0 0 3 0x14200 aiodoned aiodoned 88025 161430 0 0 3 0x14200 syncer update 51505 235639 0 0 3 0x14200 cleaner cleaner 3367 485877 0 0 3 0x14200 reaper reaper 44058 371657 0 0 3 0x14200 pgdaemon pagedaemon 54806 58839 0 0 3 0x14200 bored crynlk 59016 90764 0 0 3 0x14200 bored crypto 93210 359026 0 0 3 0x40014200 acpi0 acpi0 71824 177740 0 0 3 0x14200 bored softnet 4542 428358 0 0 3 0x14200 bored systqmp 12441 41325 0 0 3 0x14200 bored systq 36550 252980 0 0 3 0x40014200 bored softclock 94707 89010 0 0 3 0x40014200 idle0 9898 149598 0 0 3 0x14200 bored smr 1 85577 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 9485 71868K 71876K 78643K 10873 0 0 pcb 23 9K 10K 78643K 528 0 0 rtable 82 3K 4K 78643K 515 0 0 ifaddr 47 12K 13K 78643K 174 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 32 0 0 iov 0 0K 24K 78643K 102 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1196 75K 75K 78643K 1882 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 11 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 136 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 4 9K 25K 78643K 998 0 0 sigio 0 0K 0K 78643K 17 0 0 proc 41 30K 54K 78643K 479 0 0 subproc 53 55297K 67586K 78643K 259 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 106 0 0 in_multi 22 1K 2K 78643K 112 0 0 ether_multi 1 0K 0K 78643K 4 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 247 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 68 12K 22K 78643K 3109 0 0 UVM aobj 40 2K 3K 78643K 55 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 33 0 0 NDP 9 0K 0K 78643K 53 0 0 temp 142 2358K 2426K 78643K 5831 0 0 kqueue 0 0K 0K 78643K 5 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 9 0 6 1 0 1 1 0 8 0 inpcbpl 280 406 0 399 2 1 1 2 0 8 0 plimitpl 152 41 0 34 1 0 1 1 0 8 0 rtentry 112 88 0 57 2 0 2 2 0 8 0 syncache 264 4 0 4 2 2 0 1 0 8 0 tcpqe 32 10 0 10 1 1 0 1 0 8 0 tcpcb 544 124 0 120 1 0 1 1 0 8 0 nd6 48 14 0 12 1 0 1 1 0 8 0 ppxss 1128 19 0 19 4 4 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 396 0 249 12 0 12 12 0 8 1 art_table 32 397 0 249 2 0 2 2 0 8 0 art_node 16 85 0 57 1 0 1 1 0 8 0 sysvmsgpl 40 20 0 5 2 1 1 1 0 8 0 semapl 112 128 0 118 1 0 1 1 0 8 0 shmpl 112 53 0 15 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3461 0 2025 47 0 47 47 0 8 0 ffsino 240 3461 0 2025 85 0 85 85 0 8 0 nchpl 144 5008 0 3365 64 2 62 62 0 8 1 uvmvnodes 72 3666 0 0 67 0 67 67 0 8 0 vnodes 200 3666 0 0 193 0 193 193 0 8 0 namei 1024 14379 0 14379 2 1 1 1 0 8 1 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 14167 0 14167 13 12 1 6 0 8 1 sigapl 432 1151 0 1139 2 0 2 2 0 8 0 futexpl 56 13814 0 13814 1 0 1 1 0 8 1 knotepl 112 321 0 300 1 0 1 1 0 8 0 kqueuepl 104 212 0 210 1 0 1 1 0 8 0 pipepl 112 606 0 587 6 5 1 2 0 8 0 fdescpl 424 1152 0 1139 2 0 2 2 0 8 0 filepl 120 6292 0 6204 4 0 4 4 0 8 1 lockfpl 104 256 0 256 2 1 1 1 0 8 1 lockfspl 32 272 0 272 2 1 1 1 0 8 1 sessionpl 112 23 0 14 1 0 1 1 0 8 0 pgrppl 48 31 0 22 1 0 1 1 0 8 0 ucredpl 96 969 0 962 1 0 1 1 0 8 0 zombiepl 144 1139 0 1139 3 2 1 1 0 8 1 processpl 840 1167 0 1139 4 0 4 4 0 8 0 procpl 600 2391 0 2356 4 0 4 4 0 8 0 sosppl 128 8 0 8 3 3 0 1 0 8 0 sockpl 384 848 0 831 3 0 3 3 0 8 1 mcl64k 65536 506 0 506 63 48 15 33 0 8 15 mcl16k 16384 2 0 2 2 2 0 1 0 8 0 mcl12k 12288 19 0 19 4 3 1 1 0 8 1 mcl9k 9216 14 0 14 5 4 1 1 0 8 1 mcl8k 8192 11 0 11 5 5 0 1 0 8 0 mcl4k 4096 49 0 49 5 4 1 1 0 8 1 mcl2k2 2112 4 0 4 3 3 0 1 0 8 0 mcl2k 2048 48221 0 48183 15 9 6 12 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 84889 0 84820 42 34 8 21 0 8 0 bufpl 256 7892 0 3354 284 0 284 284 0 8 0 anonpl 16 101074 0 94081 61 24 37 50 0 62 0 amapchunkpl 152 4615 0 4538 14 10 4 11 0 158 0 amappl16 192 5077 0 4609 43 18 25 36 0 8 0 amappl15 184 112 0 107 1 0 1 1 0 8 0 amappl14 176 347 0 346 3 2 1 1 0 8 0 amappl13 168 27 0 23 1 0 1 1 0 8 0 amappl12 160 14 0 12 2 1 1 1 0 8 0 amappl11 152 20 0 9 1 0 1 1 0 8 0 amappl10 144 447 0 444 3 2 1 1 0 8 0 amappl9 136 746 0 742 1 0 1 1 0 8 0 amappl8 128 326 0 312 1 0 1 1 0 8 0 amappl7 120 397 0 390 1 0 1 1 0 8 0 amappl6 112 55 0 49 1 0 1 1 0 8 0 amappl5 104 148 0 138 1 0 1 1 0 8 0 amappl4 96 1346 0 1319 2 1 1 2 0 8 0 amappl3 88 464 0 459 1 0 1 1 0 8 0 amappl2 80 9195 0 9155 2 0 2 2 0 8 0 amappl1 72 28620 0 28228 24 15 9 19 0 8 0 amappl 72 2654 0 2625 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 54 0 15 1 0 1 1 0 8 0 uaddrrnd 24 1152 0 1139 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1152 0 1139 1 0 1 1 0 8 0 vmmpekpl 168 11127 0 11110 1 0 1 1 0 8 0 vmmpepl 168 121387 0 120103 121 43 78 78 0 357 11 vmsppl 264 1151 0 1139 2 1 1 2 0 8 0 pdppl 4096 2310 0 2278 6 1 5 6 0 8 0 pvpl 32 312723 0 302753 162 54 108 130 0 265 9 pmappl 192 1151 0 1139 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 528 0 106 13 0 13 13 0 8 0