Automation for Kubernetes development and testing. Spin up production-like environments for development, testing, and CI on demand. Use the same configuration and workflows at every step of the process. Speed up your builds and test runs via shared result caching
<--- Last few GCs --->
[25142:0x102600000] 38002 ms: Scavenge 1202.4 (1438.0) -> 1188.9 (1441.0) MB, 6.4 / 0.0 ms (average mu = 0.138, current mu = 0.048) allocation failure
[25142:0x102600000] 39224 ms: Mark-sweep 1203.8 (1441.0) -> 1189.2 (1438.0) MB, 1193.5 / 0.0 ms (average mu = 0.097, current mu = 0.050) allocation failure scavenge might not succeed
[25142:0x102600000] 39263 ms: Scavenge 1204.4 (1438.0) -> 1190.7 (1441.0) MB, 7.0 / 0.0 ms (average mu = 0.097, current mu = 0.050) allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x3fa871e841bd]
Security context: 0xdf16c21e589 <JSObject>
1: peg$parsePrefix(aka peg$parsePrefix) [0xdf1a7e44a31] [/snapshot/project/garden-service/tmp/dist/build/template-string-parser.js:~1546] [pc=0x3fa871f4810d](this=0xdf1807022e1 <undefined>)
2: peg$parseNestedTemplateString(aka peg$parseNestedTemplateString) [0xdf1a7e446b1] [/snapshot/project/garden-service/tmp/dist/build/template-string-parser.js:~481...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: node::Abort() [/usr/local/bin/garden]
2: node::OnFatalError(char const*, char const*) [/usr/local/bin/garden]
3: v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/garden]
4: v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/bin/garden]
5: v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/bin/garden]
6: v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/bin/garden]
7: v8::internal::Heap::AllocateRawWithRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/usr/local/bin/garden]
8: v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/usr/local/bin/garden]
9: v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/garden]
10: 0x3fa871e841bd
11: 0x3fa871f4810d
12: 0x3fa871f62870
Abort trap: 6
Expected behavior
Either garden accepts this as a parameter, or validates to ensure the bad syntax fails early.
Reproducible example
brendan.fosberry$ cat garden.yml
module:
name: test
description: Test
type: container
env:
TEST_PARAM: "${local.env.FOO|| }" # it errors with and without quotes here
Workaround
I could use valid template strings
Suggested solution(s)
Validate for bad syntax in the string templating
Additional context
Seems like its some kind of recursive loop within the code, perhaps searching for something to fill the template with
Bug
When a bad template string is used it can cause a Javascript head out of memory error
Current Behavior
Using a template string without a fulfilled "OR" clause will cause an OOM:
Correct format would be something like
But if you pass in
This results in an OOM and stacktrace:
Expected behavior
Either garden accepts this as a parameter, or validates to ensure the bad syntax fails early.
Reproducible example
Workaround
I could use valid template strings
Suggested solution(s)
Validate for bad syntax in the string templating
Additional context
Seems like its some kind of recursive loop within the code, perhaps searching for something to fill the template with
Your environment
Running
garden dev
locally on OSXgarden version
0.9.11kubectl version
docker version