panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *165871 75515 0 0x2 0 0K syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 malloc(200000,2a,9) at malloc+0xad5 sys/kern/kern_malloc.c:242 kcovioctl(1b1300,80084b01,ffff800020c45840,3,ffff800020b74270) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c45840,3,ffff800020b74270) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8068808760,80084b01,ffff800020c45840,3,fffffd807f7c6a20,ffff800020b74270) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066e11148,80084b01,ffff800020c45840,ffff800020b74270) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b74270,ffff800020c45980,ffff800020c45970) at sys_ioctl+0x651 syscall(ffff800020c45a20) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c45a20) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7fffff22d8,36,3,4cdf2ad3890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff1df0, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic malloc: out of space in kmem_map ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 malloc(200000,2a,9) at malloc+0xad5 sys/kern/kern_malloc.c:242 kcovioctl(1b1300,80084b01,ffff800020c45840,3,ffff800020b74270) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c45840,3,ffff800020b74270) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8068808760,80084b01,ffff800020c45840,3,fffffd807f7c6a20,ffff800020b74270) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066e11148,80084b01,ffff800020c45840,ffff800020b74270) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b74270,ffff800020c45980,ffff800020c45970) at sys_ioctl+0x651 syscall(ffff800020c45a20) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c45a20) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7fffff22d8,36,3,4cdf2ad3890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff1df0, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c45470 rbx 0xffff800020c45520 rdx 0xffffffff81f8cf20 apollo_pio_rec+0x94b7 rcx 0 rax 0 r8 0xffffffff81793b13 kprintf+0x183 r9 0x1 r10 0x25 r11 0xb03cc0b8a1c5810 r12 0x3000000008 r13 0xffff800020c45480 r14 0x100 r15 0x1 rip 0xffffffff810c0a18 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c45460 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=165871 stat=onproc flags process=2 proc=0 pri=63, usrpri=63, nice=20 forw=0xffffffffffffffff, list=0xffff800020b159d0,0xffffffff82361320 process=0xffff800020b8c6a8 user=0xffff800020c40000, vmspace=0xfffffd807f00b2d0 estcpu=13, cpticks=23, pctcpu=0.43 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *75515 165871 82313 0 7 0x2 syz-executor.1 59447 385837 82313 0 3 0x82 nanosleep syz-executor.0 82313 202503 14035 0 3 0x82 thrsleep syz-fuzzer 82313 226274 14035 0 3 0x4000082 thrsleep syz-fuzzer 82313 370351 14035 0 3 0x4000082 thrsleep syz-fuzzer 82313 210049 14035 0 3 0x4000082 thrsleep syz-fuzzer 82313 83967 14035 0 3 0x4000082 thrsleep syz-fuzzer 82313 90174 14035 0 3 0x4000082 thrsleep syz-fuzzer 82313 358625 14035 0 3 0x4000082 thrsleep syz-fuzzer 82313 232913 14035 0 3 0x4000082 kqread syz-fuzzer 82313 35172 14035 0 3 0x4000082 thrsleep syz-fuzzer 82313 41551 14035 0 3 0x4000082 thrsleep syz-fuzzer 14035 451617 86461 0 3 0x10008a pause ksh 86461 194298 65388 0 3 0x92 select sshd 71869 89472 1 0 3 0x100083 ttyin getty 65388 83958 1 0 3 0x80 select sshd 98112 506603 81008 74 3 0x100092 bpf pflogd 81008 397009 1 0 3 0x80 netio pflogd 67435 432750 18667 73 3 0x100090 kqread syslogd 18667 381198 1 0 3 0x100082 netio syslogd 52879 3897 1 77 3 0x100090 poll dhclient 699 508185 1 0 3 0x80 poll dhclient 36376 245516 0 0 3 0x14200 pgzero zerothread 54589 489949 0 0 3 0x14200 aiodoned aiodoned 75065 362304 0 0 3 0x14200 syncer update 72686 85696 0 0 3 0x14200 cleaner cleaner 83302 115446 0 0 3 0x14200 reaper reaper 20261 24618 0 0 3 0x14200 pgdaemon pagedaemon 13679 98367 0 0 3 0x14200 bored crynlk 88346 126802 0 0 3 0x14200 bored crypto 50854 305439 0 0 3 0x40014200 acpi0 acpi0 99090 18235 0 0 7 0x40014200 idle1 76219 512382 0 0 3 0x14200 bored softnet 94904 47497 0 0 3 0x14200 bored systqmp 99405 130345 0 0 3 0x14200 bored systq 66973 132170 0 0 3 0x40014200 bored softclock 53929 217129 0 0 3 0x40014200 idle0 48485 217667 0 0 3 0x14200 bored smr 1 398766 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 75515 (syz-executor.1) thread 0xffff800020b74270 (165871) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8237aa40) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 syscall+0x48b mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x48b sys/arch/amd64/amd64/trap.c:574 #2 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9459 71925K 71933K 78643K 10569 0 0 pcb 25 9K 10K 78643K 69 0 0 rtable 82 3K 4K 78643K 192 0 0 ifaddr 33 9K 10K 78643K 44 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1471 0 0 iov 0 0K 12K 78643K 5 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1200 75K 75K 78643K 1233 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 4 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 12 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 25K 78643K 76 0 0 proc 54 51K 83K 78643K 332 0 0 subproc 53 55297K 67586K 78643K 89 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 10 0 0 in_multi 22 1K 2K 78643K 34 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 36 159K 159K 78643K 36 0 0 exec 0 0K 1K 78643K 202 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 78 12K 21K 78643K 1070 0 0 UVM aobj 7 2K 2K 78643K 7 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 4 0 0 NDP 5 0K 0K 78643K 11 0 0 temp 79 2368K 2433K 78643K 3337 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 4 0 1 1 0 1 1 0 8 0 inpcbpl 280 59 0 52 1 0 1 1 0 8 0 plimitpl 152 18 0 10 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 41 0 10 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 4 0 4 1 1 0 1 0 8 0 tcpcb 544 22 0 18 1 0 1 1 0 8 0 nd6 48 4 0 2 1 0 1 1 0 8 0 ppxss 1128 1 0 1 1 0 1 1 0 8 1 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 14 0 2 1 0 1 1 0 8 0 pfstkey 112 14 0 2 1 0 1 1 0 8 0 pfstate 328 14 0 2 2 0 2 2 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 184 0 41 12 0 12 12 0 8 2 art_table 32 185 0 41 2 0 2 2 0 8 0 art_node 16 40 0 12 1 0 1 1 0 8 0 semupl 112 2 0 2 1 0 1 1 0 8 1 semapl 112 10 0 0 1 0 1 1 0 8 0 shmpl 112 5 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1530 0 111 46 0 46 46 0 8 0 ffsino 272 1530 0 111 95 0 95 95 0 8 0 nchpl 144 1855 0 220 61 0 61 61 0 8 0 uvmvnodes 72 1589 0 0 29 0 29 29 0 8 0 vnodes 200 1589 0 0 84 0 84 84 0 8 0 namei 1024 4766 0 4766 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 4754 0 4754 7 3 4 6 0 8 4 sigapl 432 272 0 258 3 0 3 3 0 8 1 futexpl 56 712 0 712 1 0 1 1 0 8 1 knotepl 112 73 0 52 1 0 1 1 0 8 0 kqueuepl 104 20 0 18 1 0 1 1 0 8 0 pipepl 112 206 0 187 2 1 1 1 0 8 0 fdescpl 488 273 0 258 3 0 3 3 0 8 0 filepl 152 1415 0 1322 5 0 5 5 0 8 1 lockfpl 104 22 0 22 2 1 1 1 0 8 1 lockfspl 32 8 0 8 2 1 1 1 0 8 1 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 20 0 10 1 0 1 1 0 8 0 ucredpl 96 120 0 111 1 0 1 1 0 8 0 zombiepl 144 258 0 257 2 1 1 1 0 8 0 processpl 840 288 0 257 4 0 4 4 0 8 0 procpl 600 417 0 377 4 0 4 4 0 8 0 srpgc 64 6 0 6 1 0 1 1 0 8 1 sockpl 384 105 0 86 3 0 3 3 0 8 1 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 1 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 136 0 0 16 0 16 16 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 150 0 0 10 1 9 9 0 8 0 bufpl 256 5842 0 1143 294 0 294 294 0 8 0 anonpl 16 37779 0 30887 47 2 45 45 0 125 8 amapchunkpl 152 1102 0 1019 6 0 6 6 0 158 1 amappl16 192 960 0 539 33 0 33 33 0 8 10 amappl15 184 57 0 53 1 0 1 1 0 8 0 amappl14 176 53 0 49 2 1 1 1 0 8 0 amappl13 168 55 0 51 1 0 1 1 0 8 0 amappl12 160 38 0 36 1 0 1 1 0 8 0 amappl11 152 24 0 9 1 0 1 1 0 8 0 amappl10 144 68 0 64 1 0 1 1 0 8 0 amappl9 136 581 0 576 1 0 1 1 0 8 0 amappl8 128 134 0 121 1 0 1 1 0 8 0 amappl7 120 31 0 27 1 0 1 1 0 8 0 amappl6 112 59 0 50 1 0 1 1 0 8 0 amappl5 104 122 0 109 1 0 1 1 0 8 0 amappl4 96 500 0 472 2 1 1 2 0 8 0 amappl3 88 175 0 166 1 0 1 1 0 8 0 amappl2 80 1214 0 1168 2 0 2 2 0 8 0 amappl1 72 15523 0 15099 25 12 13 20 0 8 3 amappl 72 654 0 622 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 6 0 0 1 0 1 1 0 8 0 uaddrrnd 24 273 0 258 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 273 0 258 1 0 1 1 0 8 0 vmmpekpl 168 6316 0 6295 2 0 2 2 0 8 0 vmmpepl 168 37122 0 35799 101 9 92 92 0 357 27 vmsppl 360 272 0 258 2 0 2 2 0 8 0 pdppl 4096 554 0 516 6 0 6 6 0 8 0 pvpl 32 136341 0 126310 126 6 120 120 0 265 23 pmappl 224 272 0 258 2 0 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 444 0 4 13 0 13 13 0 8 0