-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
OOME new in Deno 1.44 #24057
Comments
Can you share the program that is crashing? |
Sure, here is the bash script and program. This is runs on MacOS M2 with 64BG. Has been running well for all versions up to 1.44 |
There is a lot of trading data that I can't share. The problem arises when there is heavy usage on MacOS. |
Without a reproduction we can run, we can unfortunately not fix this or determine what the root cause is. When running in versions prior to 1.44, was this program consuming more than 4GB of RAM? |
Yes, it's configured to use 8gb and have 24 workers. I'll see if I can make a shareable example. The OOME occurs very quickly, hopefully I can create a simple example |
Can we have a flag to prevent point compression? Large JSON files in workers no longer work since v1.44 ( I'm stuck on 1.43.6) |
Deno version v1.45.5 fails with OOME, and all versions before 1.44 seem to work OK. Please see attached [Uploading bug-24057v2.zip…]()
#
# Fatal JavaScript out of memory: MarkCompactCollector: young object promotion failed
#
==== C stack trace ===============================
<--- Last few GCs --->
[42428:0x140120000] 286 ms: Scavenge 208.4 (219.9) -> 208.4 (219.9) MB, pooled: 0 MB, 0.62 / 0.00 ms (average mu = 1.000, current mu = 1.000) task;
[42428:0x140120000] 300 ms: Scavenge 208.4 (219.9) -> 208.4 (222.9) MB, pooled: 0 MB, 13.12 / 0.00 ms (average mu = 1.000, current mu = 1.000) allocation failure;
[42428:0x140120000] 313 ms: Scavenge 208.4 (222.9) -> 208.4 (222.9) MB, pooled: 0 MB, 12.83 / 0.00 ms (average mu = 1.000, current mu = 1.000) allocation failure;
<--- JS stacktrace --->
#
# Fatal JavaScript out of memory: MarkCompactCollector: young object promotion failed
#
==== C stack trace ===============================
0 deno 0x0000000105967ecc v8::base::debug::StackTrace::StackTrace() + 24
0 deno 0x0000000105967ecc v8::base::debug::StackTrace::StackTrace() + 24
1 deno 0x000000010596d714 v8::platform::(anonymous namespace)::PrintStackTrace() + 240 deno 0x0000000105967ecc v8::base::debug::StackTrace::StackTrace() + 24
1 deno 0x000000010596d714 v8::platform::(anonymous namespace)::PrintStackTrace() + 24 2 deno 0x0000000105964f84 v8::base::FatalOOM(v8::base::OOMType, char const*) + 68
2 deno 0x0000000105964f84 v8::base::FatalOOM(v8::base::OOMType, char const*) + 68
3 deno 0x00000001059b3a40 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) + 628 3 deno 0x00000001059b3a40 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) + 628
1 deno 0x000000010596d714 v8::platform::(anonymous namespace)::PrintStackTrace() + 24
4 deno 0x0000000105b7a284 v8::internal::Heap::stack() + 04 deno 0x0000000105b7a284 v8::internal::Heap::stack() + 0
2 deno 0x0000000105964f84 v8::base::FatalOOM(v8::base::OOMType, char const*) + 68
3 deno 0x00000001059b3a40 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) + 628
5 deno 0x0000000105bab374 void v8::internal::LiveObjectVisitor::VisitMarkedObjectsNoFail<v8::internal::EvacuateNewSpaceVisitor>(v8::internal::PageMetadata*, v8::internal::EvacuateNewSpaceVisitor*) + 10485 deno 0x0000000105bab374 void v8::internal::LiveObjectVisitor::VisitMarkedObjectsNoFail<v8::internal::EvacuateNewSpaceVisitor>(v8::internal::PageMetadata*, v8::internal::EvacuateNewSpaceVisitor*) + 1048
4 deno 0x0000000105b7a284 v8::internal::Heap::stack() + 0
6 deno 0x0000000105baac98 v8::internal::Evacuator::RawEvacuatePage(v8::internal::MutablePageMetadata*) + 384
7 deno 0x0000000105baa9f0 v8::internal::Evacuator::EvacuatePage(v8::internal::MutablePageMetadata*) + 328 5 deno 0x0000000105bab374 void v8::internal::LiveObjectVisitor::VisitMarkedObjectsNoFail<v8::internal::EvacuateNewSpaceVisitor>(v8::internal::PageMetadata*, v8::internal::EvacuateNewSpaceVisitor*) + 10486 deno 0x0000000105baac98 v8::internal::Evacuator::RawEvacuatePage(v8::internal::MutablePageMetadata*) + 384
6 deno 0x0000000105baac98 v8::internal::Evacuator::RawEvacuatePage(v8::internal::MutablePageMetadata*) + 3847 deno 0x0000000105baa9f0 v8::internal::Evacuator::EvacuatePage(v8::internal::MutablePageMetadata*) + 328
8 deno 0x0000000105bb9fb8 v8::internal::PageEvacuationJob::Run(v8::JobDelegate*) + 844
8 deno 0x0000000105bb9fb8 v8::internal::PageEvacuationJob::Run(v8::JobDelegate*) + 844
7 deno 0x0000000105baa9f0 v8::internal::Evacuator::EvacuatePage(v8::internal::MutablePageMetadata*) + 3289 deno 0x0000000105969634 v8::platform::DefaultJobWorker::Run() + 216
9 deno 0x0000000105969634 v8::platform::DefaultJobWorker::Run() + 216
8 deno 0x0000000105bb9fb8 v8::internal::PageEvacuationJob::Run(v8::JobDelegate*) + 84410 deno 0x000000010596ebfc v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() + 160
9 deno 0x0000000105969634 v8::platform::DefaultJobWorker::Run() + 21611 deno 0x0000000105967d6c v8::base::ThreadEntry(void*) + 160
12 libsystem_pthread.dylib 0x0000000187d15f94 _pthread_start + 13610 deno 0x000000010596ebfc v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() + 160
13 libsystem_pthread.dylib 0x0000000187d10d34 thread_start + 8
10 deno 0x000000010596ebfc v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() + 16011 deno 0x0000000105967d6c v8::base::ThreadEntry(void*) + 160
12 libsystem_pthread.dylib 0x0000000187d15f94 _pthread_start + 136
11 deno 0x0000000105967d6c v8::base::ThreadEntry(void*) + 16013 libsystem_pthread.dylib 0x0000000187d10d34 thread_start + 8
12 libsystem_pthread.dylib 0x0000000187d15f94 _pthread_start + 136
13 libsystem_pthread.dylib 0x0000000187d10d34 thread_start + 8
run.sh: line 9: 42428 Trace/BPT trap: 5 deno run --v8-flags=--max-old-space-size=8192 --allow-read --allow-write --allow-net src/Process.ts |
No, pointer compressions is a build option, it can't be configured during runtime. Can you provide a reproduction code that shows the problem? It's very strange that V8 would crash with only ~230Mb heap, are you running in a memory constrained environment? Have you tried tweaking the heap size using |
An example of the crashing code was uploaded in the previous comment. It's a cut down of the production code and simulates the generation of the market data. In the run.sh file in the above zip file you can see that I've set the max heap to 8gb ( the maximum that I could set ) See the |
Are the worker processors not getting the v8 flags anymore? I'm getting a lot of OOME issues wherever I've used workers too many to work around so I've locked the version of demo to the last working version. |
@lucacasonato > Code to reproduce |
Can confirm, with the provided reproduction I get the described OOM in |
@devsnek is currently investigating this issue, we might have to reach out to V8 team to better understand the limitations here. |
@nleck in the short term if you want to, could you try building deno from source with these env vars and see if it fixes your issue? it will probably take 20-40m to build.
|
FYI I Just tried v1.46.1, and it gets the same error. |
The problem seems to have been fixed in 1.46.2 :-) Thank you so much for fixing this; I appreciate it. |
Version: Deno 1.44.0
Applications that have been running on 1.43.x now crashes consistently with OOME.
Code to reproduce
<--- Last few GCs --->
[2262:0x140040000] 2931 ms: Mark-Compact (reduce) 1398.8 (1400.6) -> 1398.8 (1401.1) MB, pooled: 0 MB, 71.67 / 0.00 ms (+ 0.5 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 96 ms) (average mu = 0.772, curre[2262:0x140040000] 3040 ms: Mark-Compact 1399.8 (1401.1) -> 1399.8 (1405.1) MB, pooled: 0 MB, 106.62 / 0.00 ms (average mu = 0.533, current mu = 0.020) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
Fatal JavaScript out of memory: Reached heap limit
==== C stack trace ===============================
The text was updated successfully, but these errors were encountered: