panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *186875 68567 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,ffff800020c054d0,3,ffff800020b64e28) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c054d0,3,ffff800020b64e28) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd806945fb20,80084b01,ffff800020c054d0,3,fffffd807f7c68a0,ffff800020b64e28) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806cbf6b58,80084b01,ffff800020c054d0,ffff800020b64e28) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b64e28,ffff800020c05610,ffff800020c05600) at sys_ioctl+0x651 syscall(ffff800020c056b0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c056b0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffd47f8,36,3,88c39375890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd4310, 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,ffff800020c054d0,3,ffff800020b64e28) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c054d0,3,ffff800020b64e28) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd806945fb20,80084b01,ffff800020c054d0,3,fffffd807f7c68a0,ffff800020b64e28) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806cbf6b58,80084b01,ffff800020c054d0,ffff800020b64e28) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b64e28,ffff800020c05610,ffff800020c05600) at sys_ioctl+0x651 syscall(ffff800020c056b0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c056b0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffd47f8,36,3,88c39375890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd4310, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c05100 rbx 0xffff800020c051b0 rdx 0xffffffff81f89682 apollo_pio_rec+0x9060 rcx 0 rax 0 r8 0xffffffff8182bbb3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x88a58dfd6d505196 r12 0x3000000008 r13 0xffff800020c05110 r14 0x100 r15 0x1 rip 0xffffffff81c8ebf8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c050f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=186875 stat=onproc flags process=2 proc=0 pri=68, usrpri=68, nice=20 forw=0xffffffffffffffff, list=0xffff800020b65530,0xffffffff823ddcc0 process=0xffff800020b7c9f0 user=0xffff800020c00000, vmspace=0xfffffd807f00bb40 estcpu=18, cpticks=3, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *68567 186875 65186 0 7 0x2 syz-executor.1 98443 14847 65186 0 3 0x82 piperd syz-executor.0 65186 523269 79103 0 3 0x82 kqread syz-fuzzer 65186 506648 79103 0 3 0x4000082 nanosleep syz-fuzzer 65186 289848 79103 0 3 0x4000082 thrsleep syz-fuzzer 65186 458032 79103 0 3 0x4000082 thrsleep syz-fuzzer 65186 173351 79103 0 3 0x4000082 thrsleep syz-fuzzer 65186 437967 79103 0 3 0x4000082 thrsleep syz-fuzzer 65186 386345 79103 0 3 0x4000082 thrsleep syz-fuzzer 65186 494906 79103 0 3 0x4000082 thrsleep syz-fuzzer 65186 505101 79103 0 3 0x4000082 thrsleep syz-fuzzer 65186 32232 79103 0 3 0x4000082 thrsleep syz-fuzzer 79103 196486 7826 0 3 0x10008a pause ksh 7826 49231 40219 0 3 0x92 select sshd 20329 138782 1 0 3 0x100083 ttyin getty 40219 390579 1 0 3 0x80 select sshd 480 132414 5989 74 3 0x100092 bpf pflogd 5989 54271 1 0 3 0x80 netio pflogd 15449 309434 9676 73 3 0x100090 kqread syslogd 9676 83971 1 0 3 0x100082 netio syslogd 20496 357337 1 77 3 0x100090 poll dhclient 30034 163006 1 0 3 0x80 poll dhclient 22923 486135 0 0 3 0x14200 pgzero zerothread 75220 294507 0 0 3 0x14200 aiodoned aiodoned 73601 280370 0 0 3 0x14200 syncer update 98393 452154 0 0 3 0x14200 cleaner cleaner 96263 327850 0 0 3 0x14200 reaper reaper 36860 398740 0 0 3 0x14200 pgdaemon pagedaemon 40388 117071 0 0 3 0x14200 bored crynlk 2514 26205 0 0 3 0x14200 bored crypto 17868 250846 0 0 3 0x40014200 acpi0 acpi0 70889 132614 0 0 3 0x40014200 idle1 45604 125459 0 0 3 0x14200 bored softnet 54118 370671 0 0 3 0x14200 bored systqmp 38162 101198 0 0 3 0x14200 bored systq 51685 225134 0 0 3 0x40014200 bored softclock 60519 31580 0 0 7 0x40014200 idle0 25224 346324 0 0 3 0x14200 bored smr 1 23194 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 68567 (syz-executor.1) thread 0xffff800020b64e28 (186875) 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{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9490 71942K 71962K 78643K 10690 0 0 pcb 25 9K 11K 78643K 214 0 0 rtable 82 3K 4K 78643K 374 0 0 ifaddr 43 11K 12K 78643K 103 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1473 0 0 iov 0 0K 16K 78643K 24 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1199 75K 75K 78643K 1383 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 10 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 45 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 25K 78643K 251 0 0 proc 54 51K 83K 78643K 425 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 19 0 0 in_multi 22 1K 2K 78643K 80 0 0 ether_multi 1 0K 0K 78643K 1 0 0 mrt 0 0K 0K 78643K 4 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 228 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 82 12K 29K 78643K 1626 0 0 UVM aobj 25 4K 4K 78643K 25 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 10 0 0 NDP 8 0K 0K 78643K 32 0 0 temp 119 2374K 2438K 78643K 3994 0 0 kqueue 0 0K 0K 78643K 3 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 8 0 5 1 0 1 1 0 8 0 inpcbpl 280 148 0 141 1 0 1 1 0 8 0 plimitpl 152 28 0 20 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 79 0 48 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 53 0 53 1 1 0 1 0 8 0 tcpcb 544 48 0 44 1 0 1 1 0 8 0 rttmr 72 2 0 2 1 1 0 1 0 8 0 nd6 48 12 0 10 1 0 1 1 0 8 0 ppxss 1128 6 0 6 1 0 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 18 0 5 1 0 1 1 0 8 0 pfstkey 112 18 0 5 1 0 1 1 0 8 0 pfstate 328 18 0 5 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 410 0 263 14 2 12 14 0 8 0 art_table 32 411 0 263 2 0 2 2 0 8 0 art_node 16 78 0 50 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 0 1 0 1 1 0 8 0 semapl 112 41 0 31 1 0 1 1 0 8 0 shmpl 112 23 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1815 0 386 47 0 47 47 0 8 0 ffsino 272 1815 0 386 96 0 96 96 0 8 0 nchpl 144 2351 0 706 62 0 62 62 0 8 0 uvmvnodes 72 1953 0 0 36 0 36 36 0 8 0 vnodes 200 1953 0 0 103 0 103 103 0 8 0 namei 1024 6592 0 6592 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 5806 0 5806 6 5 1 5 0 8 1 sigapl 432 432 0 418 3 1 2 3 0 8 0 futexpl 56 2546 0 2546 1 0 1 1 0 8 1 knotepl 112 211 0 182 2 1 1 2 0 8 0 kqueuepl 104 70 0 68 1 0 1 1 0 8 0 pipepl 112 290 0 271 3 2 1 2 0 8 0 fdescpl 488 433 0 418 3 0 3 3 0 8 0 filepl 152 2442 0 2349 7 2 5 7 0 8 1 lockfpl 104 75 0 75 2 1 1 1 0 8 1 lockfspl 32 99 0 99 2 1 1 1 0 8 1 sessionpl 112 22 0 12 1 0 1 1 0 8 0 pgrppl 48 22 0 12 1 0 1 1 0 8 0 ucredpl 96 338 0 329 1 0 1 1 0 8 0 zombiepl 144 418 0 418 2 1 1 1 0 8 1 processpl 840 448 0 418 4 0 4 4 0 8 0 procpl 600 897 0 858 4 0 4 4 0 8 0 srpgc 64 32 0 32 2 1 1 1 0 8 1 sockpl 384 324 0 305 4 1 3 4 0 8 1 mcl64k 65536 229 0 0 29 0 29 29 0 8 1 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 2 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 5 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 127 0 0 15 0 15 15 0 8 0 mtagpl 80 3 0 0 1 0 1 1 0 8 0 mbufpl 256 310 0 0 18 0 18 18 0 8 0 bufpl 256 5735 0 1045 294 0 294 294 0 8 0 anonpl 16 52531 0 45645 45 7 38 43 0 125 5 amapchunkpl 152 2352 0 2265 10 4 6 9 0 158 1 amappl16 192 1739 0 1321 32 7 25 32 0 8 3 amappl15 184 13 0 10 1 0 1 1 0 8 0 amappl14 176 139 0 133 1 0 1 1 0 8 0 amappl13 168 34 0 31 1 0 1 1 0 8 0 amappl12 160 65 0 63 3 2 1 1 0 8 0 amappl11 152 238 0 224 1 0 1 1 0 8 0 amappl10 144 71 0 66 1 0 1 1 0 8 0 amappl9 136 378 0 375 1 0 1 1 0 8 0 amappl8 128 260 0 243 1 0 1 1 0 8 0 amappl7 120 40 0 34 1 0 1 1 0 8 0 amappl6 112 128 0 121 1 0 1 1 0 8 0 amappl5 104 131 0 116 1 0 1 1 0 8 0 amappl4 96 344 0 319 2 1 1 2 0 8 0 amappl3 88 131 0 126 1 0 1 1 0 8 0 amappl2 80 2726 0 2678 2 0 2 2 0 8 0 amappl1 72 18865 0 18434 24 14 10 19 0 8 0 amappl 72 1169 0 1136 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 24 0 0 1 0 1 1 0 8 0 uaddrrnd 24 433 0 418 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 433 0 418 1 0 1 1 0 8 0 vmmpekpl 168 7586 0 7564 2 0 2 2 0 8 0 vmmpepl 168 54591 0 53271 92 10 82 82 0 357 17 vmsppl 360 432 0 418 2 0 2 2 0 8 0 pdppl 4096 874 0 836 6 0 6 6 0 8 0 pvpl 32 177070 0 167103 121 9 112 116 0 265 19 pmappl 224 432 0 418 3 1 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 486 0 6 14 0 14 14 0 8 0