Heap out of Memory error when using anyOf with more than 3 types
Issue #41
new
When using anyOf
with three slightly different schemas a heap out of memory error occurs.
This was tested with version 0.23.6
Node is version 16.14.0
A minimal spec to reproduce the error with is attached.
Error:
$ openapi-diff spec1.yaml spec1.yaml
<--- Last few GCs --->
[112022:0x54058f0] 26309 ms: Scavenge 4043.9 (4123.9) -> 4039.0 (4125.2) MB, 12.4 / 0.0 ms (average mu = 0.185, current mu = 0.130) allocation failure
[112022:0x54058f0] 26329 ms: Scavenge 4045.3 (4125.2) -> 4041.6 (4133.9) MB, 15.2 / 0.0 ms (average mu = 0.185, current mu = 0.130) allocation failure
[112022:0x54058f0] 30259 ms: Mark-sweep 4053.7 (4133.9) -> 4046.9 (4142.9) MB, 3923.7 / 0.0 ms (average mu = 0.103, current mu = 0.028) allocation failure scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0xb09980 node::Abort() [node]
2: 0xa1c235 node::FatalError(char const*, char const*) [node]
3: 0xcf77be v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xcf7b37 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xeaf3d5 [node]
6: 0xeafeb6 [node]
7: 0xebe3de [node]
8: 0xebee20 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
9: 0xec1d9e v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
10: 0xe832da v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
11: 0x11fc026 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x15f0a99 [node]
[1] 112022 IOT instruction (core dumped) openapi-diff spec1.yaml spec1.yaml
Comments (3)
-
-
reporter Unfortunately not. We have since switched to
openapi-diff
byOpenAPITools
: https://github.com/OpenAPITools/openapi-diff -
thanks. Sadly we cannot use it, as we are using it programmatically inside a Node.js app
- Log in to comment
We got the same error, do you have a workaround or a fix for it?