panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *380210 71623 0 0x2 0 1K syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 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,ffff800020c3d580,3,ffff800020b7d080) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c3d580,3,ffff800020b7d080) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80627db7f0,80084b01,ffff800020c3d580,3,fffffd807f7c6300,ffff800020b7d080) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8067230738,80084b01,ffff800020c3d580,ffff800020b7d080) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b7d080,ffff800020c3d6c0,ffff800020c3d6b0) at sys_ioctl+0x651 syscall(ffff800020c3d760) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c3d760) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffead08,36,3,6482e63c890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffea820, 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:398 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,ffff800020c3d580,3,ffff800020b7d080) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c3d580,3,ffff800020b7d080) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80627db7f0,80084b01,ffff800020c3d580,3,fffffd807f7c6300,ffff800020b7d080) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8067230738,80084b01,ffff800020c3d580,ffff800020b7d080) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b7d080,ffff800020c3d6c0,ffff800020c3d6b0) at sys_ioctl+0x651 syscall(ffff800020c3d760) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c3d760) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffead08,36,3,6482e63c890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffea820, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c3d1b0 rbx 0xffff800020c3d260 rdx 0xffffffff81f8d5c5 cy_pio_rec+0x5d1 rcx 0 rax 0 r8 0xffffffff81d75573 kprintf+0x183 r9 0x1 r10 0x25 r11 0xce8dd401eb7ae373 r12 0x3000000008 r13 0xffff800020c3d1c0 r14 0x100 r15 0x1 rip 0xffffffff81adbfd8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c3d1a0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=380210 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b7cbd0,0xffffffff8235c268 process=0xffff800020b3b3c0 user=0xffff800020c38000, vmspace=0xfffffd807effeb40 estcpu=1, cpticks=3, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *71623 380210 62324 0 7 0x2 syz-executor.0 90105 403603 62324 0 3 0x82 piperd syz-executor.1 33637 438955 0 0 3 0x14200 bored sosplice 62324 435006 54247 0 3 0x82 thrsleep syz-fuzzer 62324 349426 54247 0 3 0x4000082 thrsleep syz-fuzzer 62324 316346 54247 0 3 0x4000082 thrsleep syz-fuzzer 62324 267918 54247 0 3 0x4000082 thrsleep syz-fuzzer 62324 432007 54247 0 3 0x4000082 thrsleep syz-fuzzer 62324 302993 54247 0 3 0x4000082 kqread syz-fuzzer 62324 147139 54247 0 3 0x4000082 thrsleep syz-fuzzer 62324 225917 54247 0 3 0x4000082 thrsleep syz-fuzzer 62324 402503 54247 0 3 0x4000082 thrsleep syz-fuzzer 62324 433769 54247 0 3 0x4000082 thrsleep syz-fuzzer 54247 144304 12646 0 3 0x10008a pause ksh 12646 398612 34220 0 3 0x92 select sshd 49263 188544 1 0 3 0x100083 ttyin getty 34220 56123 1 0 3 0x80 select sshd 12626 21876 30778 74 3 0x100092 bpf pflogd 30778 306548 1 0 3 0x80 netio pflogd 26308 370884 86859 73 3 0x100090 kqread syslogd 86859 163858 1 0 3 0x100082 netio syslogd 92965 453588 1 77 3 0x100090 poll dhclient 81361 302452 1 0 3 0x80 poll dhclient 25850 231463 0 0 3 0x14200 pgzero zerothread 56171 348300 0 0 3 0x14200 aiodoned aiodoned 66281 487043 0 0 3 0x14200 syncer update 42880 149863 0 0 3 0x14200 cleaner cleaner 22133 459425 0 0 3 0x14200 reaper reaper 25190 362006 0 0 3 0x14200 pgdaemon pagedaemon 6919 64184 0 0 3 0x14200 bored crynlk 769 339992 0 0 3 0x14200 bored crypto 99228 347879 0 0 3 0x40014200 acpi0 acpi0 57939 172321 0 0 3 0x40014200 idle1 85714 199109 0 0 3 0x14200 bored softnet 59480 400366 0 0 3 0x14200 bored systqmp 63788 420148 0 0 3 0x14200 bored systq 84749 76053 0 0 3 0x40014200 bored softclock 25325 85712 0 0 7 0x40014200 idle0 38235 51360 0 0 3 0x14200 bored smr 1 490442 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 71623 (syz-executor.0) thread 0xffff800020b7d080 (380210) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823681d0) 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 9480 71931K 71939K 78643K 10632 0 0 pcb 25 9K 10K 78643K 163 0 0 rtable 82 3K 4K 78643K 360 0 0 ifaddr 40 10K 11K 78643K 83 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1474 0 0 iov 0 0K 12K 78643K 14 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1196 75K 75K 78643K 1378 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 9 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 34 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 222 0 0 sigio 0 0K 0K 78643K 6 0 0 proc 53 50K 71K 78643K 444 0 0 subproc 53 55297K 67586K 78643K 259 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 31 0 0 in_multi 22 1K 2K 78643K 91 0 0 ether_multi 1 0K 0K 78643K 2 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 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 81 12K 22K 78643K 1535 0 0 UVM aobj 22 2K 2K 78643K 22 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 14 0 0 NDP 7 0K 0K 78643K 28 0 0 temp 99 2366K 2433K 78643K 4070 0 0 kqueue 0 0K 0K 78643K 8 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 146 0 139 1 0 1 1 0 8 0 plimitpl 152 26 0 18 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 87 0 56 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 40 0 36 1 0 1 1 0 8 0 rttmr 72 1 0 1 1 0 1 1 0 8 1 nd6 48 14 0 12 1 0 1 1 0 8 0 ppxss 1128 1 0 1 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 17 0 2 1 0 1 1 0 8 0 pfstkey 112 17 0 2 1 0 1 1 0 8 0 pfstate 328 17 0 2 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 396 0 252 12 0 12 12 0 8 3 art_table 32 397 0 252 2 0 2 2 0 8 0 art_node 16 86 0 58 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 1 0 1 0 8 0 semapl 112 32 0 22 1 0 1 1 0 8 0 shmpl 112 20 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1755 0 328 47 0 47 47 0 8 0 ffsino 272 1755 0 328 96 0 96 96 0 8 0 nchpl 144 2271 0 642 61 0 61 61 0 8 0 uvmvnodes 72 1907 0 0 35 0 35 35 0 8 0 vnodes 200 1907 0 0 101 0 101 101 0 8 0 namei 1024 6385 0 6385 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 5612 0 5612 7 6 1 6 0 8 1 sigapl 432 403 0 389 2 0 2 2 0 8 0 futexpl 56 2133 0 2133 1 0 1 1 0 8 1 knotepl 112 226 0 205 1 0 1 1 0 8 0 kqueuepl 104 69 0 67 1 0 1 1 0 8 0 pipepl 112 248 0 229 2 1 1 1 0 8 0 fdescpl 488 404 0 389 3 0 3 3 0 8 0 filepl 152 2279 0 2186 5 0 5 5 0 8 1 lockfpl 104 62 0 62 2 1 1 1 0 8 1 lockfspl 32 149 0 149 2 1 1 1 0 8 1 sessionpl 112 23 0 13 1 0 1 1 0 8 0 pgrppl 48 27 0 17 1 0 1 1 0 8 0 ucredpl 96 309 0 300 1 0 1 1 0 8 0 zombiepl 144 389 0 389 2 1 1 1 0 8 1 processpl 840 420 0 389 4 0 4 4 0 8 0 procpl 600 777 0 737 4 0 4 4 0 8 0 srpgc 64 35 0 35 2 1 1 1 0 8 1 sosppl 128 2 0 2 1 1 0 1 0 8 0 sockpl 384 276 0 257 3 0 3 3 0 8 1 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 3 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 125 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 160 0 0 8 0 8 8 0 8 0 bufpl 256 5927 0 1143 299 0 299 299 0 8 0 anonpl 16 50046 0 43133 50 12 38 45 0 125 5 amapchunkpl 152 2044 0 1957 9 0 9 9 0 158 4 amappl16 192 1434 0 1016 34 11 23 33 0 8 1 amappl15 184 57 0 53 1 0 1 1 0 8 0 amappl14 176 125 0 120 2 1 1 1 0 8 0 amappl13 168 144 0 140 1 0 1 1 0 8 0 amappl12 160 86 0 85 1 0 1 1 0 8 0 amappl11 152 23 0 8 1 0 1 1 0 8 0 amappl10 144 71 0 66 1 0 1 1 0 8 0 amappl9 136 615 0 612 1 0 1 1 0 8 0 amappl8 128 163 0 148 1 0 1 1 0 8 0 amappl7 120 42 0 37 1 0 1 1 0 8 0 amappl6 112 73 0 66 1 0 1 1 0 8 0 amappl5 104 130 0 116 1 0 1 1 0 8 0 amappl4 96 596 0 567 2 1 1 2 0 8 0 amappl3 88 263 0 255 1 0 1 1 0 8 0 amappl2 80 2181 0 2133 2 0 2 2 0 8 0 amappl1 72 18462 0 18043 25 15 10 20 0 8 0 amappl 72 1058 0 1025 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 21 0 0 1 0 1 1 0 8 0 uaddrrnd 24 404 0 389 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 404 0 389 1 0 1 1 0 8 0 vmmpekpl 168 7317 0 7293 2 0 2 2 0 8 0 vmmpepl 168 52057 0 50741 90 12 78 78 0 357 16 vmsppl 360 403 0 389 2 0 2 2 0 8 0 pdppl 4096 816 0 778 6 0 6 6 0 8 0 pvpl 32 169746 0 159688 123 15 108 119 0 265 16 pmappl 224 403 0 389 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 451 0 4 13 0 13 13 0 8 0