API crashes if groupBy URL paramater is absent
See original GitHub issuePreflight Checklist
- I have read the Contributing Guidelines for this project.
- I have searched the issue tracker for an issue that matches the one I want to file, without success.
Issue Details
- Operating System:
ProductName: macOS ProductVersion: 12.5.1 BuildVersion: 21G83
- Browser:
- N/A
Expected Behavior
The absence of groupBy
parameter in /footprint
API leads to memory problem resulting in crash of the application.
Actual Behavior
Application crashes.
To Reproduce
Start the application locally with yarn start
curl -v 'localhost:4000/api/footprint?start=2022-09-10&end=2022-09-11&ignoreCache=true&groupBy='
Screenshots
Stack trace:
[1] 2022-09-14T14:39:02.466Z [api] info: Footprint API request started.
[1] 2022-09-14T14:39:02.467Z [api] warn: GroupBy parameter not specified. This will be required in the future.
[1] 2022-09-14T14:39:02.467Z [Cache] info: Ignoring cache...
[1]
[1] <--- Last few GCs --->
[1]
[1] [48078:0x148038000] 278051 ms: Mark-sweep 4052.8 (4138.7) -> 4040.2 (4142.2) MB, 3643.1 / 0.0 ms (average mu = 0.126, current mu = 0.017) allocation failure; scavenge might not succeed
[1] [48078:0x148038000] 283569 ms: Mark-sweep 4052.5 (4144.0) -> 4044.1 (4146.2) MB, 4604.2 / 0.0 ms (average mu = 0.150, current mu = 0.166) allocation failure; GC in old space requested
[1]
[1]
[1] <--- JS stacktrace --->
[1]
[1] FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
[1] 1: 0x10255f938 node::Abort() [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 2: 0x10255fac0 node::errors::TryCatchScope::~TryCatchScope() [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 3: 0x1026b1944 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 4: 0x10285c498 v8::internal::EmbedderStackStateScope::EmbedderStackStateScope(v8::internal::Heap*, v8::internal::EmbedderStackStateScope::Origin, cppgc::EmbedderStackState) [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 5: 0x10285af7c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 6: 0x10284f224 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 7: 0x10284fa54 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 8: 0x102835888 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 9: 0x102bc59f8 v8::internal::Runtime_AllocateInOldGeneration(int, unsigned long*, v8::internal::Isolate*) [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 10: 0x102f1102c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 11: 0x107794194
[1] 12: 0x1077d0200
[1] 13: 0x1077958f8
[1] 14: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 15: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 16: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 17: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 18: 0x102f5ab28 Builtins_PromiseConstructor [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 19: 0x102e99914 Builtins_JSBuiltinsConstructStub [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 20: 0x102fa6b38 Builtins_ConstructHandler [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 21: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 22: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 23: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 24: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 25: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 26: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 27: 0x102f5ab28 Builtins_PromiseConstructor [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 28: 0x102e99914 Builtins_JSBuiltinsConstructStub [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 29: 0x102fa6b38 Builtins_ConstructHandler [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 30: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 31: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 32: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 33: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 34: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 35: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 36: 0x102f5ab28 Builtins_PromiseConstructor [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 37: 0x102e99914 Builtins_JSBuiltinsConstructStub [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 38: 0x102fa6b38 Builtins_ConstructHandler [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 39: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 40: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 41: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 42: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 43: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 44: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 45: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 46: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 47: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 48: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 49: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 50: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 51: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 52: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 53: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 54: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 55: 0x1076d1e34
[1] 56: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 57: 0x1076d1df8
[1] 58: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 59: 0x1076d1df8
[1] 60: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 61: 0x1076d1df8
[1] 62: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 63: 0x1076d1df8
[1] 64: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 65: 0x1076d1df8
[1] 66: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 67: 0x1076d1df8
[1] 68: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 69: 0x1076d1df8
[1] 70: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 71: 0x1076d1df8
[1] 72: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 73: 0x1076d1df8
[1] 74: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 75: 0x1076d1df8
[1] 76: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 77: 0x1076d1df8
[1] 78: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 79: 0x1076d1df8
[1] 80: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 81: 0x1076d1df8
[1] 82: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 83: 0x1076d1df8
[1] 84: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 85: 0x1076d1df8
[1] 86: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 87: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 88: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 89: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 90: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 91: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 92: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 93: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 94: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 95: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 96: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 97: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 98: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 99: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 100: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 101: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 102: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 103: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 104: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 105: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 106: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 107: 0x1077485bc
[1] 108: 0x107709c70
[1] 109: 0x102e9c198 Builtins_InterpreterEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 110: 0x107749b90
[1] 111: 0x102e9a4d0 Builtins_JSEntryTrampoline [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 112: 0x102e9a164 Builtins_JSEntry [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 113: 0x1027ddd68 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 114: 0x1027dd29c v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 115: 0x1026cd884 v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 116: 0x10257b960 node::(anonymous namespace)::Parser::Proxy<int (node::(anonymous namespace)::Parser::*)(), &(node::(anonymous namespace)::Parser::on_headers_complete())>::Raw(llhttp__internal_s*) [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 117: 0x103385ed0 llhttp__internal__run [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 118: 0x103382364 llhttp__internal_execute [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 119: 0x10257a6b4 node::(anonymous namespace)::Parser::Execute(char const*, unsigned long) [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 120: 0x10257a508 node::(anonymous namespace)::Parser::OnStreamRead(long, uv_buf_t const&) [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 121: 0x1026100d4 node::LibuvStreamWrap::OnUvRead(long, uv_buf_t const*) [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 122: 0x102e87080 uv__stream_io [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 123: 0x102e8f1b4 uv__io_poll [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 124: 0x102e7d8cc uv_run [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 125: 0x1024adccc node::SpinEventLoop(node::Environment*) [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 126: 0x10259a060 node::NodeMainInstance::Run(int*, node::Environment*) [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 127: 0x102599d38 node::NodeMainInstance::Run() [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 128: 0x102532944 node::Start(int, char**) [/Users/mvaltas/.nodenv/versions/18.4.0/bin/node]
[1] 129: 0x1074cd08c
[1] yarn start-api exited with code 0
© 2021 Thoughtworks, Inc.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Azure Function crashes upon missing url query - Stack Overflow
returns an empty object. The issue is when I don´t provide the hub parameter in the URL the function crashes. https://<my-function-url>?code ...
Read more >Crash if missing parameter in non-tty environment without ...
If a parameter is missing when doing a resource group template deploy, az attempts to prompt, but crashes upon finding it's not in...
Read more >Crash when clicking "create node" on the nodes tab - Drupal
So when I am on. //mysite/group/1/nodes. and I click on either of the two buttons "relate node" or "create node" I get the...
Read more >Synchronize x-data and the URL in Alpine.js with the location ...
In a URL-driven application, if an error occurs and causes the application to crash, the user can refresh and come back to a...
Read more >Crashes - Android Developers
An app that is written using Java or Kotlin crashes if it throws an unhandled exception, represented by the Throwable class.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
My mistake @cc-ray-boutotte , the
REACT_APP_GROUP_BY
is the way to set thegroupBy
, which will be sent to the backend API. I had in mind the backend API only.Since the API will now work without the
groupBy
parameter, not settingREACT_APP_GROUP_BY
on the client should default togroupBy=day
; if you want to use different groups, you will the to set theREAC_APP_GROUP_BY
env variable.The client (sample react app) was not sending the groupBy URL parameter. Setting
REACT_APP_GROUP_BY
made the client send this groupBy parameter, thus preventing/bypassing the issue seen above. Understand that setting is not intended for this, but it did bypass the issue at the time.Was there a default groupBy param before? What was it?
My only concern is that if the issue was not providing the groupBy URL param, then same issue will happen since client does not provide this thru default implementation. Where in the client app can you set the groupBy setting that gets passed to the API?