panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *470713 70131 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,ffff8000149ec850,3,ffff8000ffff8260) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149ec850,3,ffff8000ffff8260) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8029a4aa80,80084b01,ffff8000149ec850,3,fffffd803f7c6ae0,ffff8000ffff8260) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f960010,80084b01,ffff8000149ec850,ffff8000ffff8260) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff8260,ffff8000149ec990,ffff8000149ec980) at sys_ioctl+0x638 syscall(ffff8000149eca30) at syscall+0x541 Xsyscall(6,36,7f7ffffd6208,36,3,c0c20100890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd5d20, 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,ffff8000149ec850,3,ffff8000ffff8260) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149ec850,3,ffff8000ffff8260) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8029a4aa80,80084b01,ffff8000149ec850,3,fffffd803f7c6ae0,ffff8000ffff8260) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f960010,80084b01,ffff8000149ec850,ffff8000ffff8260) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff8260,ffff8000149ec990,ffff8000149ec980) at sys_ioctl+0x638 syscall(ffff8000149eca30) at syscall+0x541 Xsyscall(6,36,7f7ffffd6208,36,3,c0c20100890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd5d20, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149ec480 rbx 0xffff8000149ec530 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149ec440 r9 0x1 r10 0 r11 0x8948897cb07a4257 r12 0x3000000008 r13 0xffff8000149ec490 r14 0x100 r15 0x1 rip 0xffffffff812c72d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149ec470 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=470713 stat=onproc flags process=2 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8008,0xffffffff8224cb48 process=0xffff8000ffff6358 user=0xffff8000149e7000, vmspace=0xfffffd803f014108 estcpu=0, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *70131 470713 35745 0 7 0x2 syz-executor.0 56084 338823 35745 0 3 0x82 piperd syz-executor.1 55222 357832 1 0 3 0x100083 ttyin getty 55888 394864 0 0 3 0x14200 bored sosplice 35745 28284 97591 0 3 0x82 thrsleep syz-fuzzer 35745 101939 97591 0 3 0x4000082 thrsleep syz-fuzzer 35745 41553 97591 0 3 0x4000082 thrsleep syz-fuzzer 35745 172182 97591 0 3 0x4000082 kqread syz-fuzzer 35745 89743 97591 0 3 0x4000082 thrsleep syz-fuzzer 35745 304789 97591 0 3 0x4000082 thrsleep syz-fuzzer 35745 324247 97591 0 3 0x4000082 thrsleep syz-fuzzer 35745 383139 97591 0 3 0x4000082 thrsleep syz-fuzzer 97591 13646 17622 0 3 0x10008a pause ksh 17622 241132 76572 0 3 0x92 select sshd 76572 478746 1 0 3 0x80 select sshd 58730 449357 10019 73 3 0x100090 kqread syslogd 10019 297565 1 0 3 0x100082 netio syslogd 31987 247653 1 77 3 0x100090 poll dhclient 45980 121637 1 0 3 0x80 poll dhclient 68049 488851 0 0 3 0x14200 pgzero zerothread 730 4250 0 0 3 0x14200 aiodoned aiodoned 16841 79990 0 0 3 0x14200 syncer update 18854 119734 0 0 3 0x14200 cleaner cleaner 23208 300057 0 0 3 0x14200 reaper reaper 59255 46516 0 0 3 0x14200 pgdaemon pagedaemon 74685 430020 0 0 3 0x14200 bored crynlk 76148 267476 0 0 3 0x14200 bored crypto 59655 468885 0 0 3 0x40014200 acpi0 acpi0 59197 108841 0 0 3 0x14200 bored softnet 76545 172390 0 0 3 0x14200 bored systqmp 41216 238468 0 0 3 0x14200 bored systq 77986 330259 0 0 3 0x40014200 bored softclock 88227 60442 0 0 3 0x40014200 idle0 73662 250438 0 0 3 0x14200 bored smr 1 173422 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 9468 71862K 71870K 78643K 10800 0 0 pcb 23 9K 10K 78643K 1804 0 0 rtable 82 3K 3K 78643K 434 0 0 ifaddr 39 10K 12K 78643K 136 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 21 0 0 iov 0 0K 16K 78643K 113 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1197 75K 75K 78643K 1639 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 7 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 1K 1K 78643K 725 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 4 9K 21K 78643K 1185 0 0 sigio 0 0K 0K 78643K 9 0 0 proc 42 30K 46K 78643K 438 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 70 0 0 in_multi 22 1K 2K 78643K 96 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 243 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 72 12K 20K 78643K 3405 0 0 UVM aobj 20 2K 2K 78643K 31 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 17 0 0 NDP 7 0K 0K 78643K 41 0 0 temp 126 2357K 2424K 78643K 7138 0 0 kqueue 0 0K 0K 78643K 9 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 326 0 319 1 0 1 1 0 8 0 plimitpl 152 41 0 34 1 0 1 1 0 8 0 rtentry 112 77 0 46 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 10 0 10 1 1 0 1 0 8 0 tcpcb 544 104 0 100 1 0 1 1 0 8 0 nd6 48 12 0 10 1 0 1 1 0 8 0 ppxss 1128 15 0 15 5 4 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 359 0 211 12 0 12 12 0 8 2 art_table 32 360 0 211 2 0 2 2 0 8 0 art_node 16 76 0 48 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 3 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 723 0 713 1 0 1 1 0 8 0 shmpl 112 29 0 11 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3672 0 2243 47 0 47 47 0 8 0 ffsino 240 3672 0 2243 85 0 85 85 0 8 0 nchpl 144 5891 0 4252 61 0 61 61 0 8 0 uvmvnodes 72 3861 0 0 71 0 71 71 0 8 0 vnodes 200 3861 0 0 204 0 204 204 0 8 0 namei 1024 17795 0 17795 2 1 1 1 0 8 1 scxspl 192 18159 0 18159 8 7 1 7 0 8 1 sigapl 432 1342 0 1330 2 0 2 2 0 8 0 futexpl 56 31358 0 31358 1 0 1 1 0 8 1 knotepl 112 319 0 298 1 0 1 1 0 8 0 kqueuepl 104 889 0 887 1 0 1 1 0 8 0 pipepl 112 578 0 559 2 1 1 1 0 8 0 fdescpl 424 1343 0 1330 2 0 2 2 0 8 0 filepl 120 10290 0 10202 4 0 4 4 0 8 1 lockfpl 104 2232 0 2232 2 1 1 1 0 8 1 lockfspl 32 1010 0 1010 2 1 1 1 0 8 1 sessionpl 112 23 0 14 1 0 1 1 0 8 0 pgrppl 48 39 0 30 1 0 1 1 0 8 0 ucredpl 96 3278 0 3271 1 0 1 1 0 8 0 zombiepl 144 1330 0 1330 2 1 1 1 0 8 1 processpl 840 1358 0 1330 4 0 4 4 0 8 0 procpl 600 2718 0 2683 4 0 4 4 0 8 1 sosppl 128 8 0 8 3 2 1 1 0 8 1 sockpl 384 2061 0 2044 3 0 3 3 0 8 1 mcl64k 65536 259 0 259 32 16 16 29 0 8 16 mcl16k 16384 4 0 4 3 2 1 1 0 8 1 mcl12k 12288 10 0 10 5 4 1 1 0 8 1 mcl9k 9216 9 0 9 5 4 1 1 0 8 1 mcl8k 8192 16 0 16 5 4 1 1 0 8 1 mcl4k 4096 40 0 40 3 2 1 1 0 8 1 mcl2k2 2112 5 0 5 4 4 0 1 0 8 0 mcl2k 2048 50211 0 50180 11 6 5 9 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 92916 0 92854 46 30 16 43 0 8 8 bufpl 256 8428 0 3944 281 0 281 281 0 8 0 anonpl 16 122124 0 114986 78 38 40 54 0 62 2 amapchunkpl 152 4943 0 4862 8 3 5 6 0 158 1 amappl16 192 6924 0 6445 61 31 30 37 0 8 5 amappl15 184 68 0 63 1 0 1 1 0 8 0 amappl14 176 32 0 31 2 1 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 361 0 358 1 0 1 1 0 8 0 amappl11 152 32 0 20 1 0 1 1 0 8 0 amappl10 144 729 0 727 2 1 1 1 0 8 0 amappl9 136 656 0 653 1 0 1 1 0 8 0 amappl8 128 237 0 222 1 0 1 1 0 8 0 amappl7 120 659 0 653 1 0 1 1 0 8 0 amappl6 112 54 0 47 1 0 1 1 0 8 0 amappl5 104 499 0 487 1 0 1 1 0 8 0 amappl4 96 1531 0 1508 2 1 1 2 0 8 0 amappl3 88 135 0 130 1 0 1 1 0 8 0 amappl2 80 10884 0 10842 2 0 2 2 0 8 0 amappl1 72 33830 0 33438 25 15 10 19 0 8 0 amappl 72 2962 0 2932 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 30 0 11 1 0 1 1 0 8 0 uaddrrnd 24 1343 0 1330 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1343 0 1330 1 0 1 1 0 8 0 vmmpekpl 168 12117 0 12097 2 0 2 2 0 8 0 vmmpepl 168 145315 0 144028 118 39 79 79 0 357 13 vmsppl 264 1342 0 1330 2 1 1 2 0 8 0 pdppl 4096 2692 0 2660 5 0 5 5 0 8 0 pvpl 32 362794 0 352659 188 60 128 142 0 265 28 pmappl 192 1342 0 1330 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 492 0 63 14 0 14 14 0 8 0