panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *126558 65296 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,ffff800020c115d0,3,ffff800020b8b2d8) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c115d0,3,ffff800020b8b2d8) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8066c03588,80084b01,ffff800020c115d0,3,fffffd807f7c67e0,ffff800020b8b2d8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8067204018,80084b01,ffff800020c115d0,ffff800020b8b2d8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b8b2d8,ffff800020c11710,ffff800020c11700) at sys_ioctl+0x651 syscall(ffff800020c117b0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c117b0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffcfdb8,36,3,5d32378e890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcf8d0, 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,ffff800020c115d0,3,ffff800020b8b2d8) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c115d0,3,ffff800020b8b2d8) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8066c03588,80084b01,ffff800020c115d0,3,fffffd807f7c67e0,ffff800020b8b2d8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8067204018,80084b01,ffff800020c115d0,ffff800020b8b2d8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b8b2d8,ffff800020c11710,ffff800020c11700) at sys_ioctl+0x651 syscall(ffff800020c117b0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c117b0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffcfdb8,36,3,5d32378e890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcf8d0, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c11200 rbx 0xffff800020c112b0 rdx 0xffffffff81f89682 apollo_pio_rec+0x9060 rcx 0 rax 0 r8 0xffffffff8182bbb3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x431d97091281fc0 r12 0x3000000008 r13 0xffff800020c11210 r14 0x100 r15 0x1 rip 0xffffffff81c8ebf8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c111f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=126558 stat=onproc flags process=2 proc=0 pri=56, usrpri=56, nice=20 forw=0xffffffffffffffff, list=0xffff800020b8b530,0xffffffff823ddcc0 process=0xffff800020b7c9f0 user=0xffff800020c0c000, vmspace=0xfffffd807f00b5a0 estcpu=6, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *65296 126558 76826 0 7 0x2 syz-executor.1 84378 364366 76826 0 3 0x82 piperd syz-executor.0 96503 63800 0 0 3 0x14200 bored sosplice 76826 177228 66705 0 3 0x82 thrsleep syz-fuzzer 76826 332816 66705 0 3 0x4000082 nanosleep syz-fuzzer 76826 381683 66705 0 3 0x4000082 thrsleep syz-fuzzer 76826 407461 66705 0 3 0x4000082 kqread syz-fuzzer 76826 158772 66705 0 3 0x4000082 thrsleep syz-fuzzer 76826 286980 66705 0 3 0x4000082 thrsleep syz-fuzzer 76826 482173 66705 0 3 0x4000082 thrsleep syz-fuzzer 76826 41310 66705 0 3 0x4000082 thrsleep syz-fuzzer 76826 53721 66705 0 3 0x4000082 thrsleep syz-fuzzer 76826 239067 66705 0 3 0x4000082 thrsleep syz-fuzzer 66705 208874 27895 0 3 0x10008a pause ksh 27895 222852 68999 0 3 0x92 select sshd 1048 244930 1 0 3 0x100083 ttyin getty 68999 445219 1 0 3 0x80 select sshd 89671 463517 5946 74 3 0x100092 bpf pflogd 5946 189113 1 0 3 0x80 netio pflogd 21788 447054 21441 73 3 0x100090 kqread syslogd 21441 115171 1 0 3 0x100082 netio syslogd 5440 384418 1 77 3 0x100090 poll dhclient 61405 467111 1 0 3 0x80 poll dhclient 95273 41273 0 0 3 0x14200 pgzero zerothread 61884 128796 0 0 3 0x14200 aiodoned aiodoned 54823 367914 0 0 3 0x14200 syncer update 26602 216896 0 0 3 0x14200 cleaner cleaner 43264 317926 0 0 3 0x14200 reaper reaper 19517 19832 0 0 3 0x14200 pgdaemon pagedaemon 42699 411959 0 0 3 0x14200 bored crynlk 19035 311335 0 0 3 0x14200 bored crypto 59957 164334 0 0 3 0x40014200 acpi0 acpi0 6152 79079 0 0 7 0x40014200 idle1 30376 378926 0 0 3 0x14200 bored softnet 26771 338694 0 0 3 0x14200 bored systqmp 69690 306480 0 0 3 0x14200 bored systq 15152 129103 0 0 3 0x40014200 bored softclock 92133 29206 0 0 3 0x40014200 idle0 13414 153329 0 0 3 0x14200 bored smr 1 74783 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 65296 (syz-executor.1) thread 0xffff800020b8b2d8 (126558) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823d1188) 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 9499 71945K 71953K 78643K 10743 0 0 pcb 25 9K 11K 78643K 358 0 0 rtable 82 3K 4K 78643K 389 0 0 ifaddr 47 11K 13K 78643K 112 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1484 0 0 iov 0 0K 28K 78643K 77 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1197 75K 76K 78643K 1482 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 10 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 1K 1K 78643K 71 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 25K 78643K 449 0 0 sigio 0 0K 0K 78643K 8 0 0 proc 54 51K 71K 78643K 446 0 0 subproc 53 55297K 67586K 78643K 225 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 80 0 0 ether_multi 1 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 253 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 13K 29K 78643K 2331 0 0 UVM aobj 22 2K 2K 78643K 24 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 15 0 0 NDP 9 0K 0K 78643K 35 0 0 temp 116 2367K 3004K 78643K 4474 0 0 kqueue 0 0K 0K 78643K 5 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 8 0 5 1 0 1 1 0 8 0 inpcbpl 280 254 0 247 1 0 1 1 0 8 0 plimitpl 152 33 0 25 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 78 0 47 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 75 0 71 1 0 1 1 0 8 0 nd6 48 12 0 10 1 0 1 1 0 8 0 swfcl 56 1 0 0 1 0 1 1 0 8 0 ppxss 1128 5 0 5 2 2 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 21 0 10 1 0 1 1 0 8 0 pfstkey 112 21 0 10 1 0 1 1 0 8 0 pfstate 328 21 0 10 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 357 0 210 12 0 12 12 0 8 2 art_table 32 358 0 210 2 0 2 2 0 8 0 art_node 16 76 0 48 1 0 1 1 0 8 0 sysvmsgpl 40 9 0 2 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 69 0 59 1 0 1 1 0 8 0 shmpl 112 22 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2185 0 761 47 0 47 47 0 8 0 ffsino 272 2185 0 761 96 0 96 96 0 8 0 nchpl 144 3033 0 1404 62 0 62 62 0 8 0 uvmvnodes 72 2331 0 0 43 0 43 43 0 8 0 vnodes 200 2331 0 0 123 0 123 123 0 8 0 namei 1024 8834 0 8834 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 10185 0 10185 7 5 2 5 0 8 2 sigapl 432 630 0 616 3 1 2 3 0 8 0 futexpl 56 5112 0 5112 1 0 1 1 0 8 1 knotepl 112 243 0 214 3 2 1 2 0 8 0 kqueuepl 104 136 0 134 1 0 1 1 0 8 0 pipepl 112 406 0 387 3 1 2 2 0 8 1 fdescpl 488 631 0 616 3 0 3 3 0 8 0 filepl 152 3839 0 3746 6 0 6 6 0 8 2 lockfpl 104 180 0 180 2 1 1 1 0 8 1 lockfspl 32 257 0 257 2 1 1 1 0 8 1 sessionpl 112 22 0 12 1 0 1 1 0 8 0 pgrppl 48 28 0 18 1 0 1 1 0 8 0 ucredpl 96 783 0 774 1 0 1 1 0 8 0 zombiepl 144 616 0 616 2 1 1 1 0 8 1 processpl 840 647 0 616 4 0 4 4 0 8 0 procpl 600 1583 0 1543 4 0 4 4 0 8 0 srpgc 64 30 0 30 3 2 1 1 0 8 1 sosppl 128 11 0 11 2 1 1 1 0 8 1 sockpl 384 545 0 526 4 0 4 4 0 8 2 mcl64k 65536 229 0 0 29 1 28 29 0 8 1 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 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 6 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 115 0 0 14 0 14 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 321 0 0 18 0 18 18 0 8 0 bufpl 256 6544 0 1050 344 0 344 344 0 8 0 anonpl 16 83837 0 76839 56 12 44 49 0 125 5 amapchunkpl 152 3703 0 3618 17 13 4 9 0 158 0 amappl16 192 3053 0 2600 44 13 31 36 0 8 6 amappl15 184 344 0 342 1 0 1 1 0 8 0 amappl14 176 37 0 31 1 0 1 1 0 8 0 amappl13 168 58 0 55 1 0 1 1 0 8 0 amappl12 160 6 0 6 1 1 0 1 0 8 0 amappl11 152 572 0 558 1 0 1 1 0 8 0 amappl10 144 72 0 69 1 0 1 1 0 8 0 amappl9 136 648 0 644 1 0 1 1 0 8 0 amappl8 128 176 0 153 1 0 1 1 0 8 0 amappl7 120 58 0 51 1 0 1 1 0 8 0 amappl6 112 61 0 51 1 0 1 1 0 8 0 amappl5 104 234 0 218 1 0 1 1 0 8 0 amappl4 96 315 0 291 2 1 1 2 0 8 0 amappl3 88 184 0 179 1 0 1 1 0 8 0 amappl2 80 4698 0 4653 2 0 2 2 0 8 0 amappl1 72 23288 0 22863 24 14 10 19 0 8 0 amappl 72 1851 0 1819 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 23 0 2 1 0 1 1 0 8 0 uaddrrnd 24 631 0 616 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 631 0 616 1 0 1 1 0 8 0 vmmpekpl 168 9473 0 9450 2 0 2 2 0 8 0 vmmpepl 168 78541 0 77184 116 31 85 94 0 357 15 vmsppl 360 630 0 616 2 0 2 2 0 8 0 pdppl 4096 1270 0 1232 6 0 6 6 0 8 0 pvpl 32 265914 0 255843 144 21 123 129 0 265 21 pmappl 224 630 0 616 3 2 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 532 0 5 16 0 16 16 0 8 0