panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 75891 231 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,ffff800020c17560,3,ffff800020b29080) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c17560,3,ffff800020b29080) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8061f4e978,80084b01,ffff800020c17560,3,fffffd807f7c6780,ffff800020b29080) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80674c7c98,80084b01,ffff800020c17560,ffff800020b29080) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b29080,ffff800020c176a0,ffff800020c17690) at sys_ioctl+0x651 syscall(ffff800020c17740) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c17740) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7fffffa8c8,36,3,7c1fd778890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffffa3e0, 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,ffff800020c17560,3,ffff800020b29080) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c17560,3,ffff800020b29080) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8061f4e978,80084b01,ffff800020c17560,3,fffffd807f7c6780,ffff800020b29080) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80674c7c98,80084b01,ffff800020c17560,ffff800020b29080) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b29080,ffff800020c176a0,ffff800020c17690) at sys_ioctl+0x651 syscall(ffff800020c17740) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c17740) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7fffffa8c8,36,3,7c1fd778890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffffa3e0, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c17190 rbx 0xffff800020c17240 rdx 0xffffffff81f8a3e4 cy_pio_rec+0x1c1 rcx 0 rax 0 r8 0xffffffff81a096d3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x5d31b1c4f8b1103c r12 0x3000000008 r13 0xffff800020c171a0 r14 0x100 r15 0x1 rip 0xffffffff81767cc8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c17180 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=75891 stat=onproc flags process=2 proc=0 pri=52, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffff800020b28018,0xffffffff823c5f18 process=0xffff800020b7c360 user=0xffff800020c12000, vmspace=0xfffffd807f00b2d0 estcpu=2, cpticks=3, pctcpu=0.0 user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND * 231 75891 17219 0 7 0x2 syz-executor.1 48715 53200 17219 0 3 0x82 piperd syz-executor.0 15917 42001 0 0 3 0x14200 bored sosplice 17219 27986 74816 0 3 0x82 thrsleep syz-fuzzer 17219 719 74816 0 3 0x4000082 thrsleep syz-fuzzer 17219 285537 74816 0 3 0x4000082 thrsleep syz-fuzzer 17219 320710 74816 0 3 0x4000082 thrsleep syz-fuzzer 17219 296182 74816 0 3 0x4000082 kqread syz-fuzzer 17219 127642 74816 0 3 0x4000082 thrsleep syz-fuzzer 17219 293671 74816 0 3 0x4000082 thrsleep syz-fuzzer 17219 239509 74816 0 3 0x4000082 thrsleep syz-fuzzer 17219 369948 74816 0 3 0x4000082 thrsleep syz-fuzzer 17219 308085 74816 0 3 0x4000082 thrsleep syz-fuzzer 17219 389866 74816 0 3 0x4000082 thrsleep syz-fuzzer 74816 184298 38478 0 3 0x10008a pause ksh 38478 346494 67550 0 3 0x92 select sshd 5718 325057 1 0 3 0x100083 ttyin getty 67550 488607 1 0 3 0x80 select sshd 56099 483816 63852 74 3 0x100092 bpf pflogd 63852 300848 1 0 3 0x80 netio pflogd 63372 309643 41750 73 3 0x100090 kqread syslogd 41750 297017 1 0 3 0x100082 netio syslogd 79819 244645 1 77 3 0x100090 poll dhclient 24650 451622 1 0 3 0x80 poll dhclient 46804 250466 0 0 3 0x14200 pgzero zerothread 47924 422927 0 0 3 0x14200 aiodoned aiodoned 53877 417433 0 0 3 0x14200 syncer update 37082 211171 0 0 3 0x14200 cleaner cleaner 65050 417046 0 0 3 0x14200 reaper reaper 42864 69278 0 0 3 0x14200 pgdaemon pagedaemon 87973 480711 0 0 3 0x14200 bored crynlk 61103 374517 0 0 3 0x14200 bored crypto 27679 38012 0 0 3 0x40014200 acpi0 acpi0 85194 494271 0 0 7 0x40014200 idle1 93143 253722 0 0 3 0x14200 bored softnet 86010 420822 0 0 3 0x14200 bored systqmp 84933 209630 0 0 3 0x14200 bored systq 91749 513755 0 0 3 0x40014200 bored softclock 96580 482789 0 0 3 0x40014200 idle0 35355 439972 0 0 3 0x14200 bored smr 1 522175 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 231 (syz-executor.1) thread 0xffff800020b29080 (75891) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823d2f80) 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 9472 71928K 71936K 78643K 10625 0 0 pcb 25 9K 10K 78643K 142 0 0 rtable 82 3K 4K 78643K 279 0 0 ifaddr 37 10K 11K 78643K 73 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1473 0 0 iov 0 0K 24K 78643K 33 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1198 75K 75K 78643K 1363 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 30 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 197 0 0 proc 53 50K 71K 78643K 399 0 0 subproc 53 55297K 67586K 78643K 161 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 28 0 0 in_multi 22 1K 2K 78643K 58 0 0 ether_multi 1 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 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 212 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 80 12K 30K 78643K 1474 0 0 UVM aobj 25 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 2 0 0 NDP 6 0K 0K 78643K 21 0 0 temp 96 2367K 2432K 78643K 3702 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 114 0 107 1 0 1 1 0 8 0 plimitpl 152 22 0 14 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 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 7 0 7 1 1 0 1 0 8 0 tcpcb 544 43 0 39 1 0 1 1 0 8 0 nd6 48 8 0 6 1 0 1 1 0 8 0 ppxss 1128 4 0 4 1 1 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 16 0 4 1 0 1 1 0 8 0 pfstkey 112 16 0 4 1 0 1 1 0 8 0 pfstate 328 16 0 4 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 122 12 0 12 12 0 8 2 art_table 32 268 0 122 2 0 2 2 0 8 0 art_node 16 58 0 30 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 6 1 0 1 1 0 8 0 semupl 112 4 0 4 1 1 0 1 0 8 0 semapl 112 28 0 18 1 0 1 1 0 8 0 shmpl 112 24 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1777 0 356 46 0 46 46 0 8 0 ffsino 272 1777 0 356 95 0 95 95 0 8 0 nchpl 144 2268 0 630 61 0 61 61 0 8 0 uvmvnodes 72 1883 0 0 35 0 35 35 0 8 0 vnodes 200 1883 0 0 100 0 100 100 0 8 0 namei 1024 6342 0 6342 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 1 0 1 0 8 0 scxspl 192 6164 0 6164 9 6 3 6 0 8 3 sigapl 432 384 0 370 2 0 2 2 0 8 0 futexpl 56 2158 0 2158 1 0 1 1 0 8 1 knotepl 112 158 0 129 2 1 1 2 0 8 0 kqueuepl 104 27 0 25 1 0 1 1 0 8 0 pipepl 112 254 0 235 1 0 1 1 0 8 0 fdescpl 488 385 0 370 5 2 3 3 0 8 1 filepl 152 2280 0 2187 6 1 5 5 0 8 1 lockfpl 104 94 0 94 2 1 1 1 0 8 1 lockfspl 32 51 0 51 2 1 1 1 0 8 1 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 22 0 12 1 0 1 1 0 8 0 ucredpl 96 406 0 397 1 0 1 1 0 8 0 zombiepl 144 370 0 370 2 1 1 1 0 8 1 processpl 840 401 0 370 4 0 4 4 0 8 0 procpl 600 786 0 745 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 231 0 212 4 1 3 3 0 8 1 mcl64k 65536 1 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 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 4 0 0 1 0 1 1 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 126 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 145 0 0 9 0 9 9 0 8 0 bufpl 256 6035 0 1044 312 0 312 312 0 8 0 anonpl 16 46292 0 39399 41 2 39 39 0 125 3 amapchunkpl 152 2136 0 2049 10 1 9 9 0 158 5 amappl16 192 1298 0 879 24 1 23 23 0 8 1 amappl15 184 29 0 27 1 0 1 1 0 8 0 amappl14 176 76 0 71 1 0 1 1 0 8 0 amappl13 168 30 0 27 1 0 1 1 0 8 0 amappl12 160 60 0 58 1 0 1 1 0 8 0 amappl11 152 284 0 271 1 0 1 1 0 8 0 amappl10 144 65 0 62 1 0 1 1 0 8 0 amappl9 136 434 0 430 1 0 1 1 0 8 0 amappl8 128 150 0 135 1 0 1 1 0 8 0 amappl7 120 34 0 27 1 0 1 1 0 8 0 amappl6 112 104 0 97 1 0 1 1 0 8 0 amappl5 104 141 0 127 1 0 1 1 0 8 0 amappl4 96 340 0 313 2 1 1 2 0 8 0 amappl3 88 133 0 128 1 0 1 1 0 8 0 amappl2 80 2271 0 2227 3 1 2 2 0 8 1 amappl1 72 18416 0 17994 24 14 10 19 0 8 0 amappl 72 1037 0 1004 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 1 1 0 1 1 0 8 0 uaddrrnd 24 385 0 370 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 385 0 370 1 0 1 1 0 8 0 vmmpekpl 168 7222 0 7197 2 0 2 2 0 8 0 vmmpepl 168 48944 0 47632 93 16 77 77 0 357 14 vmsppl 360 384 0 370 2 0 2 2 0 8 0 pdppl 4096 778 0 740 6 0 6 6 0 8 0 pvpl 32 163465 0 153506 118 10 108 108 0 265 13 pmappl 224 384 0 370 2 1 1 2 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