panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *294460 30715 0 0x2 0 0 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 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,ffff8000149decd0,3,ffff8000ffff2018) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149decd0,3,ffff8000ffff2018) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd803510b010,80084b01,ffff8000149decd0,3,fffffd803f7c6900,ffff8000ffff2018) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8035390180,80084b01,ffff8000149decd0,ffff8000ffff2018) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff2018,ffff8000149dee10,ffff8000149dee00) at sys_ioctl+0x638 syscall(ffff8000149deeb0) at syscall+0x541 Xsyscall(6,36,7f7fffffb408,36,3,a3b262f3890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffffaf20, 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:399 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,ffff8000149decd0,3,ffff8000ffff2018) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149decd0,3,ffff8000ffff2018) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd803510b010,80084b01,ffff8000149decd0,3,fffffd803f7c6900,ffff8000ffff2018) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8035390180,80084b01,ffff8000149decd0,ffff8000ffff2018) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff2018,ffff8000149dee10,ffff8000149dee00) at sys_ioctl+0x638 syscall(ffff8000149deeb0) at syscall+0x541 Xsyscall(6,36,7f7fffffb408,36,3,a3b262f3890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffffaf20, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149de900 rbx 0xffff8000149de9b0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149de8c0 r9 0x1 r10 0 r11 0xd3061370960f0791 r12 0x3000000008 r13 0xffff8000149de910 r14 0x100 r15 0x1 rip 0xffffffff8138c548 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149de8f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=294460 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3530,0xffffffff82260db8 process=0xffff800014952360 user=0xffff8000149d9000, vmspace=0xfffffd803f014c60 estcpu=1, cpticks=2, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *30715 294460 73425 0 7 0x2 syz-executor.1 67281 439889 73425 0 3 0x82 piperd syz-executor.0 95278 265331 1 0 3 0x100083 ttyin getty 1912 29673 0 0 3 0x14200 bored sosplice 73425 93950 53841 0 3 0x82 kqread syz-fuzzer 73425 71195 53841 0 3 0x4000082 thrsleep syz-fuzzer 73425 124736 53841 0 3 0x4000082 thrsleep syz-fuzzer 73425 497157 53841 0 3 0x4000082 thrsleep syz-fuzzer 73425 143866 53841 0 3 0x4000082 thrsleep syz-fuzzer 73425 70372 53841 0 3 0x4000082 thrsleep syz-fuzzer 73425 350761 53841 0 3 0x4000082 thrsleep syz-fuzzer 73425 522665 53841 0 3 0x4000082 thrsleep syz-fuzzer 73425 236411 53841 0 3 0x4000082 thrsleep syz-fuzzer 53841 61417 55081 0 3 0x10008a pause ksh 55081 440524 53272 0 3 0x92 select sshd 53272 255052 1 0 3 0x80 select sshd 36304 49204 92995 73 3 0x100090 kqread syslogd 92995 2889 1 0 3 0x100082 netio syslogd 86216 267136 1 77 3 0x100090 poll dhclient 74975 39169 1 0 3 0x80 poll dhclient 59889 64922 0 0 3 0x14200 pgzero zerothread 15268 314250 0 0 3 0x14200 aiodoned aiodoned 75256 520735 0 0 3 0x14200 syncer update 82959 138708 0 0 3 0x14200 cleaner cleaner 90963 122450 0 0 3 0x14200 reaper reaper 70397 13394 0 0 3 0x14200 pgdaemon pagedaemon 10139 229234 0 0 3 0x14200 bored crynlk 51852 164278 0 0 3 0x14200 bored crypto 27052 424120 0 0 3 0x40014200 acpi0 acpi0 70054 185844 0 0 3 0x14200 bored softnet 84420 278021 0 0 3 0x14200 bored systqmp 80458 452113 0 0 3 0x14200 bored systq 48715 434812 0 0 3 0x40014200 bored softclock 85100 511695 0 0 3 0x40014200 idle0 26762 412762 0 0 3 0x14200 bored smr 1 39752 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 9507 71883K 71891K 78643K 11223 0 0 pcb 23 9K 11K 78643K 445 0 0 rtable 82 3K 3K 78643K 532 0 0 ifaddr 53 12K 14K 78643K 169 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 33 0 0 iov 0 0K 24K 78643K 136 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1194 75K 75K 78643K 2106 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 1K 1K 78643K 38 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 4 9K 21K 78643K 1130 0 0 sigio 0 0K 0K 78643K 6 0 0 proc 42 30K 46K 78643K 473 0 0 subproc 53 55297K 67586K 78643K 331 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 669 0 0 in_multi 22 1K 2K 78643K 135 0 0 ether_multi 1 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 96 424K 424K 78643K 96 0 0 exec 0 0K 1K 78643K 282 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 3357 0 0 UVM aobj 52 7K 7K 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 25 0 0 NDP 11 0K 0K 78643K 54 0 0 temp 150 2353K 2423K 78643K 6085 0 0 kqueue 0 0K 0K 78643K 10 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 11 0 8 1 0 1 1 0 8 0 inpcbpl 280 952 0 945 1 0 1 1 0 8 0 plimitpl 152 43 0 36 1 0 1 1 0 8 0 rtentry 112 104 0 73 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 27 0 27 1 1 0 1 0 8 0 tcpcb 544 714 0 710 1 0 1 1 0 8 0 nd6 48 18 0 16 1 0 1 1 0 8 0 ppxss 1128 15 0 15 7 6 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 476 0 329 12 0 12 12 0 8 0 art_table 32 477 0 329 2 0 2 2 0 8 0 art_node 16 103 0 75 1 0 1 1 0 8 0 sysvmsgpl 40 18 0 4 1 0 1 1 0 8 0 semapl 112 36 0 26 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 3931 0 2491 47 0 47 47 0 8 0 ffsino 240 3931 0 2491 85 0 85 85 0 8 0 nchpl 144 5582 0 3933 62 0 62 62 0 8 0 uvmvnodes 72 4153 0 0 76 0 76 76 0 8 0 vnodes 200 4153 0 0 219 0 219 219 0 8 0 namei 1024 16415 0 16415 2 1 1 1 0 8 1 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 16828 0 16828 14 13 1 6 0 8 1 sigapl 432 1277 0 1265 2 0 2 2 0 8 0 futexpl 56 22090 0 22090 1 0 1 1 0 8 1 knotepl 112 349 0 328 1 0 1 1 0 8 0 kqueuepl 104 198 0 196 1 0 1 1 0 8 0 pipepl 112 532 0 513 2 1 1 1 0 8 0 fdescpl 424 1278 0 1265 2 0 2 2 0 8 0 filepl 120 7656 0 7568 5 1 4 5 0 8 1 lockfpl 104 265 0 265 2 1 1 1 0 8 1 lockfspl 32 324 0 324 2 1 1 1 0 8 1 sessionpl 112 25 0 16 1 0 1 1 0 8 0 pgrppl 48 37 0 28 1 0 1 1 0 8 0 ucredpl 96 1294 0 1287 1 0 1 1 0 8 0 zombiepl 144 1265 0 1265 2 1 1 1 0 8 1 processpl 840 1293 0 1265 4 0 4 4 0 8 0 procpl 600 2601 0 2565 4 0 4 4 0 8 0 sosppl 128 15 0 15 6 5 1 1 0 8 1 sockpl 384 1334 0 1317 4 1 3 4 0 8 1 mcl64k 65536 33 0 33 3 2 1 1 0 8 1 mcl16k 16384 3 0 3 3 3 0 1 0 8 0 mcl12k 12288 16 0 16 4 3 1 1 0 8 1 mcl9k 9216 11 0 11 4 3 1 1 0 8 1 mcl8k 8192 11 0 11 6 5 1 1 0 8 1 mcl4k 4096 47 0 47 5 4 1 1 0 8 1 mcl2k2 2112 4 0 4 3 3 0 1 0 8 0 mcl2k 2048 48449 0 48413 17 11 6 10 0 8 0 mtagpl 80 4 0 4 2 2 0 1 0 8 0 mbufpl 256 84753 0 84691 13 5 8 8 0 8 2 bufpl 256 9081 0 3409 355 0 355 355 0 8 0 anonpl 16 147100 0 140093 73 26 47 54 0 62 8 amapchunkpl 152 5609 0 5532 25 20 5 14 0 158 0 amappl16 192 6977 0 6485 74 41 33 38 0 8 8 amappl15 184 839 0 835 1 0 1 1 0 8 0 amappl14 176 111 0 109 2 1 1 1 0 8 0 amappl13 168 89 0 84 1 0 1 1 0 8 0 amappl12 160 90 0 90 3 2 1 1 0 8 1 amappl11 152 809 0 798 1 0 1 1 0 8 0 amappl10 144 152 0 151 2 1 1 1 0 8 0 amappl9 136 580 0 575 1 0 1 1 0 8 0 amappl8 128 167 0 148 1 0 1 1 0 8 0 amappl7 120 129 0 122 1 0 1 1 0 8 0 amappl6 112 589 0 582 1 0 1 1 0 8 0 amappl5 104 231 0 221 1 0 1 1 0 8 0 amappl4 96 1483 0 1455 2 1 1 2 0 8 0 amappl3 88 207 0 201 1 0 1 1 0 8 0 amappl2 80 10459 0 10418 2 0 2 2 0 8 0 amappl1 72 32351 0 31953 24 14 10 19 0 8 0 amappl 72 2864 0 2835 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 1278 0 1265 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1278 0 1265 1 0 1 1 0 8 0 vmmpekpl 168 11420 0 11402 2 0 2 2 0 8 0 vmmpepl 168 142045 0 140722 116 31 85 85 0 357 17 vmsppl 264 1277 0 1265 3 1 2 2 0 8 1 pdppl 4096 2562 0 2530 5 0 5 5 0 8 0 pvpl 32 444694 0 434646 219 70 149 203 0 265 49 pmappl 192 1277 0 1265 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 513 0 33 14 0 14 14 0 8 0