Open
Description
Steps to reproduce:
- install packages required for build as described on https://github.com/influxdata/influxdb/blob/master/CONTRIBUTING.md#building-from-source in a fresh/latest ubuntu 20.04 container
- git clone https://github.com/influxdata/influxdb
- cd influxdb
- git checkout v2.0.2
- make GO111MODULE=on
Expected behavior:
Successfully compiled influx DB binaries, with default worker memory limits sufficient to compile the latest tagged release without hitting out-of-memory errors.
Actual behavior:
I get a JavaScript heap out of memory
error thrown, which prevents successful make
of the influxdb v2.0.2
tag.
Logfile reports that 1 worker is used with a 2048MB
memory limit. It is not clear to me how/where this limit would be increased.
Environment info:
- System info:
Linux 5.4.0-54-generic x86_64
- InfluxDB version: Attempting to compile the
v2.0.2
tag - Other relevant environment details: ubuntu:20.04 container build environment with
sha256:f643c72bc25212974c16f3348b3a898b1ec1eb13ec1539e10a103e6e217eb2f1
The build environment itself has plenty of free memory:
$ free
total used free shared buff/cache available
Mem: 65839756 14229780 32923692 11808 18686284 50895164
Swap: 999420 0 999420
Config:
None applied, trying to do a compile with default settings.
Logs:
# Using 1 worker with 2048MB memory limit
...
<s> [webpack.Progress] 93% after chunk asset optimization SourceMapDevToolPlugin 2.d6aca44244.js generate SourceMap
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
<--- Last few GCs --->
[5838:0x9a6ab0] 91559 ms: Mark-sweep 1375.7 (1434.0) -> 1371.2 (1427.1) MB, 515.3 / 0.0 ms (+ 0.0 ms in 1 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 525 ms) (average mu = 0.048, current mu = 0.020) allocation fa
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0xf8e1bf5452b]
Security context: 0x3f4f0c5aee11 <JSObject>
1: /* anonymous */ [0xbc4fc2efa19] [/root/influxdb/ui/node_modules/source-map/lib/source-node.js:~174] [pc=0xf8e1be9525c](this=0x13d37cf0d071 <SourceNode map = 0x3a38c4706df9>,chunk=0x33b7e37b3711 <SourceNode map = 0x3a38c4706df9>)
2: arguments adaptor frame: 3->1
3: SourceNode_add [0x3f13db03a339] [/root/influxdb/ui/node_modules/source-map/lib/so...
1: 0x7f9dd2f9f46c node::Abort() [/lib/x86_64-linux-gnu/libnode.so.64]
2: 0x7f9dd2f9f4b5 [/lib/x86_64-linux-gnu/libnode.so.64]
3: 0x7f9dd31cbe6a v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/lib/x86_64-linux-gnu/libnode.so.64]
4: 0x7f9dd31cc0e1 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/lib/x86_64-linux-gnu/libnode.so.64]
5: 0x7f9dd3566c66 [/lib/x86_64-linux-gnu/libnode.so.64]
6: 0x7f9dd3578043 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/lib/x86_64-linux-gnu/libnode.so.64]
7: 0x7f9dd3578930 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/lib/x86_64-linux-gnu/libnode.so.64]
8: 0x7f9dd357a91d v8::internal::Heap::AllocateRawWithLigthRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/lib/x86_64-linux-gnu/libnode.so.64]
9: 0x7f9dd357a975 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/lib/x86_64-linux-gnu/libnode.so.64]
10: 0x7f9dd3546bfb v8::internal::Factory::AllocateRawArray(int, v8::internal::PretenureFlag) [/lib/x86_64-linux-gnu/libnode.so.64]
11: 0x7f9dd3547098 v8::internal::Factory::NewFixedArrayWithFiller(v8::internal::Heap::RootListIndex, int, v8::internal::Object*, v8::internal::PretenureFlag) [/lib/x86_64-linux-gnu/libnode.so.64]
12: 0x7f9dd350fa30 [/lib/x86_64-linux-gnu/libnode.so.64]
13: 0x7f9dd3786479 v8::internal::Runtime_GrowArrayElements(int, v8::internal::Object**, v8::internal::Isolate*) [/lib/x86_64-linux-gnu/libnode.so.64]
14: 0xf8e1bf5452b
Aborted (core dumped)
error Command failed with exit code 134.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 134.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
make[1]: *** [Makefile:16: build] Error 134
make[1]: Leaving directory '/root/influxdb/ui'
make: *** [Makefile:80: ui] Error 2
The command 'make GO111MODULE=on"' returned a non-zero code: 2