Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of memory crash #290

Closed
lilleyse opened this issue Nov 7, 2023 · 1 comment · Fixed by #291
Closed

Out of memory crash #290

lilleyse opened this issue Nov 7, 2023 · 1 comment · Fixed by #291
Labels

Comments

@lilleyse
Copy link
Contributor

lilleyse commented Nov 7, 2023

I was validating a model in CesiumGS/gltf-pipeline#647 and got an out of memory crash.

npx ts-node src/main.ts --tileContentFile 1.glb

1.glb.zip

(base) slilley@Hydrogen:~/Code/3d-tiles-validator$ npx ts-node src/main.ts --tileContentFile ~/Downloads/t13/1.glb 
Validating tile content /home/slilley/Downloads/t13/1.glb

<--- Last few GCs --->

[7990:0x5ab07f0]    37447 ms: Scavenge 4035.8 (4114.4) -> 4033.8 (4117.9) MB, 15.6 / 0.0 ms  (average mu = 0.298, current mu = 0.189) allocation failure 
[7990:0x5ab07f0]    37474 ms: Scavenge 4039.1 (4117.9) -> 4036.7 (4135.7) MB, 20.2 / 0.0 ms  (average mu = 0.298, current mu = 0.189) allocation failure 
[7990:0x5ab07f0]    39087 ms: Mark-sweep 4049.2 (4135.7) -> 4042.1 (4145.4) MB, 1592.3 / 0.0 ms  (average mu = 0.258, current mu = 0.185) allocation failure scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb09c10 node::Abort() [node]
 2: 0xa1c193 node::FatalError(char const*, char const*) [node]
 3: 0xcf8dbe v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xcf9137 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xeb09d5  [node]
 6: 0xec069d v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 7: 0xec339e v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 8: 0xe84612 v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
 9: 0xe7ef2c v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawArray(int, v8::internal::AllocationType) [node]
10: 0xe7f005 v8::internal::FactoryBase<v8::internal::Factory>::NewFixedArrayWithFiller(v8::internal::Handle<v8::internal::Map>, int, v8::internal::Handle<v8::internal::Oddball>, v8::internal::AllocationType) [node]
11: 0x10e23c3 v8::internal::Handle<v8::internal::NameDictionary> v8::internal::HashTable<v8::internal::NameDictionary, v8::internal::NameDictionaryShape>::NewInternal<v8::internal::Isolate>(v8::internal::Isolate*, int, v8::internal::AllocationType) [node]
12: 0x10e26b3 v8::internal::Handle<v8::internal::NameDictionary> v8::internal::HashTable<v8::internal::NameDictionary, v8::internal::NameDictionaryShape>::EnsureCapacity<v8::internal::Isolate>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::NameDictionary>, int, v8::internal::AllocationType) [node]
13: 0x10e2716 v8::internal::Handle<v8::internal::NameDictionary> v8::internal::Dictionary<v8::internal::NameDictionary, v8::internal::NameDictionaryShape>::Add<v8::internal::Isolate>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::NameDictionary>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyDetails, v8::internal::InternalIndex*) [node]
14: 0x10e2d7a v8::internal::BaseNameDictionary<v8::internal::NameDictionary, v8::internal::NameDictionaryShape>::Add(v8::internal::Isolate*, v8::internal::Handle<v8::internal::NameDictionary>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyDetails, v8::internal::InternalIndex*) [node]
15: 0x1206a8a v8::internal::Runtime_AddDictionaryProperty(int, unsigned long*, v8::internal::Isolate*) [node]
16: 0x15f2099  [node]
Aborted (core dumped)

The regular glTF validator web interface seems to work ok.

@lilleyse lilleyse added the bug label Nov 7, 2023
@javagl
Copy link
Contributor

javagl commented Nov 8, 2023

Um...

Cesium Validation Over 9000

There are roughly six million (!) errors in this file, so... this is not necessarily toooo surprising.

It is possible to limit the number of issues that are reported by the glTF validator (via ValidationOptions maxIssues). I'll try this out (maybe ... with 100? Or 1000? Or 10000?), but this is still for each glTF asset. If 1000 of them are combined in one tileset, there will be memory pressure for the report, eventually....

@javagl javagl transferred this issue from CesiumGS/3d-tiles-tools Nov 8, 2023
@javagl javagl linked a pull request Nov 9, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants