panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *448159 25526 0 0x2 0 1K 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,ffff800020c03b40,3,ffff800020b659e0) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c03b40,3,ffff800020b659e0) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8062a2c598,80084b01,ffff800020c03b40,3,fffffd807f7c6a80,ffff800020b659e0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8079702b60,80084b01,ffff800020c03b40,ffff800020b659e0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b659e0,ffff800020c03c80,ffff800020c03c70) at sys_ioctl+0x651 syscall(ffff800020c03d20) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c03d20) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffbc148,36,3,9f02c5f5890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbbc60, 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: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,ffff800020c03b40,3,ffff800020b659e0) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c03b40,3,ffff800020b659e0) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8062a2c598,80084b01,ffff800020c03b40,3,fffffd807f7c6a80,ffff800020b659e0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8079702b60,80084b01,ffff800020c03b40,ffff800020b659e0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b659e0,ffff800020c03c80,ffff800020c03c70) at sys_ioctl+0x651 syscall(ffff800020c03d20) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c03d20) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffbc148,36,3,9f02c5f5890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbbc60, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c03770 rbx 0xffff800020c03820 rdx 0xffffffff81f8b510 cy_pio_rec+0xb6d rcx 0 rax 0 r8 0xffffffff818b7283 kprintf+0x183 r9 0x1 r10 0x25 r11 0x28d83aecc659b4a r12 0x3000000008 r13 0xffff800020c03780 r14 0x100 r15 0x1 rip 0xffffffff8151a288 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c03760 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=448159 stat=onproc flags process=2 proc=0 pri=53, usrpri=53, nice=20 forw=0xffffffffffffffff, list=0xffff800020b652d8,0xffffffff8235e518 process=0xffff800020b7c360 user=0xffff800020bfe000, vmspace=0xfffffd807f00bca8 estcpu=3, cpticks=3, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *25526 448159 41139 0 7 0x2 syz-executor.1 5579 316169 41139 0 3 0x82 piperd syz-executor.0 21247 103102 1 0 3 0x100083 ttyin getty 85787 411337 0 0 3 0x14200 bored sosplice 41139 172620 89123 0 3 0x82 thrsleep syz-fuzzer 41139 325505 89123 0 3 0x4000082 nanosleep syz-fuzzer 41139 200056 89123 0 3 0x4000082 thrsleep syz-fuzzer 41139 144083 89123 0 3 0x4000082 kqread syz-fuzzer 41139 252960 89123 0 3 0x4000082 thrsleep syz-fuzzer 41139 442834 89123 0 3 0x4000082 thrsleep syz-fuzzer 41139 146432 89123 0 3 0x4000082 thrsleep syz-fuzzer 41139 413160 89123 0 3 0x4000082 thrsleep syz-fuzzer 41139 330166 89123 0 3 0x4000082 thrsleep syz-fuzzer 41139 510716 89123 0 3 0x4000082 thrsleep syz-fuzzer 89123 482163 51926 0 3 0x10008a pause ksh 51926 337743 61481 0 3 0x92 select sshd 61481 141616 1 0 3 0x80 select sshd 85890 275360 78035 74 3 0x100092 bpf pflogd 78035 338112 1 0 3 0x80 netio pflogd 48925 276276 63419 73 3 0x100090 kqread syslogd 63419 292073 1 0 3 0x100082 netio syslogd 48762 134731 1 77 3 0x100090 poll dhclient 27764 114692 1 0 3 0x80 poll dhclient 92561 269231 0 0 3 0x14200 pgzero zerothread 67708 521924 0 0 3 0x14200 aiodoned aiodoned 55899 228410 0 0 3 0x14200 syncer update 5329 94947 0 0 3 0x14200 cleaner cleaner 3434 403949 0 0 3 0x14200 reaper reaper 60646 408009 0 0 3 0x14200 pgdaemon pagedaemon 81423 308900 0 0 3 0x14200 bored crynlk 92866 97173 0 0 3 0x14200 bored crypto 44933 144673 0 0 3 0x40014200 acpi0 acpi0 89481 413685 0 0 3 0x40014200 idle1 21569 324972 0 0 3 0x14200 bored softnet 23609 492528 0 0 3 0x14200 bored systqmp 93939 302261 0 0 3 0x14200 bored systq 25379 521686 0 0 3 0x40014200 bored softclock 29271 169956 0 0 7 0x40014200 idle0 8112 47890 0 0 3 0x14200 bored smr 1 74409 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 25526 (syz-executor.1) thread 0xffff800020b659e0 (448159) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8234bf90) 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 9500 71939K 71947K 78643K 10934 0 0 pcb 25 9K 11K 78643K 547 0 0 rtable 82 3K 4K 78643K 740 0 0 ifaddr 46 11K 13K 78643K 225 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1496 0 0 iov 0 0K 16K 78643K 104 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1203 75K 76K 78643K 1769 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 16 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 152 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 966 0 0 sigio 0 0K 0K 78643K 21 0 0 proc 54 51K 71K 78643K 698 0 0 subproc 53 55297K 67586K 78643K 497 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 138 0 0 in_multi 22 1K 2K 78643K 234 0 0 ether_multi 1 0K 0K 78643K 14 0 0 mrt 0 0K 0K 78643K 2 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 319 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 88 13K 29K 78643K 3932 0 0 UVM aobj 47 3K 3K 78643K 54 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 38 0 0 NDP 9 0K 0K 78643K 75 0 0 temp 143 2374K 2444K 78643K 6493 0 0 kqueue 0 0K 0K 78643K 7 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 16 0 13 1 0 1 1 0 8 0 inpcbpl 280 565 0 558 1 0 1 1 0 8 0 plimitpl 152 67 0 59 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 149 0 118 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 174 0 170 1 0 1 1 0 8 0 nd6 48 28 0 26 1 0 1 1 0 8 0 ppxss 1128 24 0 24 5 4 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 34 0 27 1 0 1 1 0 8 0 pfstkey 112 34 0 27 1 0 1 1 0 8 0 pfstate 328 34 0 27 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 685 0 538 12 0 12 12 0 8 1 art_table 32 686 0 538 2 0 2 2 0 8 0 art_node 16 148 0 120 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 4 3 2 1 1 0 8 0 semapl 112 150 0 140 1 0 1 1 0 8 0 shmpl 112 52 0 7 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2936 0 1471 48 0 48 48 0 8 0 ffsino 272 2936 0 1471 98 0 98 98 0 8 0 nchpl 144 4465 0 2788 64 1 63 63 0 8 0 uvmvnodes 72 3278 0 0 60 0 60 60 0 8 0 vnodes 200 3278 0 0 173 0 173 173 0 8 0 namei 1024 13942 0 13942 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 3 0 3 2 2 0 1 0 8 0 scxspl 192 14010 0 14010 13 10 3 6 0 8 3 sigapl 432 1129 0 1115 2 0 2 2 0 8 0 futexpl 56 10935 0 10935 1 0 1 1 0 8 1 knotepl 112 497 0 476 1 0 1 1 0 8 0 kqueuepl 104 239 0 237 1 0 1 1 0 8 0 pipepl 112 850 0 831 4 2 2 2 0 8 1 fdescpl 488 1130 0 1115 3 0 3 3 0 8 0 filepl 152 7259 0 7166 6 0 6 6 0 8 2 lockfpl 104 212 0 212 2 1 1 1 0 8 1 lockfspl 32 114 0 114 2 1 1 1 0 8 1 sessionpl 112 33 0 23 1 0 1 1 0 8 0 pgrppl 48 51 0 41 1 0 1 1 0 8 0 ucredpl 96 1363 0 1354 1 0 1 1 0 8 0 zombiepl 144 1115 0 1115 2 1 1 1 0 8 1 processpl 840 1146 0 1115 4 0 4 4 0 8 0 procpl 600 2968 0 2928 4 0 4 4 0 8 0 srpgc 64 78 0 78 7 6 1 1 0 8 1 sosppl 128 14 0 14 4 4 0 1 0 8 0 sockpl 384 1019 0 1000 4 1 3 4 0 8 1 mcl64k 65536 10 0 0 2 0 2 2 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 9 0 0 1 0 1 1 0 8 0 mcl9k 9216 6 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 11 0 0 2 0 2 2 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 128 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 186 0 0 9 0 9 9 0 8 0 bufpl 256 7936 0 1149 425 0 425 425 0 8 0 anonpl 16 132587 0 125441 73 20 53 53 0 125 16 amapchunkpl 152 6637 0 6552 15 10 5 9 0 158 0 amappl16 192 5532 0 5077 60 28 32 36 0 8 8 amappl15 184 353 0 348 1 0 1 1 0 8 0 amappl14 176 290 0 285 2 1 1 1 0 8 0 amappl13 168 37 0 34 1 0 1 1 0 8 0 amappl12 160 233 0 232 1 0 1 1 0 8 0 amappl11 152 316 0 297 1 0 1 1 0 8 0 amappl10 144 205 0 203 1 0 1 1 0 8 0 amappl9 136 710 0 706 1 0 1 1 0 8 0 amappl8 128 311 0 288 1 0 1 1 0 8 0 amappl7 120 193 0 188 1 0 1 1 0 8 0 amappl6 112 197 0 189 1 0 1 1 0 8 0 amappl5 104 288 0 274 1 0 1 1 0 8 0 amappl4 96 1180 0 1147 2 1 1 2 0 8 0 amappl3 88 442 0 437 1 0 1 1 0 8 0 amappl2 80 8793 0 8747 2 0 2 2 0 8 0 amappl1 72 34416 0 33998 26 16 10 20 0 8 0 amappl 72 3316 0 3283 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 53 0 7 1 0 1 1 0 8 0 uaddrrnd 24 1130 0 1115 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1130 0 1115 1 0 1 1 0 8 0 vmmpekpl 168 13293 0 13271 2 0 2 2 0 8 0 vmmpepl 168 132854 0 131493 115 34 81 83 0 357 11 vmsppl 360 1129 0 1115 2 0 2 2 0 8 0 pdppl 4096 2268 0 2230 6 0 6 6 0 8 0 pvpl 32 390609 0 380296 184 49 135 138 0 265 35 pmappl 224 1129 0 1115 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 582 0 4 17 0 17 17 0 8 0