panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *300201 94480 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,ffff800020bfd0c0,3,ffff800020b6d530) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020bfd0c0,3,ffff800020b6d530) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8067abea98,80084b01,ffff800020bfd0c0,3,fffffd807f7c6a20,ffff800020b6d530) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80670ad3a8,80084b01,ffff800020bfd0c0,ffff800020b6d530) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b6d530,ffff800020bfd200,ffff800020bfd1f0) at sys_ioctl+0x651 syscall(ffff800020bfd2a0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020bfd2a0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffc50f8,36,3,a60cad6d890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc4c10, 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,ffff800020bfd0c0,3,ffff800020b6d530) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020bfd0c0,3,ffff800020b6d530) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8067abea98,80084b01,ffff800020bfd0c0,3,fffffd807f7c6a20,ffff800020b6d530) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80670ad3a8,80084b01,ffff800020bfd0c0,ffff800020b6d530) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b6d530,ffff800020bfd200,ffff800020bfd1f0) at sys_ioctl+0x651 syscall(ffff800020bfd2a0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020bfd2a0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffc50f8,36,3,a60cad6d890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc4c10, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020bfccf0 rbx 0xffff800020bfcda0 rdx 0xffffffff81f88285 cy_pio_rec+0x127 rcx 0 rax 0 r8 0xffffffff81a01223 kprintf+0x183 r9 0x1 r10 0x25 r11 0xcfff649ed651b17f r12 0x3000000008 r13 0xffff800020bfcd00 r14 0x100 r15 0x1 rip 0xffffffff81655cb8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020bfcce0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=300201 stat=onproc flags process=2 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020b75c30,0xffffffff8234d070 process=0xffff800020b7c9f0 user=0xffff800020bf8000, vmspace=0xfffffd807effe708 estcpu=0, cpticks=3, pctcpu=0.0 user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *94480 300201 62069 0 7 0x2 syz-executor.1 36863 153244 62069 0 3 0x82 piperd syz-executor.0 14452 493759 0 0 3 0x14200 bored sosplice 62069 429567 78154 0 3 0x82 thrsleep syz-fuzzer 62069 508388 78154 0 3 0x4000082 thrsleep syz-fuzzer 62069 233108 78154 0 3 0x4000082 thrsleep syz-fuzzer 62069 301384 78154 0 3 0x4000082 thrsleep syz-fuzzer 62069 488100 78154 0 3 0x4000082 thrsleep syz-fuzzer 62069 135540 78154 0 3 0x4000082 thrsleep syz-fuzzer 62069 79378 78154 0 3 0x4000082 thrsleep syz-fuzzer 62069 475062 78154 0 3 0x4000082 thrsleep syz-fuzzer 62069 227127 78154 0 3 0x4000082 kqread syz-fuzzer 62069 334520 78154 0 3 0x4000082 thrsleep syz-fuzzer 62069 480741 78154 0 3 0x4000082 thrsleep syz-fuzzer 78154 93539 68858 0 3 0x10008a pause ksh 68858 27510 74464 0 3 0x92 select sshd 31911 306106 1 0 3 0x100083 ttyin getty 74464 112731 1 0 3 0x80 select sshd 45024 325212 85346 74 3 0x100092 bpf pflogd 85346 281057 1 0 3 0x80 netio pflogd 3972 70774 69348 73 3 0x100090 kqread syslogd 69348 261442 1 0 3 0x100082 netio syslogd 52984 201011 1 77 3 0x100090 poll dhclient 33898 476254 1 0 3 0x80 poll dhclient 59315 418723 0 0 3 0x14200 pgzero zerothread 18912 315045 0 0 3 0x14200 aiodoned aiodoned 43592 298670 0 0 3 0x14200 syncer update 76664 38943 0 0 3 0x14200 cleaner cleaner 52327 18467 0 0 3 0x14200 reaper reaper 3532 10386 0 0 3 0x14200 pgdaemon pagedaemon 1170 88402 0 0 3 0x14200 bored crynlk 32585 450707 0 0 3 0x14200 bored crypto 8899 123800 0 0 3 0x40014200 acpi0 acpi0 44153 256808 0 0 7 0x40014200 idle1 68211 247147 0 0 3 0x14200 bored softnet 7997 205918 0 0 3 0x14200 bored systqmp 2943 146774 0 0 3 0x14200 bored systq 57489 234770 0 0 3 0x40014200 bored softclock 42441 115195 0 0 3 0x40014200 idle0 29817 376604 0 0 3 0x14200 bored smr 1 137305 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 94480 (syz-executor.1) thread 0xffff800020b6d530 (300201) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82372440) 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 9522 71954K 74005K 78643K 10811 0 0 pcb 25 9K 10K 78643K 349 0 0 rtable 82 3K 4K 78643K 659 0 0 ifaddr 56 13K 15K 78643K 179 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1485 0 0 iov 0 0K 16K 78643K 76 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1192 75K 75K 78643K 1598 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 10 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 56 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 587 0 0 sigio 0 0K 0K 78643K 7 0 0 proc 54 51K 71K 78643K 685 0 0 subproc 53 55297K 67586K 78643K 497 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 56 0 0 in_multi 22 1K 2K 78643K 184 0 0 ether_multi 1 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 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 288 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 94 13K 30K 78643K 2744 0 0 UVM aobj 30 2K 2K 78643K 31 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 19 0 0 NDP 12 0K 0K 78643K 64 0 0 temp 164 2375K 3010K 78643K 5337 0 0 kqueue 0 0K 0K 78643K 2 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 16 0 13 1 0 1 1 0 8 0 inpcbpl 280 288 0 281 1 0 1 1 0 8 0 plimitpl 152 44 0 36 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 151 0 120 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 19 0 19 1 1 0 1 0 8 0 tcpcb 544 94 0 90 1 0 1 1 0 8 0 nd6 48 28 0 26 1 0 1 1 0 8 0 ppxss 1128 9 0 9 5 5 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 38 0 20 1 0 1 1 0 8 0 pfstkey 112 38 0 20 1 0 1 1 0 8 0 pfstate 328 38 0 20 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 698 0 551 12 0 12 12 0 8 0 art_table 32 699 0 551 2 0 2 2 0 8 0 art_node 16 148 0 120 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 2 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 54 0 44 1 0 1 1 0 8 0 shmpl 112 29 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2289 0 842 47 0 47 47 0 8 0 ffsino 272 2289 0 842 97 0 97 97 0 8 0 nchpl 144 3324 0 1694 61 0 61 61 0 8 0 uvmvnodes 72 2565 0 0 47 0 47 47 0 8 0 vnodes 200 2565 0 0 135 0 135 135 0 8 0 namei 1024 9952 0 9952 1 0 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 9222 0 9222 11 10 1 6 0 8 1 sigapl 432 744 0 730 2 0 2 2 0 8 0 futexpl 56 5879 0 5879 1 0 1 1 0 8 1 knotepl 112 354 0 325 2 1 1 2 0 8 0 kqueuepl 104 98 0 96 1 0 1 1 0 8 0 pipepl 112 584 0 565 2 0 2 2 0 8 1 fdescpl 488 745 0 730 3 0 3 3 0 8 0 filepl 152 4412 0 4319 6 1 5 5 0 8 1 lockfpl 104 182 0 182 2 1 1 1 0 8 1 lockfspl 32 372 0 372 2 1 1 1 0 8 1 sessionpl 112 30 0 20 1 0 1 1 0 8 0 pgrppl 48 31 0 21 1 0 1 1 0 8 0 ucredpl 96 807 0 798 1 0 1 1 0 8 0 zombiepl 144 730 0 730 1 0 1 1 0 8 1 processpl 840 761 0 730 4 0 4 4 0 8 0 procpl 600 1853 0 1812 6 2 4 5 0 8 0 srpgc 64 78 0 78 3 2 1 1 0 8 1 sosppl 128 11 0 11 4 3 1 1 0 8 1 sockpl 384 594 0 575 4 1 3 4 0 8 1 mcl64k 65536 7 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 5 0 0 1 0 1 1 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 10 0 0 2 0 2 2 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 129 0 0 16 0 16 16 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 174 0 0 9 0 9 9 0 8 0 bufpl 256 6411 0 1047 336 0 336 336 0 8 0 anonpl 16 101869 0 94676 57 20 37 48 0 125 1 amapchunkpl 152 5896 0 5809 15 10 5 9 0 158 1 amappl16 192 2941 0 2484 38 12 26 35 0 8 2 amappl15 184 127 0 126 1 0 1 1 0 8 0 amappl14 176 28 0 24 1 0 1 1 0 8 0 amappl13 168 68 0 64 1 0 1 1 0 8 0 amappl12 160 12 0 11 1 0 1 1 0 8 0 amappl11 152 384 0 371 1 0 1 1 0 8 0 amappl10 144 281 0 276 1 0 1 1 0 8 0 amappl9 136 428 0 423 1 0 1 1 0 8 0 amappl8 128 370 0 349 1 0 1 1 0 8 0 amappl7 120 54 0 48 1 0 1 1 0 8 0 amappl6 112 66 0 59 1 0 1 1 0 8 0 amappl5 104 282 0 266 1 0 1 1 0 8 0 amappl4 96 416 0 391 2 1 1 2 0 8 0 amappl3 88 213 0 205 1 0 1 1 0 8 0 amappl2 80 5634 0 5587 3 1 2 2 0 8 0 amappl1 72 25671 0 25252 24 14 10 19 0 8 0 amappl 72 2173 0 2140 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 30 0 1 1 0 1 1 0 8 0 uaddrrnd 24 745 0 730 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 745 0 730 1 0 1 1 0 8 0 vmmpekpl 168 10251 0 10225 2 0 2 2 0 8 0 vmmpepl 168 90319 0 88965 108 27 81 81 0 357 14 vmsppl 360 744 0 730 2 0 2 2 0 8 0 pdppl 4096 1498 0 1460 6 0 6 6 0 8 0 pvpl 32 294380 0 284106 145 38 107 123 0 265 8 pmappl 224 744 0 730 3 2 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 491 0 3 14 0 14 14 0 8 0