panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *484746 82746 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,ffff800020c214b0,3,ffff800020b6c018) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c214b0,3,ffff800020b6c018) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8067aa5660,80084b01,ffff800020c214b0,3,fffffd807f7c6840,ffff800020b6c018) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066fba018,80084b01,ffff800020c214b0,ffff800020b6c018) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b6c018,ffff800020c215f0,ffff800020c215e0) at sys_ioctl+0x651 syscall(ffff800020c21690) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c21690) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffdc778,36,3,cb9c173890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdc290, 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,ffff800020c214b0,3,ffff800020b6c018) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c214b0,3,ffff800020b6c018) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8067aa5660,80084b01,ffff800020c214b0,3,fffffd807f7c6840,ffff800020b6c018) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066fba018,80084b01,ffff800020c214b0,ffff800020b6c018) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b6c018,ffff800020c215f0,ffff800020c215e0) at sys_ioctl+0x651 syscall(ffff800020c21690) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c21690) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffdc778,36,3,cb9c173890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdc290, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c210e0 rbx 0xffff800020c21190 rdx 0xffffffff81f875b8 apollo_pio_rec+0x91e4 rcx 0 rax 0 r8 0xffffffff8106c163 kprintf+0x183 r9 0x1 r10 0x25 r11 0xac0426141d24bd76 r12 0x3000000008 r13 0xffff800020c210f0 r14 0x100 r15 0x1 rip 0xffffffff81ba3af8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c210d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=484746 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b6c270,0xffffffff823df7d8 process=0xffff800020b7c018 user=0xffff800020c1c000, vmspace=0xfffffd807effe000 estcpu=1, cpticks=3, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *82746 484746 37924 0 7 0x2 syz-executor.1 79563 124966 0 0 3 0x14200 bored sosplice 86667 144057 37924 0 3 0x82 piperd syz-executor.0 37924 230223 16425 0 3 0x82 thrsleep syz-fuzzer 37924 199343 16425 0 3 0x4000082 thrsleep syz-fuzzer 37924 3227 16425 0 3 0x4000082 thrsleep syz-fuzzer 37924 448475 16425 0 3 0x4000082 thrsleep syz-fuzzer 37924 85013 16425 0 3 0x4000082 thrsleep syz-fuzzer 37924 282440 16425 0 3 0x4000082 thrsleep syz-fuzzer 37924 111456 16425 0 3 0x4000082 thrsleep syz-fuzzer 37924 46660 16425 0 3 0x4000082 thrsleep syz-fuzzer 37924 113462 16425 0 3 0x4000082 kqread syz-fuzzer 37924 186649 16425 0 3 0x4000082 thrsleep syz-fuzzer 16425 167932 67137 0 3 0x10008a pause ksh 67137 31116 70883 0 3 0x92 select sshd 68053 289586 1 0 3 0x100083 ttyin getty 70883 62259 1 0 3 0x80 select sshd 7856 175568 18782 74 3 0x100092 bpf pflogd 18782 238603 1 0 3 0x80 netio pflogd 5572 499554 40971 73 3 0x100090 kqread syslogd 40971 207144 1 0 3 0x100082 netio syslogd 59531 151339 1 77 3 0x100090 poll dhclient 29199 369897 1 0 3 0x80 poll dhclient 89649 286108 0 0 3 0x14200 pgzero zerothread 13760 412730 0 0 3 0x14200 aiodoned aiodoned 40620 442998 0 0 3 0x14200 syncer update 49849 346839 0 0 3 0x14200 cleaner cleaner 24225 472853 0 0 3 0x14200 reaper reaper 82001 376136 0 0 3 0x14200 pgdaemon pagedaemon 17700 402576 0 0 3 0x14200 bored crynlk 5409 292629 0 0 3 0x14200 bored crypto 37433 43910 0 0 3 0x40014200 acpi0 acpi0 92728 332100 0 0 7 0x40014200 idle1 51110 308499 0 0 3 0x14200 bored softnet 66819 372311 0 0 3 0x14200 bored systqmp 49902 239648 0 0 3 0x14200 bored systq 35844 523606 0 0 3 0x40014200 bored softclock 68901 70703 0 0 3 0x40014200 idle0 77018 472358 0 0 3 0x14200 bored smr 1 201319 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 82746 (syz-executor.1) thread 0xffff800020b6c018 (484746) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823d7a38) 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 9488 71936K 71944K 78643K 10670 0 0 pcb 25 9K 10K 78643K 154 0 0 rtable 82 3K 4K 78643K 284 0 0 ifaddr 43 11K 12K 78643K 90 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1472 0 0 iov 0 0K 16K 78643K 26 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1198 75K 75K 78643K 1350 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 4 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 19 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 223 0 0 proc 54 51K 71K 78643K 356 0 0 subproc 53 55297K 67586K 78643K 123 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 26 0 0 in_multi 22 1K 2K 78643K 52 0 0 ether_multi 1 0K 0K 78643K 5 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 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 222 0 0 pfkey data 0 0K 0K 78643K 2 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 22K 78643K 1550 0 0 UVM aobj 11 2K 2K 78643K 12 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 25 0 0 temp 105 2366K 2433K 78643K 3748 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 5 0 2 1 0 1 1 0 8 0 inpcbpl 280 150 0 143 1 0 1 1 0 8 0 plimitpl 152 23 0 15 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 51 0 20 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 54 0 50 1 0 1 1 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 6 0 4 1 0 1 1 0 8 0 ppxss 1128 6 0 6 2 1 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 13 0 6 1 0 1 1 0 8 0 pfstkey 112 13 0 6 1 0 1 1 0 8 0 pfstate 328 13 0 6 1 0 1 1 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 227 0 82 12 0 12 12 0 8 2 art_table 32 228 0 82 2 0 2 2 0 8 0 art_node 16 50 0 22 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 0 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 17 0 7 1 0 1 1 0 8 0 shmpl 112 10 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1813 0 396 46 0 46 46 0 8 0 ffsino 272 1813 0 396 95 0 95 95 0 8 0 nchpl 144 2323 0 687 61 0 61 61 0 8 0 uvmvnodes 72 1912 0 0 35 0 35 35 0 8 0 vnodes 200 1912 0 0 101 0 101 101 0 8 0 namei 1024 6405 0 6405 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 5799 0 5799 10 9 1 6 0 8 1 sigapl 432 413 0 399 2 0 2 2 0 8 0 futexpl 56 2464 0 2464 1 0 1 1 0 8 1 knotepl 112 136 0 107 2 1 1 2 0 8 0 kqueuepl 104 79 0 77 1 0 1 1 0 8 0 pipepl 112 278 0 259 3 2 1 2 0 8 0 fdescpl 488 414 0 399 3 0 3 3 0 8 0 filepl 152 2462 0 2369 6 0 6 6 0 8 2 lockfpl 104 73 0 73 2 1 1 1 0 8 1 lockfspl 32 92 0 92 2 1 1 1 0 8 1 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 22 0 12 1 0 1 1 0 8 0 ucredpl 96 450 0 441 1 0 1 1 0 8 0 zombiepl 144 399 0 399 2 1 1 1 0 8 1 processpl 840 430 0 399 4 0 4 4 0 8 0 procpl 600 885 0 845 4 0 4 4 0 8 0 srpgc 64 13 0 13 2 1 1 1 0 8 1 sosppl 128 3 0 3 2 1 1 1 0 8 1 sockpl 384 278 0 259 3 0 3 3 0 8 1 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 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 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 3 0 0 1 0 1 1 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 127 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 147 0 0 9 0 9 9 0 8 0 bufpl 256 5788 0 1043 297 0 297 297 0 8 0 anonpl 16 50704 0 43761 47 6 41 45 0 125 6 amapchunkpl 152 2072 0 1988 9 5 4 9 0 158 0 amappl16 192 1529 0 1077 34 8 26 34 0 8 3 amappl15 184 177 0 175 1 0 1 1 0 8 0 amappl14 176 26 0 22 1 0 1 1 0 8 0 amappl13 168 30 0 25 1 0 1 1 0 8 0 amappl12 160 10 0 8 2 1 1 1 0 8 0 amappl11 152 392 0 378 1 0 1 1 0 8 0 amappl10 144 64 0 60 1 0 1 1 0 8 0 amappl9 136 367 0 363 1 0 1 1 0 8 0 amappl8 128 139 0 124 1 0 1 1 0 8 0 amappl7 120 48 0 43 1 0 1 1 0 8 0 amappl6 112 61 0 55 1 0 1 1 0 8 0 amappl5 104 295 0 281 1 0 1 1 0 8 0 amappl4 96 321 0 297 2 1 1 2 0 8 0 amappl3 88 132 0 125 1 0 1 1 0 8 0 amappl2 80 2647 0 2600 2 0 2 2 0 8 0 amappl1 72 18589 0 18171 24 14 10 19 0 8 0 amappl 72 1122 0 1090 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 11 0 1 1 0 1 1 0 8 0 uaddrrnd 24 414 0 399 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 414 0 399 1 0 1 1 0 8 0 vmmpekpl 168 7366 0 7341 2 0 2 2 0 8 0 vmmpepl 168 51497 0 50160 98 18 80 80 0 357 15 vmsppl 360 413 0 399 2 0 2 2 0 8 0 pdppl 4096 836 0 798 6 0 6 6 0 8 0 pvpl 32 165926 0 155925 126 9 117 121 0 265 22 pmappl 224 413 0 399 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 449 0 4 13 0 13 13 0 8 0