panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *149084 58080 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,ffff800020c2d620,3,ffff800020b284c8) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c2d620,3,ffff800020b284c8) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8068e523a0,80084b01,ffff800020c2d620,3,fffffd807f7c6960,ffff800020b284c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8067132310,80084b01,ffff800020c2d620,ffff800020b284c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b284c8,ffff800020c2d760,ffff800020c2d750) at sys_ioctl+0x651 syscall(ffff800020c2d800) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c2d800) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffcb4b8,36,3,690492f2890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcafd0, 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,ffff800020c2d620,3,ffff800020b284c8) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c2d620,3,ffff800020b284c8) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8068e523a0,80084b01,ffff800020c2d620,3,fffffd807f7c6960,ffff800020b284c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8067132310,80084b01,ffff800020c2d620,ffff800020b284c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b284c8,ffff800020c2d760,ffff800020c2d750) at sys_ioctl+0x651 syscall(ffff800020c2d800) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c2d800) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffcb4b8,36,3,690492f2890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcafd0, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c2d250 rbx 0xffff800020c2d300 rdx 0xffffffff81f8be0b cy_pio_rec+0xbc9 rcx 0 rax 0 r8 0xffffffff81cff133 kprintf+0x183 r9 0x1 r10 0x25 r11 0xd2e7e3bbca60ee81 r12 0x3000000008 r13 0xffff800020c2d260 r14 0x100 r15 0x1 rip 0xffffffff81896608 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c2d240 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=149084 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b28bd0,0xffffffff823613a0 process=0xffff800020b7cd38 user=0xffff800020c28000, vmspace=0xfffffd807f00b870 estcpu=1, cpticks=3, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *58080 149084 97638 0 7 0x2 syz-executor.1 13551 442570 0 0 3 0x14200 bored sosplice 80943 517872 97638 0 3 0x82 piperd syz-executor.0 97638 458707 51035 0 3 0x82 thrsleep syz-fuzzer 97638 349012 51035 0 3 0x4000082 thrsleep syz-fuzzer 97638 255525 51035 0 3 0x4000082 thrsleep syz-fuzzer 97638 216817 51035 0 3 0x4000082 thrsleep syz-fuzzer 97638 88112 51035 0 3 0x4000082 thrsleep syz-fuzzer 97638 13564 51035 0 3 0x4000082 thrsleep syz-fuzzer 97638 18347 51035 0 3 0x4000082 thrsleep syz-fuzzer 97638 67285 51035 0 3 0x4000082 thrsleep syz-fuzzer 97638 263301 51035 0 3 0x4000082 thrsleep syz-fuzzer 97638 480823 51035 0 3 0x4000082 thrsleep syz-fuzzer 97638 415717 51035 0 3 0x4000082 thrsleep syz-fuzzer 97638 212551 51035 0 3 0x4000082 kqread syz-fuzzer 51035 281897 9752 0 3 0x10008a pause ksh 9752 511568 60871 0 3 0x92 select sshd 40351 364083 1 0 3 0x100083 ttyin getty 60871 286587 1 0 3 0x80 select sshd 22443 242753 74920 74 3 0x100092 bpf pflogd 74920 393931 1 0 3 0x80 netio pflogd 98174 449542 82654 73 3 0x100090 kqread syslogd 82654 479839 1 0 3 0x100082 netio syslogd 70716 408122 1 77 3 0x100090 poll dhclient 75797 307360 1 0 3 0x80 poll dhclient 70313 472249 0 0 3 0x14200 pgzero zerothread 61226 264079 0 0 3 0x14200 aiodoned aiodoned 6534 495654 0 0 3 0x14200 syncer update 38812 499120 0 0 3 0x14200 cleaner cleaner 82355 8441 0 0 3 0x14200 reaper reaper 93684 382272 0 0 3 0x14200 pgdaemon pagedaemon 798 440710 0 0 3 0x14200 bored crynlk 63263 488426 0 0 3 0x14200 bored crypto 11496 352323 0 0 3 0x40014200 acpi0 acpi0 87967 124230 0 0 3 0x40014200 idle1 41598 233353 0 0 3 0x14200 bored softnet 87718 57082 0 0 3 0x14200 bored systqmp 62329 97904 0 0 3 0x14200 bored systq 73430 382002 0 0 3 0x40014200 bored softclock 24694 377834 0 0 7 0x40014200 idle0 70790 86782 0 0 3 0x14200 bored smr 1 388093 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 58080 (syz-executor.1) thread 0xffff800020b284c8 (149084) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82373b28) 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 9472 71936K 71944K 78643K 10595 0 0 pcb 25 9K 10K 78643K 95 0 0 rtable 79 2K 3K 78643K 221 0 0 ifaddr 36 9K 11K 78643K 50 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1472 0 0 iov 0 0K 12K 78643K 6 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1195 75K 75K 78643K 1280 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 3 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 16 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 120 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 53 50K 71K 78643K 350 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 22 0 0 in_multi 22 1K 2K 78643K 49 0 0 ether_multi 1 0K 0K 78643K 3 0 0 mrt 0 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 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 205 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 77 12K 21K 78643K 1196 0 0 UVM aobj 2 2K 2K 78643K 2 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 5 0 0 NDP 6 0K 0K 78643K 14 0 0 temp 89 2365K 2432K 78643K 3392 0 0 kqueue 0 0K 0K 78643K 1 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 5 0 2 1 0 1 1 0 8 0 inpcbpl 280 89 0 82 1 0 1 1 0 8 0 plimitpl 152 21 0 13 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 50 0 19 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 5 0 5 1 1 0 1 0 8 0 tcpcb 544 28 0 24 1 0 1 1 0 8 0 nd6 48 6 0 4 1 0 1 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 13 0 3 1 0 1 1 0 8 0 pfstkey 112 13 0 3 1 0 1 1 0 8 0 pfstate 328 13 0 3 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 226 0 82 12 0 12 12 0 8 3 art_table 32 227 0 82 2 0 2 2 0 8 0 art_node 16 49 0 21 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 0 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 14 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1605 0 186 46 0 46 46 0 8 0 ffsino 272 1605 0 186 95 0 95 95 0 8 0 nchpl 144 1968 0 334 61 0 61 61 0 8 0 uvmvnodes 72 1681 0 0 31 0 31 31 0 8 0 vnodes 200 1681 0 0 89 0 89 89 0 8 0 namei 1024 5343 0 5343 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 1 1 1 0 8 1 scxspl 192 5215 0 5215 9 7 2 6 0 8 2 sigapl 432 310 0 296 2 0 2 2 0 8 0 futexpl 56 1097 0 1097 1 0 1 1 0 8 1 knotepl 112 107 0 78 2 1 1 2 0 8 0 kqueuepl 104 21 0 19 1 0 1 1 0 8 0 pipepl 112 240 0 221 2 1 1 1 0 8 0 fdescpl 488 311 0 296 3 0 3 3 0 8 0 filepl 152 1713 0 1620 5 0 5 5 0 8 1 lockfpl 104 27 0 27 3 2 1 1 0 8 1 lockfspl 32 12 0 12 3 2 1 1 0 8 1 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 19 0 9 1 0 1 1 0 8 0 ucredpl 96 244 0 235 1 0 1 1 0 8 0 zombiepl 144 296 0 296 2 1 1 1 0 8 1 processpl 840 327 0 296 4 0 4 4 0 8 0 procpl 600 543 0 501 4 0 4 4 0 8 0 srpgc 64 12 0 12 2 1 1 1 0 8 1 sosppl 128 3 0 3 1 0 1 1 0 8 1 sockpl 384 159 0 140 3 0 3 3 0 8 1 mcl12k 12288 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 4 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 124 0 0 15 0 15 15 0 8 0 mtagpl 80 2 0 0 1 0 1 1 0 8 0 mbufpl 256 151 0 0 8 0 8 8 0 8 0 bufpl 256 5479 0 1046 278 0 278 278 0 8 0 anonpl 16 49413 0 42462 51 2 49 49 0 125 13 amapchunkpl 152 1428 0 1343 5 0 5 5 0 158 0 amappl16 192 1685 0 1247 39 8 31 35 0 8 8 amappl15 184 7 0 6 1 0 1 1 0 8 0 amappl14 176 29 0 23 1 0 1 1 0 8 0 amappl13 168 117 0 113 1 0 1 1 0 8 0 amappl12 160 6 0 6 1 1 0 1 0 8 0 amappl11 152 213 0 200 1 0 1 1 0 8 0 amappl10 144 155 0 149 1 0 1 1 0 8 0 amappl9 136 369 0 364 1 0 1 1 0 8 0 amappl8 128 142 0 127 1 0 1 1 0 8 0 amappl7 120 74 0 68 1 0 1 1 0 8 0 amappl6 112 58 0 50 1 0 1 1 0 8 0 amappl5 104 120 0 107 1 0 1 1 0 8 0 amappl4 96 316 0 289 2 1 1 2 0 8 0 amappl3 88 129 0 122 1 0 1 1 0 8 0 amappl2 80 1626 0 1582 2 0 2 2 0 8 0 amappl1 72 16169 0 15743 24 14 10 19 0 8 0 amappl 72 782 0 750 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 1 0 0 1 0 1 1 0 8 0 uaddrrnd 24 311 0 296 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 311 0 296 1 0 1 1 0 8 0 vmmpekpl 168 6637 0 6617 2 0 2 2 0 8 0 vmmpepl 168 42603 0 41264 97 17 80 88 0 357 15 vmsppl 360 310 0 296 2 0 2 2 0 8 0 pdppl 4096 630 0 592 6 0 6 6 0 8 0 pvpl 32 160411 0 150388 137 5 132 132 0 265 34 pmappl 224 310 0 296 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 426 0 4 13 0 13 13 0 8 0