panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *336184 37561 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,ffff800020bf7ac0,3,ffff800020b29080) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020bf7ac0,3,ffff800020b29080) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80696249e0,80084b01,ffff800020bf7ac0,3,fffffd807f7c6840,ffff800020b29080) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80671d5a30,80084b01,ffff800020bf7ac0,ffff800020b29080) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b29080,ffff800020bf7c00,ffff800020bf7bf0) at sys_ioctl+0x651 syscall(ffff800020bf7ca0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020bf7ca0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffcd818,36,3,d5aa102b890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcd330, 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,ffff800020bf7ac0,3,ffff800020b29080) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020bf7ac0,3,ffff800020b29080) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80696249e0,80084b01,ffff800020bf7ac0,3,fffffd807f7c6840,ffff800020b29080) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80671d5a30,80084b01,ffff800020bf7ac0,ffff800020b29080) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b29080,ffff800020bf7c00,ffff800020bf7bf0) at sys_ioctl+0x651 syscall(ffff800020bf7ca0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020bf7ca0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffcd818,36,3,d5aa102b890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcd330, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020bf76f0 rbx 0xffff800020bf77a0 rdx 0xffffffff81f8ad7c cy_pio_rec+0x366f rcx 0 rax 0 r8 0xffffffff819bd5f3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x910ca9f3ee15b752 r12 0x3000000008 r13 0xffff800020bf7700 r14 0x100 r15 0x1 rip 0xffffffff81459958 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020bf76e0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=336184 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b28720,0xffffffff823dac40 process=0xffff800020b7c018 user=0xffff800020bf2000, vmspace=0xfffffd807effd168 estcpu=1, cpticks=3, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *37561 336184 95882 0 7 0x2 syz-executor.1 93116 97252 0 0 3 0x14200 bored sosplice 21419 47467 95882 0 3 0x82 piperd syz-executor.0 95882 349446 90013 0 3 0x82 thrsleep syz-fuzzer 95882 336793 90013 0 3 0x4000082 nanosleep syz-fuzzer 95882 466631 90013 0 3 0x4000082 thrsleep syz-fuzzer 95882 461569 90013 0 3 0x4000082 thrsleep syz-fuzzer 95882 206831 90013 0 3 0x4000082 kqread syz-fuzzer 95882 14455 90013 0 3 0x4000082 thrsleep syz-fuzzer 95882 513445 90013 0 3 0x4000082 thrsleep syz-fuzzer 95882 423834 90013 0 3 0x4000082 thrsleep syz-fuzzer 95882 65936 90013 0 3 0x4000082 thrsleep syz-fuzzer 95882 466121 90013 0 3 0x4000082 thrsleep syz-fuzzer 90013 3463 86947 0 3 0x10008a pause ksh 86947 115255 71417 0 3 0x92 select sshd 67300 368405 1 0 3 0x100083 ttyin getty 71417 374373 1 0 3 0x80 select sshd 31315 221904 77354 74 3 0x100092 bpf pflogd 77354 97565 1 0 3 0x80 netio pflogd 52819 202637 1945 73 3 0x100090 kqread syslogd 1945 162025 1 0 3 0x100082 netio syslogd 44958 171535 1 77 3 0x100090 poll dhclient 83286 164125 1 0 3 0x80 poll dhclient 6625 468093 0 0 3 0x14200 pgzero zerothread 26503 86926 0 0 3 0x14200 aiodoned aiodoned 1431 180380 0 0 3 0x14200 syncer update 5 520075 0 0 3 0x14200 cleaner cleaner 132 241430 0 0 3 0x14200 reaper reaper 96171 296027 0 0 3 0x14200 pgdaemon pagedaemon 85489 262089 0 0 3 0x14200 bored crynlk 31200 211278 0 0 3 0x14200 bored crypto 48857 97489 0 0 3 0x40014200 acpi0 acpi0 7370 312043 0 0 3 0x40014200 idle1 23863 333523 0 0 3 0x14200 bored softnet 98919 59925 0 0 3 0x14200 bored systqmp 49063 114379 0 0 3 0x14200 bored systq 33138 331350 0 0 3 0x40014200 bored softclock 86243 128296 0 0 7 0x40014200 idle0 92860 139210 0 0 3 0x14200 bored smr 1 84609 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 37561 (syz-executor.1) thread 0xffff800020b29080 (336184) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823ca8c0) 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 9481 71939K 71947K 78643K 10694 0 0 pcb 25 9K 11K 78643K 238 0 0 rtable 85 3K 4K 78643K 340 0 0 ifaddr 40 10K 12K 78643K 104 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1475 0 0 iov 0 0K 24K 78643K 38 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1197 75K 75K 78643K 1451 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 5 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 64 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 329 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 54 51K 71K 78643K 390 0 0 subproc 53 55297K 67586K 78643K 160 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 52 0 0 in_multi 22 1K 2K 78643K 64 0 0 ether_multi 1 0K 0K 78643K 3 0 0 mrt 0 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 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 217 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 29K 78643K 1959 0 0 UVM aobj 22 2K 2K 78643K 26 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 27 0 0 NDP 7 0K 0K 78643K 29 0 0 temp 109 2368K 2493K 78643K 4078 0 0 kqueue 0 0K 0K 78643K 5 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 6 0 3 1 0 1 1 0 8 0 inpcbpl 280 238 0 231 1 0 1 1 0 8 0 plimitpl 152 23 0 15 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 61 0 30 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 13 0 13 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 ppxss 1128 11 0 11 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 17 0 8 1 0 1 1 0 8 0 pfstkey 112 17 0 8 1 0 1 1 0 8 0 pfstate 328 17 0 8 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 267 0 123 12 0 12 12 0 8 2 art_table 32 268 0 123 2 0 2 2 0 8 0 art_node 16 58 0 30 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 2 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 58 0 48 1 0 1 1 0 8 0 shmpl 112 24 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2030 0 611 46 0 46 46 0 8 0 ffsino 272 2030 0 611 95 0 95 95 0 8 0 nchpl 144 2703 0 1065 61 0 61 61 0 8 0 uvmvnodes 72 2142 0 0 39 0 39 39 0 8 0 vnodes 200 2142 0 0 113 0 113 113 0 8 0 namei 1024 7683 0 7683 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 7021 0 7021 10 9 1 6 0 8 1 sigapl 432 516 0 502 2 0 2 2 0 8 0 futexpl 56 3944 0 3944 1 0 1 1 0 8 1 knotepl 112 217 0 188 3 1 2 2 0 8 1 kqueuepl 104 108 0 106 1 0 1 1 0 8 0 pipepl 112 392 0 373 2 1 1 1 0 8 0 fdescpl 488 517 0 502 3 0 3 3 0 8 0 filepl 152 3349 0 3256 5 0 5 5 0 8 1 lockfpl 104 113 0 113 2 1 1 1 0 8 1 lockfspl 32 202 0 202 2 1 1 1 0 8 1 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 27 0 17 1 0 1 1 0 8 0 ucredpl 96 812 0 803 1 0 1 1 0 8 0 zombiepl 144 502 0 502 2 1 1 1 0 8 1 processpl 840 533 0 502 4 0 4 4 0 8 0 procpl 600 1262 0 1222 4 0 4 4 0 8 0 srpgc 64 18 0 18 3 2 1 1 0 8 1 sosppl 128 7 0 7 1 0 1 1 0 8 1 sockpl 384 427 0 408 3 0 3 3 0 8 1 mcl64k 65536 229 0 0 29 2 27 29 0 8 1 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 3 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 112 0 0 13 0 13 13 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 304 0 0 18 0 18 18 0 8 0 bufpl 256 6149 0 1043 320 0 320 320 0 8 0 anonpl 16 62211 0 55256 46 9 37 43 0 125 1 amapchunkpl 152 2938 0 2854 9 5 4 9 0 158 0 amappl16 192 2016 0 1560 28 3 25 27 0 8 1 amappl15 184 5 0 4 1 0 1 1 0 8 0 amappl14 176 111 0 107 1 0 1 1 0 8 0 amappl13 168 406 0 401 1 0 1 1 0 8 0 amappl12 160 6 0 6 2 2 0 1 0 8 0 amappl11 152 222 0 208 1 0 1 1 0 8 0 amappl10 144 68 0 64 1 0 1 1 0 8 0 amappl9 136 378 0 374 1 0 1 1 0 8 0 amappl8 128 149 0 133 1 0 1 1 0 8 0 amappl7 120 250 0 243 1 0 1 1 0 8 0 amappl6 112 136 0 128 1 0 1 1 0 8 0 amappl5 104 119 0 104 1 0 1 1 0 8 0 amappl4 96 318 0 292 2 1 1 2 0 8 0 amappl3 88 136 0 129 1 0 1 1 0 8 0 amappl2 80 3637 0 3592 2 0 2 2 0 8 1 amappl1 72 21021 0 20600 24 14 10 19 0 8 0 amappl 72 1515 0 1483 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 25 0 4 1 0 1 1 0 8 0 uaddrrnd 24 517 0 502 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 517 0 502 1 0 1 1 0 8 0 vmmpekpl 168 8465 0 8438 2 0 2 2 0 8 0 vmmpepl 168 63058 0 61706 108 28 80 80 0 357 14 vmsppl 360 516 0 502 2 0 2 2 0 8 0 pdppl 4096 1042 0 1004 6 0 6 6 0 8 0 pvpl 32 199467 0 189457 124 21 103 115 0 265 5 pmappl 224 516 0 502 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 507 0 6 15 0 15 15 0 8 0