panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *192025 59315 0 0x2 0 1K syz-executor.1 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(1c1300,80084b01,ffff800020c179c0,3,ffff800020b75c38) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1c1300,80084b01,ffff800020c179c0,3,ffff800020b75c38) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80613cead8,80084b01,ffff800020c179c0,3,fffffd807f7c6a20,ffff800020b75c38) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066f0c868,80084b01,ffff800020c179c0,ffff800020b75c38) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b75c38,ffff800020c17b00,ffff800020c17af0) at sys_ioctl+0x651 syscall(ffff800020c17ba0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c17ba0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffe7d38,36,3,bd00d128958) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe7850, 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(1c1300,80084b01,ffff800020c179c0,3,ffff800020b75c38) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1c1300,80084b01,ffff800020c179c0,3,ffff800020b75c38) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80613cead8,80084b01,ffff800020c179c0,3,fffffd807f7c6a20,ffff800020b75c38) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066f0c868,80084b01,ffff800020c179c0,ffff800020b75c38) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b75c38,ffff800020c17b00,ffff800020c17af0) at sys_ioctl+0x651 syscall(ffff800020c17ba0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c17ba0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffe7d38,36,3,bd00d128958) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe7850, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c175f0 rbx 0xffff800020c176a0 rdx 0xffffffff81f8cf20 apollo_pio_rec+0x94b7 rcx 0 rax 0 r8 0xffffffff81793b13 kprintf+0x183 r9 0x1 r10 0x25 r11 0xdc1e975256407ed7 r12 0x3000000008 r13 0xffff800020c17600 r14 0x100 r15 0x1 rip 0xffffffff810c0a18 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c175e0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=192025 stat=onproc flags process=2 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020b759e0,0xffffffff82361320 process=0xffff800020b8c360 user=0xffff800020c12000, vmspace=0xfffffd807f00b708 estcpu=0, cpticks=3, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *59315 192025 89743 0 7 0x2 syz-executor.1 41673 206204 1 0 3 0x100083 ttyin getty 19160 46906 89743 0 3 0x82 piperd syz-executor.0 68134 12525 0 0 3 0x14200 bored sosplice 89743 409193 5237 0 3 0x82 thrsleep syz-fuzzer 89743 218833 5237 0 3 0x4000082 nanosleep syz-fuzzer 89743 146187 5237 0 3 0x4000082 thrsleep syz-fuzzer 89743 511613 5237 0 3 0x4000082 thrsleep syz-fuzzer 89743 68333 5237 0 3 0x4000082 thrsleep syz-fuzzer 89743 281092 5237 0 3 0x4000082 thrsleep syz-fuzzer 89743 236178 5237 0 3 0x4000082 kqread syz-fuzzer 89743 21803 5237 0 3 0x4000082 thrsleep syz-fuzzer 89743 97715 5237 0 3 0x4000082 thrsleep syz-fuzzer 89743 446385 5237 0 3 0x4000082 thrsleep syz-fuzzer 5237 240320 70680 0 3 0x10008a pause ksh 70680 327615 1835 0 3 0x92 select sshd 1835 489344 1 0 3 0x80 select sshd 62470 94704 23444 74 3 0x100092 bpf pflogd 23444 19228 1 0 3 0x80 netio pflogd 95842 21830 83816 73 3 0x100090 kqread syslogd 83816 298035 1 0 3 0x100082 netio syslogd 97670 515198 1 77 3 0x100090 poll dhclient 68676 360393 1 0 3 0x80 poll dhclient 31551 246913 0 0 3 0x14200 pgzero zerothread 76966 419838 0 0 3 0x14200 aiodoned aiodoned 77920 406223 0 0 3 0x14200 syncer update 64755 156129 0 0 3 0x14200 cleaner cleaner 14034 472570 0 0 3 0x14200 reaper reaper 59069 187990 0 0 3 0x14200 pgdaemon pagedaemon 39285 501384 0 0 3 0x14200 bored crynlk 11986 306734 0 0 3 0x14200 bored crypto 88243 250773 0 0 3 0x40014200 acpi0 acpi0 22924 436184 0 0 3 0x40014200 idle1 26425 521920 0 0 3 0x14200 bored softnet 93799 353134 0 0 3 0x14200 bored systqmp 97205 146804 0 0 3 0x14200 bored systq 19857 310183 0 0 3 0x40014200 bored softclock 47270 446136 0 0 7 0x40014200 idle0 85798 8374 0 0 3 0x14200 bored smr 1 246393 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 59315 (syz-executor.1) thread 0xffff800020b75c38 (192025) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8237aa40) 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 9529 71951K 71963K 78643K 11041 0 0 pcb 25 9K 11K 78643K 631 0 0 rtable 82 3K 4K 78643K 673 0 0 ifaddr 56 13K 14K 78643K 261 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1486 0 0 iov 0 0K 28K 78643K 144 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1189 74K 75K 78643K 1848 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 19 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 148 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 19K 78643K 1058 0 0 sigio 0 0K 0K 78643K 26 0 0 proc 54 51K 71K 78643K 597 0 0 subproc 55 57345K 67586K 78643K 298 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 111 0 0 in_multi 22 1K 2K 78643K 135 0 0 ether_multi 1 0K 0K 78643K 9 0 0 mrt 0 0K 0K 78643K 7 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 313 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 78 12K 29K 78643K 4266 0 0 UVM aobj 53 2K 2K 78643K 59 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 62 0 0 NDP 12 0K 0K 78643K 77 0 0 temp 166 2379K 3019K 78643K 6514 0 0 kqueue 0 0K 0K 78643K 14 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 10 0 7 1 0 1 1 0 8 0 inpcbpl 280 554 0 547 1 0 1 1 0 8 0 plimitpl 152 66 0 58 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 96 0 65 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 7 0 7 1 1 0 1 0 8 0 tcpcb 544 176 0 172 1 0 1 1 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 16 0 14 1 0 1 1 0 8 0 ppxss 1128 39 0 39 6 5 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 32 0 20 1 0 1 1 0 8 0 pfstkey 112 32 0 20 1 0 1 1 0 8 0 pfstate 328 32 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 440 0 293 12 0 12 12 0 8 0 art_table 32 441 0 293 2 0 2 2 0 8 0 art_node 16 95 0 67 1 0 1 1 0 8 0 sysvmsgpl 40 23 0 10 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 146 0 136 1 0 1 1 0 8 0 shmpl 112 57 0 6 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3359 0 1911 47 0 47 47 0 8 0 ffsino 272 3359 0 1911 97 0 97 97 0 8 0 nchpl 144 5032 0 3375 62 0 62 62 0 8 0 uvmvnodes 72 3611 0 0 66 0 66 66 0 8 0 vnodes 200 3611 0 0 191 0 191 191 0 8 0 namei 1024 15390 0 15390 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 2 0 1 0 8 0 scxspl 192 14750 0 14750 11 10 1 6 0 8 1 sigapl 432 1237 0 1223 2 0 2 2 0 8 0 futexpl 56 11570 0 11570 1 0 1 1 0 8 1 knotepl 112 435 0 414 1 0 1 1 0 8 0 kqueuepl 104 293 0 291 1 0 1 1 0 8 0 pipepl 112 836 0 817 3 2 1 2 0 8 0 fdescpl 488 1238 0 1223 3 0 3 3 0 8 0 filepl 152 7258 0 7164 6 1 5 6 0 8 1 lockfpl 104 302 0 302 3 2 1 1 0 8 1 lockfspl 32 261 0 261 3 2 1 1 0 8 1 sessionpl 112 25 0 15 1 0 1 1 0 8 0 pgrppl 48 38 0 28 1 0 1 1 0 8 0 ucredpl 96 1224 0 1215 1 0 1 1 0 8 0 zombiepl 144 1223 0 1223 2 1 1 1 0 8 1 processpl 840 1254 0 1223 4 0 4 4 0 8 0 procpl 600 3434 0 3394 5 1 4 5 0 8 0 srpgc 64 43 0 43 4 3 1 1 0 8 1 sosppl 128 14 0 14 7 7 0 1 0 8 0 sockpl 384 1096 0 1077 5 2 3 4 0 8 1 mcl64k 65536 229 0 0 29 4 25 29 0 8 1 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 9 0 0 1 0 1 1 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 10 0 0 2 0 2 2 0 8 0 mcl4k 4096 15 0 0 2 0 2 2 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 123 0 0 15 1 14 15 0 8 0 mtagpl 80 3 0 0 1 0 1 1 0 8 0 mbufpl 256 339 0 0 18 0 18 18 0 8 0 bufpl 256 8336 0 1312 440 0 440 440 0 8 0 anonpl 16 137452 0 130430 73 36 37 52 0 125 0 amapchunkpl 152 7830 0 7751 22 18 4 9 0 158 0 amappl16 192 5091 0 4631 50 24 26 36 0 8 2 amappl15 184 717 0 712 1 0 1 1 0 8 0 amappl14 176 142 0 137 2 1 1 1 0 8 0 amappl13 168 171 0 168 1 0 1 1 0 8 0 amappl12 160 123 0 122 1 0 1 1 0 8 0 amappl11 152 572 0 556 1 0 1 1 0 8 0 amappl10 144 70 0 67 1 0 1 1 0 8 0 amappl9 136 738 0 735 1 0 1 1 0 8 0 amappl8 128 312 0 294 1 0 1 1 0 8 0 amappl7 120 45 0 39 1 0 1 1 0 8 0 amappl6 112 387 0 381 1 0 1 1 0 8 0 amappl5 104 189 0 174 1 0 1 1 0 8 0 amappl4 96 1363 0 1334 2 1 1 2 0 8 0 amappl3 88 301 0 294 1 0 1 1 0 8 0 amappl2 80 10043 0 9999 2 0 2 2 0 8 0 amappl1 72 35590 0 35166 26 16 10 20 0 8 0 amappl 72 3733 0 3702 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 58 0 6 1 0 1 1 0 8 0 uaddrrnd 24 1238 0 1223 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1238 0 1223 1 0 1 1 0 8 0 vmmpekpl 168 14686 0 14661 2 0 2 2 0 8 0 vmmpepl 168 137283 0 135927 129 48 81 81 0 357 11 vmsppl 360 1237 0 1223 2 0 2 2 0 8 0 pdppl 4096 2484 0 2446 6 0 6 6 0 8 0 pvpl 32 394250 0 384025 168 48 120 136 0 265 17 pmappl 224 1237 0 1223 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 633 0 9 18 0 18 18 0 8 0