panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *236884 29563 0 0x2 0 0K 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,ffff800020c47580,3,ffff800020b659e0) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c47580,3,ffff800020b659e0) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd807c1cbe68,80084b01,ffff800020c47580,3,fffffd807f7c6300,ffff800020b659e0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806c6dc570,80084b01,ffff800020c47580,ffff800020b659e0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b659e0,ffff800020c476c0,ffff800020c476b0) at sys_ioctl+0x651 syscall(ffff800020c47760) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c47760) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffd4c98,36,3,c76b827b890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd47b0, 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: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,ffff800020c47580,3,ffff800020b659e0) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c47580,3,ffff800020b659e0) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd807c1cbe68,80084b01,ffff800020c47580,3,fffffd807f7c6300,ffff800020b659e0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806c6dc570,80084b01,ffff800020c47580,ffff800020b659e0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b659e0,ffff800020c476c0,ffff800020c476b0) at sys_ioctl+0x651 syscall(ffff800020c47760) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c47760) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffd4c98,36,3,c76b827b890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd47b0, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c471b0 rbx 0xffff800020c47260 rdx 0xffffffff81f8be0b cy_pio_rec+0xbc9 rcx 0 rax 0 r8 0xffffffff81cff133 kprintf+0x183 r9 0x1 r10 0x25 r11 0x269e6f7868f0e6ef r12 0x3000000008 r13 0xffff800020c471c0 r14 0x100 r15 0x1 rip 0xffffffff81896608 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c471a0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=236884 stat=onproc flags process=2 proc=0 pri=52, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffff800020b64978,0xffffffff823613a0 process=0xffff800020b7c9f0 user=0xffff800020c42000, vmspace=0xfffffd807f00b9d8 estcpu=2, cpticks=4, pctcpu=0.0 user=0, sys=3, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *29563 236884 16717 0 7 0x2 syz-executor.1 4223 381807 0 0 3 0x14200 bored sosplice 9064 185480 16717 0 3 0x82 piperd syz-executor.0 16717 314034 35560 0 3 0x82 thrsleep syz-fuzzer 16717 442208 35560 0 3 0x4000082 thrsleep syz-fuzzer 16717 375572 35560 0 3 0x4000082 thrsleep syz-fuzzer 16717 98287 35560 0 3 0x4000082 thrsleep syz-fuzzer 16717 504890 35560 0 3 0x4000082 thrsleep syz-fuzzer 16717 332480 35560 0 3 0x4000082 thrsleep syz-fuzzer 16717 322859 35560 0 3 0x4000082 thrsleep syz-fuzzer 16717 108815 35560 0 3 0x4000082 thrsleep syz-fuzzer 16717 148758 35560 0 3 0x4000082 kqread syz-fuzzer 16717 171326 35560 0 3 0x4000082 thrsleep syz-fuzzer 35560 306907 32009 0 3 0x10008a pause ksh 32009 219454 6164 0 3 0x92 select sshd 80903 301939 1 0 3 0x100083 ttyin getty 6164 63662 1 0 3 0x80 select sshd 45473 190146 11382 74 3 0x100092 bpf pflogd 11382 139613 1 0 3 0x80 netio pflogd 85191 327405 82931 73 3 0x100090 kqread syslogd 82931 464616 1 0 3 0x100082 netio syslogd 14431 335467 1 77 3 0x100090 poll dhclient 42185 448310 1 0 3 0x80 poll dhclient 51511 429283 0 0 3 0x14200 pgzero zerothread 10232 11144 0 0 3 0x14200 aiodoned aiodoned 28032 267605 0 0 3 0x14200 syncer update 6994 104681 0 0 3 0x14200 cleaner cleaner 21827 168962 0 0 3 0x14200 reaper reaper 10687 50827 0 0 3 0x14200 pgdaemon pagedaemon 74220 327909 0 0 3 0x14200 bored crynlk 33537 382804 0 0 3 0x14200 bored crypto 75198 132363 0 0 3 0x40014200 acpi0 acpi0 19429 61896 0 0 7 0x40014200 idle1 91492 173660 0 0 3 0x14200 bored softnet 53220 191688 0 0 3 0x14200 bored systqmp 8539 153748 0 0 3 0x14200 bored systq 21169 276869 0 0 3 0x40014200 bored softclock 29973 45710 0 0 3 0x40014200 idle0 9791 477182 0 0 3 0x14200 bored smr 1 428513 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 29563 (syz-executor.1) thread 0xffff800020b659e0 (236884) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82373b28) 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 9490 71943K 71951K 78643K 10700 0 0 pcb 25 9K 10K 78643K 223 0 0 rtable 82 3K 4K 78643K 302 0 0 ifaddr 43 11K 13K 78643K 91 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1479 0 0 iov 0 0K 24K 78643K 45 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1197 75K 75K 78643K 1394 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 6 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 1K 1K 78643K 63 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 17K 78643K 302 0 0 proc 54 51K 71K 78643K 395 0 0 subproc 53 55297K 67586K 78643K 157 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 29 0 0 in_multi 22 1K 2K 78643K 67 0 0 ether_multi 1 0K 0K 78643K 3 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 48 212K 212K 78643K 48 0 0 exec 0 0K 1K 78643K 222 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 85 13K 22K 78643K 1815 0 0 UVM aobj 9 2K 2K 78643K 9 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 8 0K 0K 78643K 26 0 0 temp 109 2371K 2440K 78643K 3991 0 0 kqueue 0 0K 0K 78643K 3 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 6 0 3 1 0 1 1 0 8 0 inpcbpl 280 205 0 198 1 0 1 1 0 8 0 plimitpl 152 28 0 20 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 59 0 28 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 72 0 68 1 0 1 1 0 8 0 nd6 48 8 0 6 1 0 1 1 0 8 0 swfcl 56 1 0 0 1 0 1 1 0 8 0 ppxss 1128 7 0 7 2 1 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 18 0 7 1 0 1 1 0 8 0 pfstkey 112 18 0 7 1 0 1 1 0 8 0 pfstate 328 18 0 7 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 264 0 121 12 0 12 12 0 8 3 art_table 32 265 0 121 2 0 2 2 0 8 0 art_node 16 58 0 30 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 1 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 61 0 51 1 0 1 1 0 8 0 shmpl 112 7 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1942 0 522 46 0 46 46 0 8 0 ffsino 272 1942 0 522 95 0 95 95 0 8 0 nchpl 144 2551 0 913 61 0 61 61 0 8 0 uvmvnodes 72 2052 0 0 38 0 38 38 0 8 0 vnodes 200 2052 0 0 108 0 108 108 0 8 0 namei 1024 7129 0 7129 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 1 0 1 1 0 1 1 0 8 1 scxspl 192 6772 0 6772 8 7 1 6 0 8 1 sigapl 432 489 0 475 2 0 2 2 0 8 0 futexpl 56 3428 0 3428 1 0 1 1 0 8 1 knotepl 112 186 0 157 3 1 2 2 0 8 1 kqueuepl 104 106 0 104 1 0 1 1 0 8 0 pipepl 112 416 0 397 3 1 2 2 0 8 1 fdescpl 488 490 0 475 3 0 3 3 0 8 0 filepl 152 2903 0 2810 6 1 5 6 0 8 1 lockfpl 104 104 0 104 2 1 1 1 0 8 1 lockfspl 32 203 0 203 2 1 1 1 0 8 1 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 30 0 20 1 0 1 1 0 8 0 ucredpl 96 458 0 449 1 0 1 1 0 8 0 zombiepl 144 475 0 475 2 1 1 1 0 8 1 processpl 840 506 0 475 4 0 4 4 0 8 0 procpl 600 1115 0 1075 4 0 4 4 0 8 0 srpgc 64 18 0 18 2 1 1 1 0 8 1 sosppl 128 2 0 2 1 1 0 1 0 8 0 sockpl 384 387 0 368 3 0 3 3 0 8 1 mcl64k 65536 6 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 3 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 117 0 0 14 0 14 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 140 0 0 8 0 8 8 0 8 0 bufpl 256 6061 0 1043 314 0 314 314 0 8 0 anonpl 16 54110 0 47130 51 3 48 48 0 125 14 amapchunkpl 152 2414 0 2329 5 0 5 5 0 158 0 amappl16 192 1947 0 1498 35 4 31 35 0 8 8 amappl15 184 128 0 127 1 0 1 1 0 8 0 amappl14 176 29 0 23 1 0 1 1 0 8 0 amappl13 168 163 0 160 1 0 1 1 0 8 0 amappl12 160 10 0 9 2 1 1 1 0 8 0 amappl11 152 221 0 207 1 0 1 1 0 8 0 amappl10 144 66 0 63 1 0 1 1 0 8 0 amappl9 136 377 0 374 1 0 1 1 0 8 0 amappl8 128 228 0 205 1 0 1 1 0 8 0 amappl7 120 100 0 95 1 0 1 1 0 8 0 amappl6 112 63 0 52 1 0 1 1 0 8 0 amappl5 104 247 0 232 1 0 1 1 0 8 0 amappl4 96 313 0 289 2 1 1 2 0 8 0 amappl3 88 144 0 139 1 0 1 1 0 8 0 amappl2 80 3456 0 3411 2 0 2 2 0 8 1 amappl1 72 20123 0 19700 24 14 10 19 0 8 0 amappl 72 1367 0 1335 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 8 0 0 1 0 1 1 0 8 0 uaddrrnd 24 490 0 475 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 490 0 475 1 0 1 1 0 8 0 vmmpekpl 168 8155 0 8131 2 0 2 2 0 8 0 vmmpepl 168 59669 0 58326 96 16 80 80 0 357 17 vmsppl 360 489 0 475 2 0 2 2 0 8 0 pdppl 4096 988 0 950 6 0 6 6 0 8 0 pvpl 32 185322 0 175278 135 9 126 126 0 265 30 pmappl 224 489 0 475 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 464 0 4 14 0 14 14 0 8 0