panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *171192 16690 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,ffff800020c36f50,3,ffff800020b65080) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c36f50,3,ffff800020b65080) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8061e85670,80084b01,ffff800020c36f50,3,fffffd807f7c6a20,ffff800020b65080) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806cb64ee8,80084b01,ffff800020c36f50,ffff800020b65080) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b65080,ffff800020c37090,ffff800020c37080) at sys_ioctl+0x651 syscall(ffff800020c37130) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c37130) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffce5c8,36,3,1bd143f890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffce0e0, 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,ffff800020c36f50,3,ffff800020b65080) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c36f50,3,ffff800020b65080) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8061e85670,80084b01,ffff800020c36f50,3,fffffd807f7c6a20,ffff800020b65080) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806cb64ee8,80084b01,ffff800020c36f50,ffff800020b65080) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b65080,ffff800020c37090,ffff800020c37080) at sys_ioctl+0x651 syscall(ffff800020c37130) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c37130) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffce5c8,36,3,1bd143f890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffce0e0, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c36b80 rbx 0xffff800020c36c30 rdx 0xffffffff81f8953a apollo_pio_rec+0x92d4 rcx 0 rax 0 r8 0xffffffff816f0ee3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x887857deef9f7c51 r12 0x3000000008 r13 0xffff800020c36b90 r14 0x100 r15 0x1 rip 0xffffffff811cb8e8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c36b70 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=171192 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b64270,0xffffffff82387c10 process=0xffff800020b7c360 user=0xffff800020c32000, vmspace=0xfffffd807effd168 estcpu=1, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *16690 171192 75842 0 7 0x2 syz-executor.1 99350 157292 75842 0 3 0x82 piperd syz-executor.0 57721 367037 1 0 3 0x100083 ttyin getty 80672 143961 0 0 3 0x14200 bored sosplice 75842 100036 97849 0 3 0x82 thrsleep syz-fuzzer 75842 91967 97849 0 3 0x4000082 nanosleep syz-fuzzer 75842 48086 97849 0 3 0x4000082 thrsleep syz-fuzzer 75842 438588 97849 0 3 0x4000082 kqread syz-fuzzer 75842 254283 97849 0 3 0x4000082 thrsleep syz-fuzzer 75842 34367 97849 0 3 0x4000082 thrsleep syz-fuzzer 75842 189533 97849 0 3 0x4000082 nanosleep syz-fuzzer 75842 293216 97849 0 3 0x4000082 thrsleep syz-fuzzer 75842 504494 97849 0 3 0x4000082 thrsleep syz-fuzzer 75842 482630 97849 0 3 0x4000082 thrsleep syz-fuzzer 97849 442442 63232 0 3 0x10008a pause ksh 63232 461608 75691 0 3 0x92 select sshd 75691 75912 1 0 3 0x80 select sshd 66607 35905 92182 74 3 0x100092 bpf pflogd 92182 395169 1 0 3 0x80 netio pflogd 31738 374929 6248 73 3 0x100090 kqread syslogd 6248 268368 1 0 3 0x100082 netio syslogd 47597 467213 1 77 3 0x100090 poll dhclient 97961 318811 1 0 3 0x80 poll dhclient 41921 280038 0 0 3 0x14200 pgzero zerothread 62657 445962 0 0 3 0x14200 aiodoned aiodoned 47185 459563 0 0 3 0x14200 syncer update 50024 423855 0 0 3 0x14200 cleaner cleaner 27662 109722 0 0 3 0x14200 reaper reaper 64569 451292 0 0 3 0x14200 pgdaemon pagedaemon 96686 34637 0 0 3 0x14200 bored crynlk 55596 69816 0 0 3 0x14200 bored crypto 80816 228444 0 0 3 0x40014200 acpi0 acpi0 4217 216622 0 0 3 0x40014200 idle1 81763 331511 0 0 3 0x14200 bored softnet 72735 477929 0 0 3 0x14200 bored systqmp 4041 333205 0 0 3 0x14200 bored systq 83110 409158 0 0 3 0x40014200 bored softclock 11803 282029 0 0 7 0x40014200 idle0 40717 40242 0 0 3 0x14200 bored smr 1 327198 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 16690 (syz-executor.1) thread 0xffff800020b65080 (171192) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823ef400) 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 9514 71951K 71959K 78643K 10825 0 0 pcb 25 9K 10K 78643K 348 0 0 rtable 85 3K 4K 78643K 476 0 0 ifaddr 52 12K 13K 78643K 146 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1482 0 0 iov 0 0K 32K 78643K 108 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1203 75K 75K 78643K 1676 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 20 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 118 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 679 0 0 sigio 0 0K 0K 78643K 16 0 0 proc 54 51K 71K 78643K 520 0 0 subproc 53 55297K 67586K 78643K 263 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 74 0 0 in_multi 22 1K 2K 78643K 117 0 0 ether_multi 1 0K 0K 78643K 9 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 241 0 0 pfkey data 0 0K 0K 78643K 4 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 81 12K 29K 78643K 3075 0 0 UVM aobj 44 2K 2K 78643K 49 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 21 0 0 NDP 11 0K 0K 78643K 45 0 0 temp 158 2379K 2448K 78643K 5310 0 0 kqueue 0 0K 0K 78643K 2 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 9 0 6 1 0 1 1 0 8 0 inpcbpl 280 385 0 378 1 0 1 1 0 8 0 plimitpl 152 46 0 38 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 88 0 57 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 121 0 117 1 0 1 1 0 8 0 nd6 48 14 0 12 1 0 1 1 0 8 0 ppxss 1128 12 0 12 3 2 1 1 0 8 1 pffrent 40 2 0 2 1 1 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 23 0 10 1 0 1 1 0 8 0 pfstkey 112 23 0 10 1 0 1 1 0 8 0 pfstate 328 23 0 10 3 1 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 403 0 256 12 0 12 12 0 8 1 art_table 32 404 0 256 2 0 2 2 0 8 0 art_node 16 85 0 57 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 1 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 116 0 106 1 0 1 1 0 8 0 shmpl 112 47 0 5 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2663 0 1220 47 0 47 47 0 8 0 ffsino 272 2663 0 1220 97 0 97 97 0 8 0 nchpl 144 3786 0 2134 62 0 62 62 0 8 0 uvmvnodes 72 2854 0 0 52 0 52 52 0 8 0 vnodes 200 2854 0 0 151 0 151 151 0 8 0 namei 1024 11225 0 11225 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 4 0 4 2 2 0 1 0 8 0 scxspl 192 10498 0 10498 6 5 1 5 0 8 1 sigapl 432 861 0 847 2 0 2 2 0 8 0 futexpl 56 7970 0 7970 1 0 1 1 0 8 1 knotepl 112 351 0 330 1 0 1 1 0 8 0 kqueuepl 104 239 0 237 1 0 1 1 0 8 0 pipepl 112 514 0 495 1 0 1 1 0 8 0 fdescpl 488 862 0 847 3 0 3 3 0 8 0 filepl 152 5251 0 5158 5 0 5 5 0 8 1 lockfpl 104 206 0 206 2 1 1 1 0 8 1 lockfspl 32 282 0 282 2 1 1 1 0 8 1 sessionpl 112 24 0 14 1 0 1 1 0 8 0 pgrppl 48 42 0 32 1 0 1 1 0 8 0 ucredpl 96 1250 0 1241 1 0 1 1 0 8 0 zombiepl 144 847 0 847 1 0 1 1 0 8 1 processpl 840 878 0 847 4 0 4 4 0 8 0 procpl 600 2298 0 2258 4 0 4 4 0 8 0 srpgc 64 34 0 34 5 4 1 1 0 8 1 sosppl 128 7 0 7 4 3 1 1 0 8 1 sockpl 384 656 0 637 3 0 3 3 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 3 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 12 0 0 2 0 2 2 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 121 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 176 0 0 9 0 9 9 0 8 0 bufpl 256 7258 0 1146 382 0 382 382 0 8 0 anonpl 16 94210 0 87112 63 16 47 49 0 125 10 amapchunkpl 152 5015 0 4925 14 5 9 9 0 158 4 amappl16 192 3803 0 3351 46 16 30 36 0 8 6 amappl15 184 110 0 106 1 0 1 1 0 8 0 amappl14 176 464 0 462 2 1 1 1 0 8 0 amappl13 168 180 0 175 1 0 1 1 0 8 0 amappl12 160 5 0 5 1 1 0 1 0 8 0 amappl11 152 78 0 62 1 0 1 1 0 8 0 amappl10 144 71 0 66 1 0 1 1 0 8 0 amappl9 136 634 0 631 1 0 1 1 0 8 0 amappl8 128 203 0 189 1 0 1 1 0 8 0 amappl7 120 43 0 36 1 0 1 1 0 8 0 amappl6 112 74 0 66 1 0 1 1 0 8 0 amappl5 104 130 0 115 1 0 1 1 0 8 0 amappl4 96 1189 0 1160 2 1 1 2 0 8 0 amappl3 88 551 0 545 1 0 1 1 0 8 0 amappl2 80 6373 0 6325 2 0 2 2 0 8 0 amappl1 72 28472 0 28048 25 15 10 20 0 8 0 amappl 72 2577 0 2544 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 48 0 5 1 0 1 1 0 8 0 uaddrrnd 24 862 0 847 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 862 0 847 1 0 1 1 0 8 0 vmmpekpl 168 11268 0 11246 2 0 2 2 0 8 0 vmmpepl 168 99753 0 98410 103 23 80 84 0 357 14 vmsppl 360 861 0 847 2 0 2 2 0 8 0 pdppl 4096 1732 0 1694 6 0 6 6 0 8 0 pvpl 32 293415 0 283136 153 28 125 127 0 265 24 pmappl 224 861 0 847 5 3 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 536 0 3 16 0 16 16 0 8 0