panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *451683 26413 0 0x2 0 1K syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 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,ffff800020c195e0,3,ffff800020b29788) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c195e0,3,ffff800020b29788) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8069102d20,80084b01,ffff800020c195e0,3,fffffd807f7c6600,ffff800020b29788) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806cbf93a0,80084b01,ffff800020c195e0,ffff800020b29788) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b29788,ffff800020c19720,ffff800020c19710) at sys_ioctl+0x651 syscall(ffff800020c197c0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c197c0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7fffff8ff8,36,3,62f446da890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff8b10, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic malloc: out of space in kmem_map ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 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,ffff800020c195e0,3,ffff800020b29788) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c195e0,3,ffff800020b29788) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8069102d20,80084b01,ffff800020c195e0,3,fffffd807f7c6600,ffff800020b29788) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806cbf93a0,80084b01,ffff800020c195e0,ffff800020b29788) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b29788,ffff800020c19720,ffff800020c19710) at sys_ioctl+0x651 syscall(ffff800020c197c0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c197c0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7fffff8ff8,36,3,62f446da890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff8b10, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c19210 rbx 0xffff800020c192c0 rdx 0xffffffff81f88285 cy_pio_rec+0x127 rcx 0 rax 0 r8 0xffffffff81a01223 kprintf+0x183 r9 0x1 r10 0x25 r11 0x8b30baba9d405ff8 r12 0x3000000008 r13 0xffff800020c19220 r14 0x100 r15 0x1 rip 0xffffffff81655cb8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c19200 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=451683 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b292d8,0xffffffff8234d070 process=0xffff800020b7c018 user=0xffff800020c14000, vmspace=0xfffffd807effe5a0 estcpu=1, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *26413 451683 57616 0 7 0x2 syz-executor.1 94499 380505 57616 0 3 0x82 piperd syz-executor.0 49556 209277 0 0 3 0x14200 bored sosplice 42470 235332 1 0 3 0x100083 ttyin getty 57616 33626 26289 0 3 0x82 thrsleep syz-fuzzer 57616 497147 26289 0 3 0x4000082 thrsleep syz-fuzzer 57616 375536 26289 0 3 0x4000082 thrsleep syz-fuzzer 57616 360940 26289 0 3 0x4000082 kqread syz-fuzzer 57616 31559 26289 0 3 0x4000082 thrsleep syz-fuzzer 57616 363793 26289 0 3 0x4000082 thrsleep syz-fuzzer 57616 491541 26289 0 3 0x4000082 thrsleep syz-fuzzer 57616 200401 26289 0 3 0x4000082 thrsleep syz-fuzzer 57616 407542 26289 0 3 0x4000082 thrsleep syz-fuzzer 57616 174529 26289 0 3 0x4000082 thrsleep syz-fuzzer 26289 16524 66050 0 3 0x10008a pause ksh 66050 288083 71517 0 3 0x92 select sshd 71517 262562 1 0 3 0x80 select sshd 1011 258076 93061 74 3 0x100092 bpf pflogd 93061 504540 1 0 3 0x80 netio pflogd 83014 76456 23152 73 3 0x100090 kqread syslogd 23152 471249 1 0 3 0x100082 netio syslogd 26374 449262 0 0 3 0x14200 pgzero zerothread 89324 389895 0 0 3 0x14200 aiodoned aiodoned 38296 213015 0 0 3 0x14200 syncer update 93014 128549 0 0 3 0x14200 cleaner cleaner 69107 432711 0 0 3 0x14200 reaper reaper 65596 143118 0 0 3 0x14200 pgdaemon pagedaemon 55483 234358 0 0 3 0x14200 bored crynlk 59189 211206 0 0 3 0x14200 bored crypto 82667 2702 0 0 3 0x40014200 acpi0 acpi0 92339 123192 0 0 3 0x40014200 idle1 20382 460347 0 0 3 0x14200 bored softnet 65710 53462 0 0 3 0x14200 bored systqmp 59659 96956 0 0 3 0x14200 bored systq 94968 477872 0 0 3 0x40014200 bored softclock 9686 363030 0 0 7 0x40014200 idle0 23029 382554 0 0 3 0x14200 bored smr 1 416385 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 26413 (syz-executor.1) thread 0xffff800020b29788 (451683) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82372440) 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{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9522 71890K 71910K 78643K 11039 0 0 pcb 21 9K 11K 78643K 596 0 0 rtable 82 3K 4K 78643K 639 0 0 ifaddr 56 13K 15K 78643K 202 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1493 0 0 iov 0 0K 24K 78643K 162 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 76K 78643K 1900 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 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 164 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 1049 0 0 sigio 0 0K 0K 78643K 11 0 0 proc 54 51K 71K 78643K 674 0 0 subproc 53 55297K 67586K 78643K 397 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 144 0 0 in_multi 22 1K 2K 78643K 170 0 0 ether_multi 1 0K 0K 78643K 15 0 0 mrt 0 0K 0K 78643K 9 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 90 397K 397K 78643K 90 0 0 exec 0 0K 1K 78643K 342 0 0 pfkey data 0 0K 0K 78643K 2 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 79 12K 30K 78643K 4327 0 0 UVM aobj 48 2K 2K 78643K 51 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 62 0 0 NDP 12 0K 0K 78643K 66 0 0 temp 165 2379K 2446K 78643K 6388 0 0 kqueue 0 0K 0K 78643K 11 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 13 0 10 1 0 1 1 0 8 0 inpcbpl 280 582 0 578 1 0 1 1 0 8 0 plimitpl 152 51 0 44 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 125 0 94 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 184 0 180 1 0 1 1 0 8 0 rttmr 72 3 0 3 3 3 0 1 0 8 0 nd6 48 22 0 20 1 0 1 1 0 8 0 ppxss 1128 17 0 17 6 5 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 42 0 35 1 0 1 1 0 8 0 pfstkey 112 42 0 35 1 0 1 1 0 8 0 pfstate 328 42 0 35 2 1 1 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 590 0 442 14 2 12 14 0 8 0 art_table 32 591 0 442 2 0 2 2 0 8 0 art_node 16 124 0 96 1 0 1 1 0 8 0 sysvmsgpl 40 18 0 7 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 162 0 152 1 0 1 1 0 8 0 shmpl 112 49 0 3 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3304 0 1842 48 0 48 48 0 8 0 ffsino 272 3304 0 1842 98 0 98 98 0 8 0 nchpl 144 4989 0 3317 63 0 63 63 0 8 0 uvmvnodes 72 3590 0 0 66 0 66 66 0 8 0 vnodes 200 3590 0 0 189 0 189 189 0 8 0 namei 1024 15173 0 15173 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 13976 0 13976 13 12 1 6 0 8 1 sigapl 432 1216 0 1204 2 0 2 2 0 8 0 futexpl 56 11803 0 11803 1 0 1 1 0 8 1 knotepl 112 465 0 436 4 2 2 2 0 8 1 kqueuepl 104 284 0 282 1 0 1 1 0 8 0 pipepl 112 924 0 905 4 3 1 2 0 8 0 fdescpl 488 1217 0 1204 3 0 3 3 0 8 0 filepl 152 7624 0 7541 8 3 5 6 0 8 1 lockfpl 104 317 0 317 2 1 1 1 0 8 1 lockfspl 32 411 0 411 2 1 1 1 0 8 1 sessionpl 112 28 0 20 1 0 1 1 0 8 0 pgrppl 48 37 0 29 1 0 1 1 0 8 0 ucredpl 96 1652 0 1644 1 0 1 1 0 8 0 zombiepl 144 1204 0 1204 2 1 1 1 0 8 1 processpl 840 1233 0 1204 4 0 4 4 0 8 0 procpl 600 3438 0 3400 4 0 4 4 0 8 0 srpgc 64 63 0 63 4 3 1 1 0 8 1 sosppl 128 6 0 6 4 3 1 1 0 8 1 sockpl 384 1110 0 1098 4 1 3 4 0 8 1 mcl64k 65536 229 0 0 29 10 19 29 0 8 1 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 11 0 0 2 0 2 2 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 12 0 0 2 0 2 2 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 113 0 0 13 0 13 13 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 308 0 0 18 0 18 18 0 8 0 bufpl 256 7854 0 1049 426 0 426 426 0 8 0 anonpl 16 130537 0 123593 68 23 45 51 0 125 7 amapchunkpl 152 7687 0 7607 20 11 9 9 0 158 4 amappl16 192 5605 0 5145 55 29 26 36 0 8 2 amappl15 184 58 0 57 1 0 1 1 0 8 0 amappl14 176 348 0 342 1 0 1 1 0 8 0 amappl13 168 388 0 387 1 0 1 1 0 8 0 amappl12 160 236 0 233 1 0 1 1 0 8 0 amappl11 152 297 0 289 1 0 1 1 0 8 0 amappl10 144 305 0 302 1 0 1 1 0 8 0 amappl9 136 447 0 443 1 0 1 1 0 8 0 amappl8 128 428 0 409 1 0 1 1 0 8 0 amappl7 120 222 0 214 1 0 1 1 0 8 0 amappl6 112 371 0 360 1 0 1 1 0 8 0 amappl5 104 196 0 185 1 0 1 1 0 8 0 amappl4 96 391 0 368 2 1 1 2 0 8 0 amappl3 88 236 0 229 1 0 1 1 0 8 0 amappl2 80 10248 0 10212 2 0 2 2 0 8 0 amappl1 72 35776 0 35382 24 14 10 19 0 8 0 amappl 72 3756 0 3728 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 50 0 3 1 0 1 1 0 8 0 uaddrrnd 24 1217 0 1204 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1217 0 1204 1 0 1 1 0 8 0 vmmpekpl 168 14424 0 14397 2 0 2 2 0 8 0 vmmpepl 168 137451 0 136169 120 42 78 82 0 357 9 vmsppl 360 1216 0 1204 2 0 2 2 0 8 0 pdppl 4096 2442 0 2408 6 0 6 6 0 8 0 pvpl 32 381837 0 371912 171 52 119 132 0 265 18 pmappl 224 1216 0 1204 3 2 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 618 0 15 18 0 18 18 0 8 0