panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *115578 22979 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(1c1300,80084b01,ffff800020c4f850,3,ffff800020b744c8) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1c1300,80084b01,ffff800020c4f850,3,ffff800020b744c8) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8061de3898,80084b01,ffff800020c4f850,3,fffffd807f7c68a0,ffff800020b744c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd807b9b2138,80084b01,ffff800020c4f850,ffff800020b744c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b744c8,ffff800020c4f990,ffff800020c4f980) at sys_ioctl+0x651 syscall(ffff800020c4fa30) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c4fa30) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffe7eb8,36,3,f0913ac958) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe79d0, 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(1c1300,80084b01,ffff800020c4f850,3,ffff800020b744c8) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1c1300,80084b01,ffff800020c4f850,3,ffff800020b744c8) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8061de3898,80084b01,ffff800020c4f850,3,fffffd807f7c68a0,ffff800020b744c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd807b9b2138,80084b01,ffff800020c4f850,ffff800020b744c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b744c8,ffff800020c4f990,ffff800020c4f980) at sys_ioctl+0x651 syscall(ffff800020c4fa30) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c4fa30) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffe7eb8,36,3,f0913ac958) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe79d0, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c4f480 rbx 0xffff800020c4f530 rdx 0xffffffff81f89e77 apollo_pio_rec+0x9e22 rcx 0 rax 0 r8 0xffffffff811c43a3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x27b653e10118382 r12 0x3000000008 r13 0xffff800020c4f490 r14 0x100 r15 0x1 rip 0xffffffff81e2e758 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c4f470 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=115578 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b75530,0xffffffff82394e00 process=0xffff800020b8d080 user=0xffff800020c4a000, vmspace=0xfffffd807effe9d8 estcpu=1, cpticks=3, pctcpu=0.0 user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *22979 115578 67672 0 7 0x2 syz-executor.1 32568 317190 67672 0 3 0x82 piperd syz-executor.0 90379 433891 1 0 3 0x100083 ttyin getty 36985 352774 0 0 3 0x14200 bored sosplice 67672 62135 96389 0 3 0x82 thrsleep syz-fuzzer 67672 57860 96389 0 3 0x4000082 thrsleep syz-fuzzer 67672 82690 96389 0 3 0x4000082 thrsleep syz-fuzzer 67672 57189 96389 0 3 0x4000082 thrsleep syz-fuzzer 67672 362663 96389 0 3 0x4000082 kqread syz-fuzzer 67672 276967 96389 0 3 0x4000082 thrsleep syz-fuzzer 67672 76843 96389 0 3 0x4000082 thrsleep syz-fuzzer 67672 227647 96389 0 3 0x4000082 thrsleep syz-fuzzer 67672 7950 96389 0 3 0x4000082 thrsleep syz-fuzzer 67672 51005 96389 0 3 0x4000082 thrsleep syz-fuzzer 96389 119648 96828 0 3 0x10008a pause ksh 96828 273999 87590 0 3 0x92 select sshd 87590 119790 1 0 3 0x80 select sshd 9990 487018 63146 74 3 0x100092 bpf pflogd 63146 461850 1 0 3 0x80 netio pflogd 45680 211773 81337 73 3 0x100090 kqread syslogd 81337 141359 1 0 3 0x100082 netio syslogd 36761 32144 1 77 3 0x100090 poll dhclient 64955 415800 1 0 3 0x80 poll dhclient 52753 448916 0 0 3 0x14200 pgzero zerothread 3257 131181 0 0 3 0x14200 aiodoned aiodoned 72270 254549 0 0 3 0x14200 syncer update 73468 468609 0 0 3 0x14200 cleaner cleaner 32179 514572 0 0 3 0x14200 reaper reaper 78701 427886 0 0 3 0x14200 pgdaemon pagedaemon 5974 223942 0 0 3 0x14200 bored crynlk 91881 35577 0 0 3 0x14200 bored crypto 62696 149910 0 0 3 0x40014200 acpi0 acpi0 58647 454000 0 0 7 0x40014200 idle1 89542 218178 0 0 3 0x14200 bored softnet 52163 228046 0 0 3 0x14200 bored systqmp 12510 291456 0 0 3 0x14200 bored systq 97997 119627 0 0 3 0x40014200 bored softclock 98552 91563 0 0 3 0x40014200 idle0 92711 203739 0 0 3 0x14200 bored smr 1 252765 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 22979 (syz-executor.1) thread 0xffff800020b744c8 (115578) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8234a3d0) 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 9520 72080K 72100K 78643K 10910 0 0 pcb 25 9K 11K 78643K 609 0 0 rtable 82 3K 4K 78643K 507 0 0 ifaddr 52 12K 14K 78643K 169 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1486 0 0 iov 0 0K 20K 78643K 110 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1205 75K 76K 78643K 1735 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 13 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 109 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 874 0 0 sigio 0 0K 0K 78643K 13 0 0 proc 53 50K 71K 78643K 550 0 0 subproc 55 57345K 67586K 78643K 261 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 124 0 0 in_multi 22 1K 2K 78643K 149 0 0 ether_multi 1 0K 0K 78643K 10 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 289 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 84 13K 30K 78643K 3783 0 0 UVM aobj 54 2K 2K 78643K 60 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 47 0 0 NDP 11 0K 0K 78643K 52 0 0 temp 156 2378K 2446K 78643K 5865 0 0 kqueue 0 0K 0K 78643K 10 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 9 0 6 1 0 1 1 0 8 0 inpcbpl 280 568 0 561 1 0 1 1 0 8 0 plimitpl 152 53 0 45 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 86 0 55 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 220 0 216 1 0 1 1 0 8 0 nd6 48 14 0 12 1 0 1 1 0 8 0 ppxss 1128 18 0 18 5 5 0 1 0 8 0 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 29 0 20 1 0 1 1 0 8 0 pfstkey 112 29 0 20 1 0 1 1 0 8 0 pfstate 328 29 0 20 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 393 0 246 12 0 12 12 0 8 1 art_table 32 394 0 246 2 0 2 2 0 8 0 art_node 16 85 0 57 1 0 1 1 0 8 0 sysvmsgpl 40 22 0 5 1 0 1 1 0 8 0 semapl 112 107 0 97 1 0 1 1 0 8 0 shmpl 112 58 0 6 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2975 0 1535 47 0 47 47 0 8 0 ffsino 272 2975 0 1535 96 0 96 96 0 8 0 nchpl 144 4458 0 2806 63 1 62 62 0 8 0 uvmvnodes 72 3197 0 0 59 0 59 59 0 8 0 vnodes 200 3197 0 0 169 0 169 169 0 8 0 namei 1024 13793 0 13793 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 12875 0 12875 15 13 2 6 0 8 2 sigapl 432 1056 0 1042 2 0 2 2 0 8 0 futexpl 56 10247 0 10247 1 0 1 1 0 8 1 knotepl 112 334 0 313 2 1 1 2 0 8 0 kqueuepl 104 228 0 226 1 0 1 1 0 8 0 pipepl 112 706 0 687 3 2 1 2 0 8 0 fdescpl 488 1057 0 1042 3 0 3 3 0 8 0 filepl 152 6528 0 6434 7 2 5 7 0 8 1 lockfpl 104 357 0 357 2 1 1 1 0 8 1 lockfspl 32 437 0 437 2 1 1 1 0 8 1 sessionpl 112 24 0 14 1 0 1 1 0 8 0 pgrppl 48 32 0 22 1 0 1 1 0 8 0 ucredpl 96 1346 0 1337 1 0 1 1 0 8 0 zombiepl 144 1042 0 1042 2 1 1 1 0 8 1 processpl 840 1073 0 1042 4 0 4 4 0 8 0 procpl 600 2989 0 2949 5 1 4 5 0 8 0 srpgc 64 36 0 36 5 4 1 1 0 8 1 sosppl 128 12 0 12 1 1 0 1 0 8 0 sockpl 384 1072 0 1053 6 3 3 4 0 8 1 mcl64k 65536 11 0 0 2 0 2 2 0 8 0 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 6 0 0 1 0 1 1 0 8 0 mcl9k 9216 7 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 13 0 0 2 0 2 2 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 133 0 0 16 0 16 16 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 209 0 0 11 0 11 11 0 8 0 bufpl 256 7953 0 1143 426 0 426 426 0 8 0 anonpl 16 107470 0 100326 58 4 54 55 0 125 16 amapchunkpl 152 6075 0 5983 10 1 9 9 0 158 4 amappl16 192 4736 0 4266 41 9 32 38 0 8 7 amappl15 184 133 0 129 1 0 1 1 0 8 0 amappl14 176 32 0 30 2 1 1 1 0 8 0 amappl13 168 75 0 71 1 0 1 1 0 8 0 amappl12 160 188 0 186 1 0 1 1 0 8 0 amappl11 152 23 0 8 1 0 1 1 0 8 0 amappl10 144 634 0 629 1 0 1 1 0 8 0 amappl9 136 608 0 603 1 0 1 1 0 8 0 amappl8 128 176 0 157 1 0 1 1 0 8 0 amappl7 120 68 0 62 1 0 1 1 0 8 0 amappl6 112 68 0 60 1 0 1 1 0 8 0 amappl5 104 308 0 293 1 0 1 1 0 8 0 amappl4 96 1308 0 1273 2 0 2 2 0 8 0 amappl3 88 154 0 149 1 0 1 1 0 8 0 amappl2 80 8194 0 8149 2 0 2 2 0 8 0 amappl1 72 33140 0 32716 25 15 10 20 0 8 0 amappl 72 3276 0 3242 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 59 0 6 1 0 1 1 0 8 0 uaddrrnd 24 1057 0 1042 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1057 0 1042 1 0 1 1 0 8 0 vmmpekpl 168 12979 0 12955 2 0 2 2 0 8 0 vmmpepl 168 118802 0 117426 126 43 83 83 0 357 12 vmsppl 360 1056 0 1042 2 0 2 2 0 8 0 pdppl 4096 2122 0 2084 6 0 6 6 0 8 0 pvpl 32 342725 0 332412 168 24 144 145 0 265 42 pmappl 224 1056 0 1042 3 2 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 584 0 4 17 0 17 17 0 8 0