panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *421491 57074 0 0x2 0 0 syz-executor.1 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,ffff8000149e0510,3,ffff8000ffff92c8) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149e0510,3,ffff8000ffff92c8) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8030b52bd8,80084b01,ffff8000149e0510,3,fffffd803f7c6ba0,ffff8000ffff92c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802fbbb1f0,80084b01,ffff8000149e0510,ffff8000ffff92c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff92c8,ffff8000149e0650,ffff8000149e0640) at sys_ioctl+0x638 syscall(ffff8000149e06f0) at syscall+0x541 Xsyscall(6,36,7f7ffffc25d8,36,3,a2afee7890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc20f0, 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,ffff8000149e0510,3,ffff8000ffff92c8) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149e0510,3,ffff8000ffff92c8) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8030b52bd8,80084b01,ffff8000149e0510,3,fffffd803f7c6ba0,ffff8000ffff92c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802fbbb1f0,80084b01,ffff8000149e0510,ffff8000ffff92c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff92c8,ffff8000149e0650,ffff8000149e0640) at sys_ioctl+0x638 syscall(ffff8000149e06f0) at syscall+0x541 Xsyscall(6,36,7f7ffffc25d8,36,3,a2afee7890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc20f0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149e0140 rbx 0xffff8000149e01f0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149e0100 r9 0x1 r10 0 r11 0xf0b7ed5f79298e00 r12 0x3000000008 r13 0xffff8000149e0150 r14 0x100 r15 0x1 rip 0xffffffff81bfb6f8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149e0130 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=421491 stat=onproc flags process=2 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8bc0,0xffffffff822f0db8 process=0xffff8000ffff7708 user=0xffff8000149db000, vmspace=0xfffffd803f014d68 estcpu=0, cpticks=3, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *57074 421491 81793 0 7 0x2 syz-executor.1 32439 375498 81793 0 3 0x82 piperd syz-executor.0 54902 367093 0 0 3 0x14200 bored sosplice 81793 492680 55455 0 3 0x82 thrsleep syz-fuzzer 81793 498785 55455 0 3 0x4000082 thrsleep syz-fuzzer 81793 241056 55455 0 3 0x4000082 thrsleep syz-fuzzer 81793 439498 55455 0 3 0x4000082 thrsleep syz-fuzzer 81793 373380 55455 0 3 0x4000082 thrsleep syz-fuzzer 81793 65828 55455 0 3 0x4000082 kqread syz-fuzzer 81793 94491 55455 0 3 0x4000082 thrsleep syz-fuzzer 81793 425893 55455 0 3 0x4000082 thrsleep syz-fuzzer 55455 438802 3875 0 3 0x10008a pause ksh 3875 460021 54666 0 3 0x92 select sshd 24190 206320 1 0 3 0x100083 ttyin getty 54666 484039 1 0 3 0x80 select sshd 61707 67636 95188 73 3 0x100090 kqread syslogd 95188 14847 1 0 3 0x100082 netio syslogd 88363 288611 1 77 3 0x100090 poll dhclient 39562 350577 1 0 3 0x80 poll dhclient 70531 80853 0 0 3 0x14200 pgzero zerothread 64685 349535 0 0 3 0x14200 aiodoned aiodoned 56793 322298 0 0 3 0x14200 syncer update 86645 454956 0 0 3 0x14200 cleaner cleaner 96967 492388 0 0 3 0x14200 reaper reaper 84232 499741 0 0 3 0x14200 pgdaemon pagedaemon 64491 399029 0 0 3 0x14200 bored crynlk 13493 338177 0 0 3 0x14200 bored crypto 55927 305596 0 0 3 0x40014200 acpi0 acpi0 26047 442320 0 0 3 0x14200 bored softnet 38882 423514 0 0 3 0x14200 bored systqmp 28316 366159 0 0 3 0x14200 bored systq 82230 44264 0 0 3 0x40014200 bored softclock 14444 330553 0 0 3 0x40014200 idle0 81828 470594 0 0 3 0x14200 bored smr 1 132779 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 9470 71875K 71883K 78643K 10715 0 0 pcb 23 9K 11K 78643K 289 0 0 rtable 82 3K 3K 78643K 369 0 0 ifaddr 39 10K 12K 78643K 107 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 27 0 0 iov 0 0K 16K 78643K 57 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1194 75K 76K 78643K 1553 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 6 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 52 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 4 9K 21K 78643K 438 0 0 sigio 0 0K 0K 78643K 14 0 0 proc 41 30K 46K 78643K 357 0 0 subproc 53 55297K 67586K 78643K 225 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 25 0 0 in_multi 22 1K 2K 78643K 96 0 0 ether_multi 1 0K 0K 78643K 5 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 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 221 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 69 12K 20K 78643K 1803 0 0 UVM aobj 18 4K 4K 78643K 21 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 14 0 0 NDP 7 0K 0K 78643K 33 0 0 temp 121 2352K 2417K 78643K 4296 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 8 0 5 1 0 1 1 0 8 0 inpcbpl 280 251 0 244 1 0 1 1 0 8 0 plimitpl 152 27 0 20 1 0 1 1 0 8 0 rtentry 112 77 0 46 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 100 0 96 1 0 1 1 0 8 0 nd6 48 12 0 10 1 0 1 1 0 8 0 ppxss 1128 9 0 9 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 359 0 215 12 0 12 12 0 8 3 art_table 32 360 0 215 2 0 2 2 0 8 0 art_node 16 76 0 48 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 0 1 0 1 1 0 8 0 semapl 112 50 0 40 1 0 1 1 0 8 0 shmpl 112 19 0 3 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2206 0 788 46 0 46 46 0 8 0 ffsino 240 2206 0 788 84 0 84 84 0 8 0 nchpl 144 3003 0 1364 61 0 61 61 0 8 0 uvmvnodes 72 2373 0 0 44 0 44 44 0 8 0 vnodes 200 2373 0 0 125 0 125 125 0 8 0 namei 1024 8488 0 8488 2 1 1 1 0 8 1 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 8560 0 8560 9 8 1 6 0 8 1 sigapl 432 593 0 581 2 0 2 2 0 8 0 futexpl 56 6812 0 6812 1 0 1 1 0 8 1 knotepl 112 231 0 210 1 0 1 1 0 8 0 kqueuepl 104 114 0 112 1 0 1 1 0 8 0 pipepl 112 380 0 361 3 2 1 2 0 8 0 fdescpl 424 594 0 581 2 0 2 2 0 8 0 filepl 120 3722 0 3634 5 1 4 5 0 8 1 lockfpl 104 133 0 133 2 1 1 1 0 8 1 lockfspl 32 229 0 229 2 1 1 1 0 8 1 sessionpl 112 21 0 12 1 0 1 1 0 8 0 pgrppl 48 29 0 20 1 0 1 1 0 8 0 ucredpl 96 922 0 915 1 0 1 1 0 8 0 zombiepl 144 581 0 581 2 1 1 1 0 8 1 processpl 840 609 0 581 4 0 4 4 0 8 0 procpl 600 1148 0 1113 4 0 4 4 0 8 1 sosppl 128 7 0 7 2 2 0 1 0 8 0 sockpl 384 472 0 455 4 1 3 4 0 8 1 mcl64k 65536 11 0 11 3 2 1 1 0 8 1 mcl16k 16384 1 0 1 1 0 1 1 0 8 1 mcl12k 12288 12 0 12 2 1 1 1 0 8 1 mcl9k 9216 8 0 8 3 2 1 1 0 8 1 mcl8k 8192 9 0 9 4 3 1 1 0 8 1 mcl4k 4096 33 0 33 3 2 1 1 0 8 1 mcl2k 2048 47275 0 47240 12 7 5 11 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 79716 0 79656 11 3 8 8 0 8 0 bufpl 256 6560 0 2081 281 0 281 281 0 8 0 anonpl 16 66764 0 59725 54 16 38 52 0 62 1 amapchunkpl 152 2386 0 2309 5 0 5 5 0 158 0 amappl16 192 2718 0 2245 45 18 27 37 0 8 3 amappl15 184 180 0 176 1 0 1 1 0 8 0 amappl14 176 135 0 134 2 1 1 1 0 8 0 amappl13 168 28 0 23 1 0 1 1 0 8 0 amappl12 160 121 0 119 1 0 1 1 0 8 0 amappl11 152 82 0 71 1 0 1 1 0 8 0 amappl10 144 155 0 154 2 1 1 1 0 8 0 amappl9 136 465 0 461 1 0 1 1 0 8 0 amappl8 128 128 0 114 1 0 1 1 0 8 0 amappl7 120 138 0 131 1 0 1 1 0 8 0 amappl6 112 109 0 100 1 0 1 1 0 8 0 amappl5 104 324 0 314 1 0 1 1 0 8 0 amappl4 96 658 0 635 2 1 1 2 0 8 0 amappl3 88 356 0 350 1 0 1 1 0 8 0 amappl2 80 4269 0 4227 2 0 2 2 0 8 1 amappl1 72 19719 0 19326 25 15 10 19 0 8 0 amappl 72 1383 0 1354 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 20 0 3 1 0 1 1 0 8 0 uaddrrnd 24 594 0 581 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 594 0 581 1 0 1 1 0 8 0 vmmpekpl 168 8071 0 8054 1 0 1 1 0 8 0 vmmpepl 168 70278 0 68986 103 25 78 78 0 357 14 vmsppl 264 593 0 581 2 1 1 2 0 8 0 pdppl 4096 1194 0 1162 5 0 5 5 0 8 0 pvpl 32 219704 0 209703 147 29 118 139 0 265 19 pmappl 192 593 0 581 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 425 0 20 12 0 12 12 0 8 0