login: panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *147760 13862 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(1b1300,80084b01,ffff800020c21510,3,ffff800020b29080) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c21510,3,ffff800020b29080) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd807e239b68,80084b01,ffff800020c21510,3,fffffd807f7c6960,ffff800020b29080) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80677f8278,80084b01,ffff800020c21510,ffff800020b29080) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b29080,ffff800020c21650,ffff800020c21640) at sys_ioctl+0x651 syscall(ffff800020c216f0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c216f0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffcc848,36,3,8b7d6535890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcc360, 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,ffff800020c21510,3,ffff800020b29080) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c21510,3,ffff800020b29080) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd807e239b68,80084b01,ffff800020c21510,3,fffffd807f7c6960,ffff800020b29080) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80677f8278,80084b01,ffff800020c21510,ffff800020b29080) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b29080,ffff800020c21650,ffff800020c21640) at sys_ioctl+0x651 syscall(ffff800020c216f0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c216f0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffcc848,36,3,8b7d6535890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcc360, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c21140 rbx 0xffff800020c211f0 rdx 0xffffffff81f8dd93 cy_pio_rec+0x586 rcx 0 rax 0 r8 0xffffffff81b5c743 kprintf+0x183 r9 0x1 r10 0x25 r11 0xf50a1af4df813587 r12 0x3000000008 r13 0xffff800020c21150 r14 0x100 r15 0x1 rip 0xffffffff817432d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c21130 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=147760 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b05c28,0xffffffff823e48c0 process=0xffff800020b7c9f0 user=0xffff800020c1c000, vmspace=0xfffffd807f00b870 estcpu=1, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *13862 147760 36958 0 7 0x2 syz-executor.1 97314 432191 36958 0 3 0x82 piperd syz-executor.0 36958 408946 99760 0 3 0x82 thrsleep syz-fuzzer 36958 248144 99760 0 3 0x4000082 thrsleep syz-fuzzer 36958 509741 99760 0 3 0x4000082 thrsleep syz-fuzzer 36958 510571 99760 0 3 0x4000082 thrsleep syz-fuzzer 36958 4213 99760 0 3 0x4000082 kqread syz-fuzzer 36958 44756 99760 0 3 0x4000082 thrsleep syz-fuzzer 36958 40033 99760 0 3 0x4000082 thrsleep syz-fuzzer 36958 282375 99760 0 3 0x4000082 thrsleep syz-fuzzer 36958 188997 99760 0 3 0x4000082 thrsleep syz-fuzzer 36958 336207 99760 0 3 0x4000082 thrsleep syz-fuzzer 99760 349655 21614 0 3 0x10008a pause ksh 21614 29955 49596 0 3 0x92 select sshd 26014 513399 1 0 3 0x100083 ttyin getty 49596 365480 1 0 3 0x80 select sshd 15245 48338 10909 74 3 0x100092 bpf pflogd 10909 353767 1 0 3 0x80 netio pflogd 42502 404310 99710 73 3 0x100090 kqread syslogd 99710 84503 1 0 3 0x100082 netio syslogd 12973 397414 1 77 3 0x100090 poll dhclient 65604 255119 1 0 3 0x80 poll dhclient 74386 242694 0 0 3 0x14200 pgzero zerothread 5879 509895 0 0 3 0x14200 aiodoned aiodoned 50585 505549 0 0 3 0x14200 syncer update 90647 47471 0 0 3 0x14200 cleaner cleaner 41371 1043 0 0 3 0x14200 reaper reaper 40177 71458 0 0 3 0x14200 pgdaemon pagedaemon 67845 54164 0 0 3 0x14200 bored crynlk 82590 359923 0 0 3 0x14200 bored crypto 14678 175996 0 0 3 0x40014200 acpi0 acpi0 82504 399692 0 0 3 0x40014200 idle1 27207 427992 0 0 3 0x14200 bored softnet 11414 9782 0 0 3 0x14200 bored systqmp 44094 56817 0 0 3 0x14200 bored systq 17567 284819 0 0 3 0x40014200 bored softclock 18411 513900 0 0 7 0x40014200 idle0 55580 377830 0 0 3 0x14200 bored smr 1 438410 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 13862 (syz-executor.1) thread 0xffff800020b29080 (147760) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82346f00) 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 9468 71928K 71936K 78643K 10607 0 0 pcb 25 9K 10K 78643K 101 0 0 rtable 82 3K 4K 78643K 218 0 0 ifaddr 37 10K 11K 78643K 64 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1473 0 0 iov 0 0K 20K 78643K 13 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1209 76K 76K 78643K 1273 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 4 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 6 0K 0K 78643K 6 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 106 0 0 proc 54 51K 83K 78643K 329 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 8 0 0 in_multi 22 1K 2K 78643K 36 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 42 185K 185K 78643K 42 0 0 exec 0 0K 1K 78643K 197 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 76 12K 21K 78643K 1176 0 0 UVM aobj 9 2K 2K 78643K 9 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 12 0 0 NDP 6 0K 0K 78643K 16 0 0 temp 84 2364K 2429K 78643K 3468 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 4 0 1 1 0 1 1 0 8 0 inpcbpl 280 87 0 80 1 0 1 1 0 8 0 plimitpl 152 18 0 10 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 36 0 32 1 0 1 1 0 8 0 nd6 48 4 0 2 1 0 1 1 0 8 0 ppxss 1128 4 0 4 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 13 0 2 1 0 1 1 0 8 0 pfstkey 112 13 0 2 1 0 1 1 0 8 0 pfstate 328 13 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 semapl 112 4 0 0 1 0 1 1 0 8 0 shmpl 112 7 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1600 0 181 46 0 46 46 0 8 0 ffsino 272 1600 0 181 95 0 95 95 0 8 0 nchpl 144 1954 0 323 61 0 61 61 0 8 0 uvmvnodes 72 1671 0 0 31 0 31 31 0 8 0 vnodes 200 1671 0 0 88 0 88 88 0 8 0 namei 1024 5076 0 5076 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 3 0 3 1 0 1 1 0 8 1 scxspl 192 5026 0 5026 7 5 2 6 0 8 2 sigapl 432 302 0 288 2 0 2 2 0 8 0 futexpl 56 1028 0 1028 1 0 1 1 0 8 1 knotepl 112 86 0 65 1 0 1 1 0 8 0 kqueuepl 104 30 0 28 1 0 1 1 0 8 0 pipepl 112 214 0 195 2 1 1 1 0 8 0 fdescpl 488 303 0 288 3 0 3 3 0 8 0 filepl 152 1608 0 1515 5 0 5 5 0 8 1 lockfpl 104 48 0 48 2 1 1 1 0 8 1 lockfspl 32 62 0 62 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 154 0 145 1 0 1 1 0 8 0 zombiepl 144 288 0 288 2 1 1 1 0 8 1 processpl 840 318 0 288 4 0 4 4 0 8 0 procpl 600 526 0 487 4 0 4 4 0 8 0 srpgc 64 6 0 6 1 0 1 1 0 8 1 sockpl 384 165 0 146 3 0 3 3 0 8 1 mcl64k 65536 1 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 mcl4k 4096 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 118 0 0 14 0 14 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 134 0 0 8 0 8 8 0 8 0 bufpl 256 5879 0 1143 296 0 296 296 0 8 0 anonpl 16 36968 0 30041 40 2 38 38 0 125 3 amapchunkpl 152 1260 0 1174 5 0 5 5 0 158 1 amappl16 192 883 0 453 24 0 24 24 0 8 2 amappl15 184 57 0 53 1 0 1 1 0 8 0 amappl14 176 68 0 63 2 1 1 1 0 8 0 amappl13 168 69 0 65 1 0 1 1 0 8 0 amappl12 160 62 0 59 1 0 1 1 0 8 0 amappl11 152 27 0 9 1 0 1 1 0 8 0 amappl10 144 67 0 64 1 0 1 1 0 8 0 amappl9 136 583 0 579 1 0 1 1 0 8 0 amappl8 128 123 0 111 1 0 1 1 0 8 0 amappl7 120 31 0 27 1 0 1 1 0 8 0 amappl6 112 61 0 53 1 0 1 1 0 8 0 amappl5 104 114 0 100 1 0 1 1 0 8 0 amappl4 96 541 0 513 2 1 1 2 0 8 0 amappl3 88 204 0 199 1 0 1 1 0 8 0 amappl2 80 1451 0 1406 2 0 2 2 0 8 0 amappl1 72 16185 0 15760 25 14 11 20 0 8 1 amappl 72 761 0 728 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 8 0 0 1 0 1 1 0 8 0 uaddrrnd 24 303 0 288 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 303 0 288 1 0 1 1 0 8 0 vmmpekpl 168 6596 0 6573 2 0 2 2 0 8 0 vmmpepl 168 40069 0 38739 89 10 79 80 0 357 15 vmsppl 360 302 0 288 2 0 2 2 0 8 0 pdppl 4096 614 0 576 6 0 6 6 0 8 0 pvpl 32 139108 0 129055 110 4 106 106 0 265 12 pmappl 224 302 0 288 2 0 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 445 0 4 13 0 13 13 0 8 0