panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *476688 26092 0 0x2 0 0K syz-executor.0 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,ffff800020c11190,3,ffff800020b29080) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c11190,3,ffff800020b29080) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8062b31298,80084b01,ffff800020c11190,3,fffffd807f7c6a20,ffff800020b29080) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066ba71e0,80084b01,ffff800020c11190,ffff800020b29080) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b29080,ffff800020c112d0,ffff800020c112c0) at sys_ioctl+0x651 syscall(ffff800020c11370) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c11370) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7fffff18e8,36,3,369b0aa3890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff1400, 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(1b1300,80084b01,ffff800020c11190,3,ffff800020b29080) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c11190,3,ffff800020b29080) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8062b31298,80084b01,ffff800020c11190,3,fffffd807f7c6a20,ffff800020b29080) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066ba71e0,80084b01,ffff800020c11190,ffff800020b29080) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b29080,ffff800020c112d0,ffff800020c112c0) at sys_ioctl+0x651 syscall(ffff800020c11370) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c11370) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7fffff18e8,36,3,369b0aa3890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff1400, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c10dc0 rbx 0xffff800020c10e70 rdx 0xffffffff81f8b510 cy_pio_rec+0xb6d rcx 0 rax 0 r8 0xffffffff818b7283 kprintf+0x183 r9 0x1 r10 0x25 r11 0x8096268d6d0d8b0b r12 0x3000000008 r13 0xffff800020c10dd0 r14 0x100 r15 0x1 rip 0xffffffff8151a288 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c10db0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=476688 stat=onproc flags process=2 proc=0 pri=81, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff800020b28270,0xffffffff8235e518 process=0xffff800020b7d3c8 user=0xffff800020c0c000, vmspace=0xfffffd807f00b9d8 estcpu=31, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *26092 476688 30284 0 7 0x2 syz-executor.0 81160 497236 30284 0 3 0x82 piperd syz-executor.1 61891 92662 0 0 3 0x14200 bored sosplice 30284 81965 86225 0 3 0x82 thrsleep syz-fuzzer 30284 511367 86225 0 3 0x4000082 nanosleep syz-fuzzer 30284 28663 86225 0 3 0x4000082 thrsleep syz-fuzzer 30284 500411 86225 0 3 0x4000082 thrsleep syz-fuzzer 30284 419900 86225 0 3 0x4000082 thrsleep syz-fuzzer 30284 240055 86225 0 3 0x4000082 kqread syz-fuzzer 30284 446511 86225 0 3 0x4000082 thrsleep syz-fuzzer 30284 97320 86225 0 3 0x4000082 thrsleep syz-fuzzer 30284 14011 86225 0 3 0x4000082 thrsleep syz-fuzzer 30284 207622 86225 0 3 0x4000082 thrsleep syz-fuzzer 86225 91258 80011 0 3 0x10008a pause ksh 80011 514037 87016 0 3 0x92 select sshd 65700 284719 1 0 3 0x100083 ttyin getty 87016 476246 1 0 3 0x80 select sshd 77958 279004 72129 74 3 0x100092 bpf pflogd 72129 356049 1 0 3 0x80 netio pflogd 42494 461863 71884 73 3 0x100090 kqread syslogd 71884 153085 1 0 3 0x100082 netio syslogd 31928 63089 1 77 3 0x100090 poll dhclient 40590 27574 1 0 3 0x80 poll dhclient 1911 109857 0 0 3 0x14200 pgzero zerothread 73615 483068 0 0 3 0x14200 aiodoned aiodoned 8411 323010 0 0 3 0x14200 syncer update 62010 320238 0 0 3 0x14200 cleaner cleaner 27765 106867 0 0 3 0x14200 reaper reaper 42520 416723 0 0 3 0x14200 pgdaemon pagedaemon 83996 262781 0 0 3 0x14200 bored crynlk 93726 235408 0 0 3 0x14200 bored crypto 5454 16023 0 0 3 0x40014200 acpi0 acpi0 24549 425572 0 0 7 0x40014200 idle1 53966 522613 0 0 3 0x14200 bored softnet 81865 118219 0 0 3 0x14200 bored systqmp 9960 116533 0 0 3 0x14200 bored systq 61409 398046 0 0 3 0x40014200 bored softclock 88760 373336 0 0 3 0x40014200 idle0 97263 60509 0 0 3 0x14200 bored smr 1 258456 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 26092 (syz-executor.0) thread 0xffff800020b29080 (476688) 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{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9516 71951K 71959K 78643K 10902 0 0 pcb 25 9K 11K 78643K 525 0 0 rtable 82 3K 4K 78643K 575 0 0 ifaddr 52 12K 14K 78643K 191 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1494 0 0 iov 0 0K 24K 78643K 146 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1196 75K 75K 78643K 1790 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 17 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 691 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 1889 0 0 sigio 0 0K 0K 78643K 14 0 0 proc 53 50K 71K 78643K 581 0 0 subproc 53 55297K 67586K 78643K 327 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 93 0 0 in_multi 22 1K 2K 78643K 141 0 0 ether_multi 1 0K 0K 78643K 9 0 0 mrt 0 0K 0K 78643K 5 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 310 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 83 12K 29K 78643K 6708 0 0 UVM aobj 46 2K 2K 78643K 51 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 937 0 0 NDP 11 0K 0K 78643K 60 0 0 temp 158 2379K 2453K 78643K 7991 0 0 kqueue 0 0K 0K 78643K 6 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 11 0 8 1 0 1 1 0 8 0 inpcbpl 280 2012 0 2005 2 1 1 2 0 8 0 plimitpl 152 54 0 46 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 105 0 74 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 5 0 5 2 2 0 1 0 8 0 tcpcb 544 1183 0 1179 1 0 1 1 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 18 0 16 1 0 1 1 0 8 0 ppxss 1128 17 0 17 6 5 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 106 0 23 1 0 1 1 0 8 0 pfstkey 112 106 0 23 3 0 3 3 0 8 0 pfstate 328 106 0 23 8 0 8 8 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 490 0 343 12 0 12 12 0 8 2 art_table 32 491 0 343 2 0 2 2 0 8 0 art_node 16 104 0 76 1 0 1 1 0 8 0 sysvmsgpl 40 86 0 57 1 0 1 1 0 8 0 semapl 112 689 0 679 1 0 1 1 0 8 0 shmpl 112 49 0 5 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4025 0 2578 47 0 47 47 0 8 0 ffsino 272 4025 0 2578 97 0 97 97 0 8 0 nchpl 144 6669 0 5023 62 0 62 62 0 8 0 uvmvnodes 72 4266 0 0 78 0 78 78 0 8 0 vnodes 200 4266 0 0 225 0 225 225 0 8 0 namei 1024 21522 0 21522 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 19687 0 19687 11 10 1 6 0 8 1 sigapl 432 2064 0 2050 2 0 2 2 0 8 0 futexpl 56 21272 0 21272 1 0 1 1 0 8 1 knotepl 112 336 0 315 1 0 1 1 0 8 0 kqueuepl 104 206 0 204 1 0 1 1 0 8 0 pipepl 112 956 0 937 3 2 1 2 0 8 0 fdescpl 488 2065 0 2050 3 0 3 3 0 8 0 filepl 152 12243 0 12150 5 0 5 5 0 8 1 lockfpl 104 325 0 325 2 1 1 1 0 8 1 lockfspl 32 289 0 289 2 1 1 1 0 8 1 sessionpl 112 25 0 15 1 0 1 1 0 8 0 pgrppl 48 633 0 623 1 0 1 1 0 8 0 ucredpl 96 4117 0 4108 1 0 1 1 0 8 0 zombiepl 144 2050 0 2050 1 0 1 1 0 8 1 processpl 840 2081 0 2050 4 0 4 4 0 8 0 procpl 600 5863 0 5823 4 0 4 4 0 8 0 srpgc 64 47 0 47 5 4 1 1 0 8 1 sosppl 128 15 0 15 3 3 0 1 0 8 0 sockpl 384 2437 0 2418 5 2 3 4 0 8 0 mcl64k 65536 7 0 0 1 0 1 1 0 8 0 mcl16k 16384 4 0 0 1 0 1 1 0 8 0 mcl12k 12288 14 0 0 2 0 2 2 0 8 0 mcl9k 9216 8 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 8 0 0 1 0 1 1 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 107 0 0 14 0 14 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 228 0 0 11 0 11 11 0 8 0 bufpl 256 8937 0 1914 440 0 440 440 0 8 0 anonpl 16 193196 0 186048 82 34 48 53 0 125 10 amapchunkpl 152 11748 0 11657 18 12 6 9 0 158 0 amappl16 192 9514 0 9021 64 30 34 38 0 8 8 amappl15 184 76 0 72 1 0 1 1 0 8 0 amappl14 176 123 0 120 1 0 1 1 0 8 0 amappl13 168 100 0 96 1 0 1 1 0 8 0 amappl12 160 156 0 154 1 0 1 1 0 8 0 amappl11 152 40 0 25 1 0 1 1 0 8 0 amappl10 144 594 0 590 1 0 1 1 0 8 0 amappl9 136 1559 0 1555 1 0 1 1 0 8 0 amappl8 128 1120 0 1101 1 0 1 1 0 8 0 amappl7 120 551 0 547 1 0 1 1 0 8 0 amappl6 112 80 0 74 1 0 1 1 0 8 0 amappl5 104 182 0 167 1 0 1 1 0 8 0 amappl4 96 2199 0 2169 2 1 1 2 0 8 0 amappl3 88 344 0 338 1 0 1 1 0 8 0 amappl2 80 17141 0 17097 2 0 2 2 0 8 0 amappl1 72 53812 0 53387 25 15 10 20 0 8 0 amappl 72 6167 0 6133 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 50 0 5 1 0 1 1 0 8 0 uaddrrnd 24 2065 0 2050 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2065 0 2050 1 0 1 1 0 8 0 vmmpekpl 168 19684 0 19662 2 0 2 2 0 8 0 vmmpepl 168 221815 0 220415 129 45 84 88 0 357 14 vmsppl 360 2064 0 2050 2 0 2 2 0 8 0 pdppl 4096 4138 0 4100 6 0 6 6 0 8 0 pvpl 32 547403 0 537086 191 65 126 141 0 265 24 pmappl 224 2064 0 2050 3 2 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 594 0 3 17 0 17 17 0 8 0