Error(out of memory): running "make update"


I am trying to build a custom filebeat module following this guide.

As the last step the command make update returns:
Error: running "make update" failed with exit code 2

I've no idea what's causing this problem.

fatal error: out of memory allocating heap arena map

runtime stack:
runtime.throw(0x863894, 0x27)
        C:/Go/src/runtime/panic.go:608 +0x79 fp=0xfffa98 sp=0xfffa68 pc=0x42ce89
runtime.(*mheap).sysAlloc(0xb6ad00, 0x400000, 0x0, 0x7f)
        C:/Go/src/runtime/malloc.go:629 +0x5c6 fp=0xfffb28 sp=0xfffa98 pc=0x40b206
runtime.(*mheap).grow(0xb6ad00, 0x1, 0x0)
        C:/Go/src/runtime/mheap.go:920 +0x49 fp=0xfffb80 sp=0xfffb28 pc=0x423c89
runtime.(*mheap).allocSpanLocked(0xb6ad00, 0x1, 0xb84788, 0x7ffc00000004)
        C:/Go/src/runtime/mheap.go:848 +0x361 fp=0xfffbc0 sp=0xfffb80 pc=0x423b11
runtime.(*mheap).alloc_m(0xb6ad00, 0x1, 0x2625a00000023, 0x7ffcdf845d04)
        C:/Go/src/runtime/mheap.go:692 +0x127 fp=0xfffc00 sp=0xfffbc0 pc=0x4232c7
        C:/Go/src/runtime/mheap.go:759 +0x53 fp=0xfffc38 sp=0xfffc00 pc=0x452f33
runtime.(*mheap).alloc(0xb6ad00, 0x1, 0x7ffcdf010023, 0xfffe80)
        C:/Go/src/runtime/mheap.go:758 +0x91 fp=0xfffc88 sp=0xfffc38 pc=0x423571
runtime.(*mcentral).grow(0xb6caf0, 0x0)
        C:/Go/src/runtime/mcentral.go:232 +0x9b fp=0xfffcd0 sp=0xfffc88 pc=0x416d1b
runtime.(*mcentral).cacheSpan(0xb6caf0, 0x416e7b)
        C:/Go/src/runtime/mcentral.go:106 +0x2ff fp=0xfffd18 sp=0xfffcd0 pc=0x41684f
runtime.(*mcache).refill(0x180000, 0x180023)
        C:/Go/src/runtime/mcache.go:122 +0xa3 fp=0xfffd48 sp=0xfffd18 pc=0x4163f3
        C:/Go/src/runtime/malloc.go:749 +0x39 fp=0xfffd68 sp=0xfffd48 pc=0x4522c9
runtime.(*mcache).nextFree(0x180000, 0xfffe23, 0x45239c, 0x4000, 0x0)
        C:/Go/src/runtime/malloc.go:748 +0xbd fp=0xfffdc0 sp=0xfffd68 pc=0x40b54d
runtime.mallocgc(0x100, 0x7e7e00, 0x184001, 0x180000)
        C:/Go/src/runtime/malloc.go:903 +0x7d2 fp=0xfffe60 sp=0xfffdc0 pc=0x40bed2
runtime.newobject(0x7e7e00, 0xb67780)
        C:/Go/src/runtime/malloc.go:1032 +0x3f fp=0xfffe90 sp=0xfffe60 pc=0x40c2df
        C:/Go/src/runtime/proc.go:640 +0x129 fp=0xfffec8 sp=0xfffe90 pc=0x42fc59
        C:/Go/src/runtime/proc.go:546 +0x97 fp=0xffff30 sp=0xfffec8 pc=0x42f8d7
runtime.rt0_go(0xffff60, 0x7ffce2691fe4, 0xffff60, 0x0, 0x7ffce2691fe4, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        C:/Go/src/runtime/asm_amd64.s:195 +0x126 fp=0xffff38 sp=0xffff30 pc=0x454b66
Error: running "make update" failed with exit code 2

Do you mind pushing your module to GH to see what could cause the problem?
Probably you have so many fields which either leads to failure in asset generation or fields.yml collection.

Yes. You can see this commit

It is a simple module without many fields.


Indeed, it is a simple module. I've tried reproducing the issue on my machine, but it working properly. Does it fail everytime you are trying to run it?
Could you please provide more info about the machine you tried running the command? How much RAM is available? What version of go you are running?

Yes, it fails everytime.

I am using a Windows 10 machine with 8 GB of RAM (~4,0 GB available) and go 1.11.2.
The CPU is Intel(R) Core(TM) i5-7440HQ CPU @ 2.80GHz

I have seen this issue on the tracker of Golang:
Could you please try to run make update using Golang 1.10?

Is it 32-bit or 64-bit system?

It is a 64-bit system. Now, I am using a Linux system and the command works correctly. I will try with golang 1.10 on Windows.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.