panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 10492 34226 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,ffff800020c21820,3,ffff800020b42bd0) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c21820,3,ffff800020b42bd0) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8074b268e0,80084b01,ffff800020c21820,3,fffffd807f7c75a0,ffff800020b42bd0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8074d994e0,80084b01,ffff800020c21820,ffff800020b42bd0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b42bd0,ffff800020c21960,ffff800020c21950) at sys_ioctl+0x646 syscall(ffff800020c21a00) at syscall+0x5ac mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c21a00) at syscall+0x5ac sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffc9568,36,3,e4556a1f890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc9080, 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,ffff800020c21820,3,ffff800020b42bd0) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c21820,3,ffff800020b42bd0) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8074b268e0,80084b01,ffff800020c21820,3,fffffd807f7c75a0,ffff800020b42bd0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8074d994e0,80084b01,ffff800020c21820,ffff800020b42bd0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b42bd0,ffff800020c21960,ffff800020c21950) at sys_ioctl+0x646 syscall(ffff800020c21a00) at syscall+0x5ac mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c21a00) at syscall+0x5ac sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffc9568,36,3,e4556a1f890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc9080, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c21450 rbx 0xffff800020c21500 rdx 0xffffffff81f511eb apollo_pio_rec+0x809e rcx 0 rax 0 r8 0xffffffff811d6983 kprintf+0x183 r9 0x1 r10 0x25 r11 0x9d29b80c93755df4 r12 0x3000000008 r13 0xffff800020c21460 r14 0x100 r15 0x1 rip 0xffffffff8125d7b8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c21440 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=10492 stat=onproc flags process=2 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020b42720,0xffffffff82310f08 process=0xffff800020b44d30 user=0xffff800020c1c000, vmspace=0xfffffd806e95b9e0 estcpu=0, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *34226 10492 75601 0 7 0x2 syz-executor.1 78185 504066 0 0 3 0x14200 bored sosplice 62630 503878 75601 0 3 0x82 piperd syz-executor.0 75601 25573 13545 0 3 0x82 thrsleep syz-fuzzer 75601 312301 13545 0 3 0x4000082 thrsleep syz-fuzzer 75601 244342 13545 0 3 0x4000082 thrsleep syz-fuzzer 75601 61656 13545 0 3 0x4000082 thrsleep syz-fuzzer 75601 283613 13545 0 3 0x4000082 thrsleep syz-fuzzer 75601 408456 13545 0 3 0x4000082 thrsleep syz-fuzzer 75601 215106 13545 0 3 0x4000082 thrsleep syz-fuzzer 75601 102011 13545 0 3 0x4000082 kqread syz-fuzzer 75601 119078 13545 0 3 0x4000082 thrsleep syz-fuzzer 75601 163029 13545 0 3 0x4000082 thrsleep syz-fuzzer 13545 451160 53143 0 3 0x10008a pause ksh 53143 338007 31034 0 3 0x92 select sshd 61457 422952 1 0 3 0x100083 ttyin getty 31034 47737 1 0 3 0x80 select sshd 60111 338986 55622 73 3 0x100090 kqread syslogd 55622 441451 1 0 3 0x100082 netio syslogd 68858 82248 1 77 3 0x100090 poll dhclient 68195 340660 1 0 3 0x80 poll dhclient 88522 489373 0 0 3 0x14200 pgzero zerothread 56828 337354 0 0 3 0x14200 aiodoned aiodoned 451 246498 0 0 3 0x14200 syncer update 96564 97312 0 0 3 0x14200 cleaner cleaner 62446 117698 0 0 3 0x14200 reaper reaper 97025 42170 0 0 3 0x14200 pgdaemon pagedaemon 7223 190054 0 0 3 0x14200 bored crynlk 51244 14879 0 0 3 0x14200 bored crypto 72346 199143 0 0 3 0x40014200 acpi0 acpi0 19966 17554 0 0 7 0x40014200 idle1 31954 351546 0 0 3 0x14200 bored softnet 10893 464695 0 0 3 0x14200 bored systqmp 37391 179669 0 0 3 0x14200 bored systq 44562 414730 0 0 3 0x40014200 bored softclock 29329 189183 0 0 3 0x40014200 idle0 1 2320 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 34226 (syz-executor.1) thread 0xffff800020b42bd0 (10492) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82330470) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+0x58a sys/kern/subr_witness.c:1205 #1 syscall+0x47f mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x47f 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 9500 71888K 71896K 78643K 10881 0 0 pcb 23 9K 11K 78643K 708 0 0 rtable 82 3K 4K 78643K 276 0 0 ifaddr 43 11K 13K 78643K 98 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 26 0 0 iov 0 0K 24K 78643K 122 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1194 75K 76K 78643K 2203 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 19 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 175 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 4 9K 19K 78643K 1496 0 0 sigio 0 0K 0K 78643K 11 0 0 proc 42 38K 70K 78643K 443 0 0 subproc 53 55297K 67586K 78643K 91 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 156 0 0 in_multi 22 1K 2K 78643K 73 0 0 ether_multi 1 0K 0K 78643K 9 0 0 mrt 0 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 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 289 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 78 12K 29K 78643K 5344 0 0 UVM aobj 74 4K 4K 78643K 84 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 28 0 0 NDP 8 0K 0K 78643K 26 0 0 temp 135 2366K 2437K 78643K 6479 0 0 kqueue 0 0K 0K 78643K 11 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 4 0 1 1 0 1 1 0 8 0 inpcbpl 280 598 0 591 1 0 1 1 0 8 0 plimitpl 152 29 0 22 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 41 0 10 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 194 0 190 1 0 1 1 0 8 0 nd6 48 4 0 2 1 0 1 1 0 8 0 ppxss 1128 10 0 10 4 4 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 186 0 41 12 0 12 12 0 8 2 art_table 32 187 0 41 2 0 2 2 0 8 0 art_node 16 40 0 12 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 9 3 2 1 1 0 8 0 semapl 112 171 0 161 1 0 1 1 0 8 0 shmpl 112 82 0 10 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4605 0 3183 47 0 47 47 0 8 0 ffsino 272 4605 0 3183 96 0 96 96 0 8 0 nchpl 144 6920 0 5313 61 0 61 61 0 8 0 uvmvnodes 72 4744 0 0 87 0 87 87 0 8 0 vnodes 200 4744 0 0 250 0 250 250 0 8 0 namei 1024 19951 0 19951 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 3 0 3 2 2 0 1 0 8 0 scxspl 192 17403 0 17403 11 10 1 5 0 8 1 sigapl 432 1661 0 1649 2 0 2 2 0 8 0 futexpl 56 14521 0 14521 1 0 1 1 0 8 1 knotepl 112 358 0 329 4 3 1 2 0 8 0 kqueuepl 104 331 0 329 1 0 1 1 0 8 0 pipepl 112 878 0 859 3 2 1 2 0 8 0 fdescpl 488 1662 0 1649 2 0 2 2 0 8 0 filepl 152 9518 0 9430 7 2 5 5 0 8 1 lockfpl 104 397 0 397 3 2 1 1 0 8 1 lockfspl 32 557 0 557 3 2 1 1 0 8 1 sessionpl 112 17 0 8 1 0 1 1 0 8 0 pgrppl 48 28 0 19 1 0 1 1 0 8 0 ucredpl 96 2546 0 2539 1 0 1 1 0 8 0 zombiepl 144 1649 0 1649 2 1 1 1 0 8 1 processpl 840 1677 0 1649 4 0 4 4 0 8 0 procpl 600 4727 0 4690 4 0 4 4 0 8 0 srpgc 64 6 0 6 1 0 1 1 0 8 1 sosppl 128 21 0 21 7 7 0 1 0 8 0 sockpl 384 1203 0 1186 5 2 3 4 0 8 1 mcl64k 65536 8 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 4 0 0 1 0 1 1 0 8 0 mcl9k 9216 9 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 13 0 0 2 0 2 2 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 116 0 0 14 0 14 14 0 8 0 mtagpl 80 2 0 0 1 0 1 1 0 8 0 mbufpl 256 183 0 0 8 0 8 8 0 8 0 bufpl 256 7640 0 1018 414 0 414 414 0 8 0 anonpl 16 147112 0 140888 67 18 49 49 0 125 15 amapchunkpl 152 8862 0 8772 13 4 9 9 0 158 4 amappl16 192 7526 0 7119 58 29 29 34 0 8 8 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 4 0 4 2 2 0 1 0 8 0 amappl13 168 732 0 729 1 0 1 1 0 8 0 amappl12 160 13 0 11 2 1 1 1 0 8 0 amappl11 152 953 0 942 1 0 1 1 0 8 0 amappl10 144 58 0 54 1 0 1 1 0 8 0 amappl9 136 1110 0 1107 1 0 1 1 0 8 0 amappl8 128 146 0 124 1 0 1 1 0 8 0 amappl7 120 742 0 736 1 0 1 1 0 8 0 amappl6 112 55 0 46 1 0 1 1 0 8 0 amappl5 104 153 0 140 1 0 1 1 0 8 0 amappl4 96 282 0 258 2 1 1 2 0 8 0 amappl3 88 179 0 174 1 0 1 1 0 8 0 amappl2 80 15351 0 15313 2 0 2 2 0 8 1 amappl1 72 42270 0 41878 24 15 9 19 0 8 0 amappl 72 4944 0 4913 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 83 0 10 2 0 2 2 0 8 0 uaddrrnd 24 1662 0 1649 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1662 0 1649 1 0 1 1 0 8 0 vmmpekpl 168 16677 0 16656 2 0 2 2 0 8 0 vmmpepl 168 177212 0 175975 112 38 74 74 0 357 11 vmsppl 360 1661 0 1649 2 0 2 2 0 8 0 pdppl 4096 3331 0 3298 5 0 5 5 0 8 0 pvpl 32 437260 0 428138 160 33 127 127 0 265 37 pmappl 224 1661 0 1649 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 563 0 3 16 0 16 16 0 8 0