login: panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *398997 33539 0 0x2 0 0K 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(1b1300,80084b01,ffff800020c32da0,3,ffff800020b15520) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c32da0,3,ffff800020b15520) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80620c8918,80084b01,ffff800020c32da0,3,fffffd807f7c6960,ffff800020b15520) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066a76148,80084b01,ffff800020c32da0,ffff800020b15520) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b15520,ffff800020c32ee0,ffff800020c32ed0) at sys_ioctl+0x651 syscall(ffff800020c32f80) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c32f80) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffbc308,36,3,afd9c84c890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbbe20, 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: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,ffff800020c32da0,3,ffff800020b15520) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c32da0,3,ffff800020b15520) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80620c8918,80084b01,ffff800020c32da0,3,fffffd807f7c6960,ffff800020b15520) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066a76148,80084b01,ffff800020c32da0,ffff800020b15520) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b15520,ffff800020c32ee0,ffff800020c32ed0) at sys_ioctl+0x651 syscall(ffff800020c32f80) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c32f80) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffbc308,36,3,afd9c84c890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbbe20, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c329d0 rbx 0xffff800020c32a80 rdx 0xffffffff81f8c5e5 apollo_pio_rec+0x91c9 rcx 0 rax 0 r8 0xffffffff811c2a43 kprintf+0x183 r9 0x1 r10 0x25 r11 0x470fcaf88da45527 r12 0x3000000008 r13 0xffff800020c329e0 r14 0x100 r15 0x1 rip 0xffffffff813c20e8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c329c0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=398997 stat=onproc flags process=2 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020b15778,0xffffffff82367ba0 process=0xffff800020b8c6a8 user=0xffff800020c2e000, vmspace=0xfffffd807f00c870 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *33539 398997 15368 0 7 0x2 syz-executor.1 18602 187588 15368 0 3 0x82 piperd syz-executor.0 15368 383404 29282 0 3 0x82 thrsleep syz-fuzzer 15368 360215 29282 0 3 0x4000082 thrsleep syz-fuzzer 15368 193276 29282 0 3 0x4000082 thrsleep syz-fuzzer 15368 187318 29282 0 3 0x4000082 thrsleep syz-fuzzer 15368 242116 29282 0 3 0x4000082 thrsleep syz-fuzzer 15368 35919 29282 0 3 0x4000082 thrsleep syz-fuzzer 15368 520125 29282 0 3 0x4000082 thrsleep syz-fuzzer 15368 213184 29282 0 3 0x4000082 thrsleep syz-fuzzer 15368 380011 29282 0 3 0x4000082 kqread syz-fuzzer 15368 105195 29282 0 3 0x4000082 thrsleep syz-fuzzer 29282 105295 16975 0 3 0x10008a pause ksh 16975 335070 95735 0 3 0x92 select sshd 35839 472772 1 0 3 0x100083 ttyin getty 95735 263471 1 0 3 0x80 select sshd 49838 290378 90545 74 3 0x100092 bpf pflogd 90545 471325 1 0 3 0x80 netio pflogd 53227 176153 77654 73 3 0x100090 kqread syslogd 77654 202178 1 0 3 0x100082 netio syslogd 49631 169670 1 77 3 0x100090 poll dhclient 78489 134348 1 0 3 0x80 poll dhclient 63078 21032 0 0 3 0x14200 pgzero zerothread 35976 91732 0 0 3 0x14200 aiodoned aiodoned 26489 207730 0 0 3 0x14200 syncer update 66820 414840 0 0 3 0x14200 cleaner cleaner 44677 365422 0 0 3 0x14200 reaper reaper 53158 440946 0 0 3 0x14200 pgdaemon pagedaemon 82998 481600 0 0 3 0x14200 bored crynlk 70320 447873 0 0 3 0x14200 bored crypto 81226 98761 0 0 3 0x40014200 acpi0 acpi0 24100 109410 0 0 7 0x40014200 idle1 79220 503210 0 0 3 0x14200 bored softnet 66475 10104 0 0 3 0x14200 bored systqmp 77707 522252 0 0 3 0x14200 bored systq 46264 502188 0 0 3 0x40014200 bored softclock 94299 367151 0 0 3 0x40014200 idle0 7673 58646 0 0 3 0x14200 bored smr 1 378576 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 33539 (syz-executor.1) thread 0xffff800020b15520 (398997) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82396898) 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 9471 71936K 71944K 78643K 10597 0 0 pcb 25 9K 10K 78643K 125 0 0 rtable 82 3K 4K 78643K 208 0 0 ifaddr 38 10K 11K 78643K 58 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1471 0 0 iov 0 0K 12K 78643K 13 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1197 75K 75K 78643K 1266 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 1K 78643K 2 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 4 0K 0K 78643K 4 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 25K 78643K 117 0 0 sigio 0 0K 0K 78643K 3 0 0 proc 53 50K 71K 78643K 330 0 0 subproc 53 55297K 67586K 78643K 89 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 10 0 0 in_multi 22 1K 2K 78643K 37 0 0 ether_multi 1 0K 0K 78643K 1 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 203 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 79 12K 21K 78643K 1200 0 0 UVM aobj 6 2K 2K 78643K 6 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 10 0 0 NDP 6 0K 0K 78643K 14 0 0 temp 86 2365K 2431K 78643K 3463 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 4 0 1 1 0 1 1 0 8 0 inpcbpl 280 88 0 81 1 0 1 1 0 8 0 plimitpl 152 23 0 15 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 41 0 10 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 21 0 17 1 0 1 1 0 8 0 nd6 48 4 0 2 1 0 1 1 0 8 0 ppxss 1128 3 0 3 1 0 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 12 0 2 1 0 1 1 0 8 0 pfstkey 112 12 0 2 1 0 1 1 0 8 0 pfstate 328 12 0 2 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 185 0 41 12 0 12 12 0 8 3 art_table 32 186 0 41 2 0 2 2 0 8 0 art_node 16 40 0 12 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 2 1 0 1 1 0 8 1 semapl 112 2 0 0 1 0 1 1 0 8 0 shmpl 112 4 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1619 0 203 46 0 46 46 0 8 0 ffsino 272 1619 0 203 95 0 95 95 0 8 0 nchpl 144 1988 0 357 61 0 61 61 0 8 0 uvmvnodes 72 1676 0 0 31 0 31 31 0 8 0 vnodes 200 1676 0 0 89 0 89 89 0 8 0 namei 1024 5190 0 5190 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 1 0 1 1 0 1 1 0 8 1 scxspl 192 5157 0 5157 7 5 2 6 0 8 2 sigapl 432 313 0 299 3 0 3 3 0 8 1 futexpl 56 1076 0 1076 1 0 1 1 0 8 1 knotepl 112 105 0 84 1 0 1 1 0 8 0 kqueuepl 104 29 0 27 1 0 1 1 0 8 0 pipepl 112 202 0 183 2 1 1 1 0 8 0 fdescpl 488 314 0 299 3 0 3 3 0 8 0 filepl 152 1671 0 1578 5 0 5 5 0 8 1 lockfpl 104 27 0 27 2 1 1 1 0 8 1 lockfspl 32 9 0 9 2 1 1 1 0 8 1 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 18 0 8 1 0 1 1 0 8 0 ucredpl 96 237 0 228 1 0 1 1 0 8 0 zombiepl 144 299 0 299 2 1 1 1 0 8 1 processpl 840 329 0 299 4 0 4 4 0 8 0 procpl 600 545 0 506 4 0 4 4 0 8 1 srpgc 64 6 0 6 1 0 1 1 0 8 1 sockpl 384 170 0 151 3 0 3 3 0 8 1 mcl64k 65536 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 3 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 145 0 0 9 0 9 9 0 8 0 bufpl 256 5952 0 1143 301 0 301 301 0 8 0 anonpl 16 36493 0 29574 37 2 35 35 0 125 0 amapchunkpl 152 1342 0 1248 5 0 5 5 0 158 0 amappl16 192 941 0 530 22 0 22 22 0 8 1 amappl15 184 61 0 57 1 0 1 1 0 8 0 amappl14 176 22 0 20 2 1 1 1 0 8 0 amappl13 168 30 0 25 1 0 1 1 0 8 0 amappl12 160 18 0 15 1 0 1 1 0 8 0 amappl11 152 27 0 12 1 0 1 1 0 8 0 amappl10 144 162 0 159 1 0 1 1 0 8 0 amappl9 136 581 0 578 1 0 1 1 0 8 0 amappl8 128 134 0 121 1 0 1 1 0 8 0 amappl7 120 74 0 69 1 0 1 1 0 8 0 amappl6 112 53 0 48 1 0 1 1 0 8 0 amappl5 104 114 0 100 1 0 1 1 0 8 0 amappl4 96 550 0 517 2 1 1 2 0 8 0 amappl3 88 121 0 114 1 0 1 1 0 8 0 amappl2 80 1547 0 1502 2 0 2 2 0 8 0 amappl1 72 16341 0 15920 25 15 10 20 0 8 0 amappl 72 786 0 752 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 5 0 0 1 0 1 1 0 8 0 uaddrrnd 24 314 0 299 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 314 0 299 1 0 1 1 0 8 0 vmmpekpl 168 6578 0 6557 2 0 2 2 0 8 0 vmmpepl 168 40638 0 39334 89 12 77 77 0 357 14 vmsppl 360 313 0 299 2 0 2 2 0 8 0 pdppl 4096 636 0 598 6 0 6 6 0 8 0 pvpl 32 142156 0 132123 109 7 102 104 0 265 7 pmappl 224 313 0 299 2 0 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 453 0 4 13 0 13 13 0 8 0