panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *455672 9377 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,ffff8000149f4710,3,ffff80001494d788) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149f4710,3,ffff80001494d788) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd802f3e28b8,80084b01,ffff8000149f4710,3,fffffd803f7c6a20,ffff80001494d788) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f7e42e0,80084b01,ffff8000149f4710,ffff80001494d788) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff80001494d788,ffff8000149f4850,ffff8000149f4840) at sys_ioctl+0x638 syscall(ffff8000149f48f0) at syscall+0x541 Xsyscall(6,36,7f7fffff0728,36,3,2f5f613d890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff0240, 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,ffff8000149f4710,3,ffff80001494d788) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149f4710,3,ffff80001494d788) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd802f3e28b8,80084b01,ffff8000149f4710,3,fffffd803f7c6a20,ffff80001494d788) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f7e42e0,80084b01,ffff8000149f4710,ffff80001494d788) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff80001494d788,ffff8000149f4850,ffff8000149f4840) at sys_ioctl+0x638 syscall(ffff8000149f48f0) at syscall+0x541 Xsyscall(6,36,7f7fffff0728,36,3,2f5f613d890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff0240, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149f4340 rbx 0xffff8000149f43f0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149f4300 r9 0x1 r10 0 r11 0x14d7a6cb9cc10849 r12 0x3000000008 r13 0xffff8000149f4350 r14 0x100 r15 0x1 rip 0xffffffff810e7008 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149f4330 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=455672 stat=onproc flags process=2 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001494c270,0xffffffff82254d50 process=0xffff8000149626a8 user=0xffff8000149ef000, vmspace=0xfffffd803f013108 estcpu=0, cpticks=3, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND * 9377 455672 20261 0 7 0x2 syz-executor.0 20576 146139 1 0 3 0x100083 ttyin getty 68843 479275 20261 0 3 0x82 piperd syz-executor.1 7217 377829 0 0 3 0x14200 bored sosplice 20261 244727 4041 0 3 0x82 thrsleep syz-fuzzer 20261 323680 4041 0 3 0x4000082 thrsleep syz-fuzzer 20261 475029 4041 0 3 0x4000082 thrsleep syz-fuzzer 20261 289680 4041 0 3 0x4000082 thrsleep syz-fuzzer 20261 83646 4041 0 3 0x4000082 thrsleep syz-fuzzer 20261 62861 4041 0 3 0x4000082 kqread syz-fuzzer 20261 454850 4041 0 3 0x4000082 thrsleep syz-fuzzer 20261 186907 4041 0 3 0x4000082 thrsleep syz-fuzzer 4041 211757 59262 0 3 0x10008a pause ksh 59262 197843 11678 0 3 0x92 select sshd 11678 472085 1 0 3 0x80 select sshd 27531 203826 79287 73 3 0x100090 kqread syslogd 79287 57572 1 0 3 0x100082 netio syslogd 26361 232413 1 77 3 0x100090 poll dhclient 4483 453551 1 0 3 0x80 poll dhclient 60674 204020 0 0 3 0x14200 pgzero zerothread 56647 132547 0 0 3 0x14200 aiodoned aiodoned 75484 194880 0 0 3 0x14200 syncer update 30388 83596 0 0 3 0x14200 cleaner cleaner 27856 324194 0 0 3 0x14200 reaper reaper 76143 65886 0 0 3 0x14200 pgdaemon pagedaemon 4315 505939 0 0 3 0x14200 bored crynlk 71529 118947 0 0 3 0x14200 bored crypto 86593 53645 0 0 3 0x40014200 acpi0 acpi0 88827 150742 0 0 3 0x14200 bored softnet 65099 349212 0 0 3 0x14200 bored systqmp 55239 105955 0 0 3 0x14200 bored systq 41515 378575 0 0 3 0x40014200 bored softclock 53450 318325 0 0 3 0x40014200 idle0 67650 170808 0 0 3 0x14200 bored smr 1 31922 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 9537 71894K 71902K 78643K 11524 0 0 pcb 23 9K 11K 78643K 2727 0 0 rtable 82 3K 4K 78643K 907 0 0 ifaddr 65 15K 17K 78643K 301 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 45 0 0 iov 0 0K 32K 78643K 975 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1210 76K 76K 78643K 2719 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 19 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 585 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 4 9K 21K 78643K 3026 0 0 sigio 0 0K 0K 78643K 28 0 0 proc 41 30K 54K 78643K 751 0 0 subproc 53 55297K 67586K 78643K 552 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 179 0 0 in_multi 22 1K 2K 78643K 226 0 0 ether_multi 1 0K 0K 78643K 11 0 0 mrt 0 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 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 373 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 76 12K 25K 78643K 9008 0 0 UVM aobj 91 3K 3K 78643K 106 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 64 0 0 NDP 15 0K 0K 78643K 100 0 0 temp 184 2359K 2488K 78643K 10919 0 0 kqueue 0 0K 0K 78643K 12 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 17 0 14 1 0 1 1 0 8 0 inpcbpl 280 1714 0 1707 1 0 1 1 0 8 0 plimitpl 152 72 0 65 1 0 1 1 0 8 0 rtentry 112 160 0 129 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 13 0 13 1 1 0 1 0 8 0 tcpcb 544 1192 0 1188 1 0 1 1 0 8 0 nd6 48 30 0 28 1 0 1 1 0 8 0 ppxss 1128 30 0 30 8 7 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 750 0 603 12 0 12 12 0 8 2 art_table 32 751 0 603 2 0 2 2 0 8 0 art_node 16 157 0 129 1 0 1 1 0 8 0 sysvmsgpl 40 29 0 5 1 0 1 1 0 8 0 semapl 112 583 0 573 1 0 1 1 0 8 0 shmpl 112 104 0 15 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 6624 0 5152 48 0 48 48 0 8 0 ffsino 240 6624 0 5152 87 0 87 87 0 8 0 nchpl 144 11059 0 9392 62 0 62 62 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 30477 0 30477 2 1 1 1 0 8 1 scsiplug 64 5 0 5 2 2 0 1 0 8 0 scxspl 192 30472 0 30472 13 12 1 6 0 8 1 sigapl 432 3156 0 3144 2 0 2 2 0 8 0 futexpl 56 61247 0 61247 1 0 1 1 0 8 1 knotepl 112 663 0 642 1 0 1 1 0 8 0 kqueuepl 104 819 0 817 1 0 1 1 0 8 0 pipepl 112 2674 0 2655 4 3 1 2 0 8 0 fdescpl 424 3157 0 3144 2 0 2 2 0 8 0 filepl 120 18093 0 18005 5 1 4 5 0 8 1 lockfpl 104 479 0 479 4 3 1 1 0 8 1 lockfspl 32 548 0 548 4 3 1 1 0 8 1 sessionpl 112 32 0 23 1 0 1 1 0 8 0 pgrppl 48 72 0 63 1 0 1 1 0 8 0 ucredpl 96 2505 0 2498 1 0 1 1 0 8 0 zombiepl 144 3144 0 3144 2 1 1 1 0 8 1 processpl 840 3172 0 3144 4 0 4 4 0 8 0 procpl 600 6694 0 6659 4 0 4 4 0 8 0 sosppl 128 21 0 21 8 8 0 1 0 8 0 sockpl 384 4676 0 4659 5 2 3 4 0 8 1 mcl64k 65536 140636 0 140125 286 221 65 128 0 8 1 mcl16k 16384 4 0 4 4 4 0 1 0 8 0 mcl12k 12288 738 0 738 9 8 1 1 0 8 1 mcl9k 9216 26 0 26 10 10 0 1 0 8 0 mcl8k 8192 22 0 22 14 13 1 1 0 8 1 mcl4k 4096 114 0 114 7 6 1 1 0 8 1 mcl2k2 2112 8 0 8 7 7 0 1 0 8 0 mcl2k 2048 53659 0 53614 18 10 8 12 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 249686 0 249097 191 151 40 70 0 8 0 bufpl 256 11619 0 5823 363 0 363 363 0 8 0 anonpl 16 1701527 0 1694579 84 41 43 69 0 62 0 amapchunkpl 152 23241 0 23154 28 24 4 14 0 158 0 amappl16 192 92447 0 91984 70 45 25 47 0 8 0 amappl15 184 1189 0 1184 1 0 1 1 0 8 0 amappl14 176 1495 0 1494 2 1 1 1 0 8 0 amappl13 168 234 0 231 1 0 1 1 0 8 0 amappl12 160 66 0 62 1 0 1 1 0 8 0 amappl11 152 466 0 454 1 0 1 1 0 8 0 amappl10 144 176 0 174 2 1 1 1 0 8 0 amappl9 136 602 0 598 1 0 1 1 0 8 0 amappl8 128 179 0 163 1 0 1 1 0 8 0 amappl7 120 147 0 142 1 0 1 1 0 8 0 amappl6 112 65 0 55 1 0 1 1 0 8 0 amappl5 104 193 0 183 1 0 1 1 0 8 0 amappl4 96 4148 0 4121 2 1 1 2 0 8 0 amappl3 88 2419 0 2412 1 0 1 1 0 8 0 amappl2 80 28373 0 28331 2 0 2 2 0 8 0 amappl1 72 67268 0 66877 24 15 9 19 0 8 0 amappl 72 7709 0 7678 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 105 0 15 2 0 2 2 0 8 0 uaddrrnd 24 3157 0 3144 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3157 0 3144 1 0 1 1 0 8 0 vmmpekpl 168 24858 0 24838 2 0 2 2 0 8 0 vmmpepl 168 404179 0 402891 168 90 78 86 0 357 10 vmsppl 264 3156 0 3144 4 3 1 2 0 8 0 pdppl 4096 6320 0 6288 5 0 5 5 0 8 0 pvpl 32 2404787 0 2394758 242 134 108 196 0 265 4 pmappl 192 3156 0 3144 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 996 0 408 19 0 19 19 0 8 0