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

Core dump after huge hang on relatively small cast #66

Open
strazto opened this issue Sep 24, 2020 · 4 comments
Open

Core dump after huge hang on relatively small cast #66

strazto opened this issue Sep 24, 2020 · 4 comments

Comments

@strazto
Copy link

strazto commented Sep 24, 2020

When attempting to convert a relatively small cast demo.cast.txt, I got this:

Stack trace
 svg-term --in demo.cast --out demo.svg --width=104 --height=82

<--- Last few GCs --->

[55408:0x55a83c1e3250]   996781 ms: Mark-sweep 1560.5 (2027.7) -> 1560.4 (1965.7) MB, 1398.6 / 0.3 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 1540 ms) last resort GC in old space requested
[55408:0x55a83c1e3250]   998192 ms: Mark-sweep 1560.4 (1965.7) -> 1560.4 (1943.2) MB, 1410.8 / 0.0 ms  last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0xf3856698fe1 <JSObject>
    0: builtin exit frame: freeze(this=0xf3856698229 <JSFunction Object (sfi = 0xf3856698191)>,0x359fe6bffd31 <Object map = 0x124b4d504989>)

    1: createElement [/usr/lib/node_modules/svg-term-cli/node_modules/react/cjs/react.development.js:~727] [pc=0x3de9c3698345](this=0x194534d27c41 <Object map = 0x83fe79620d9>,type=0x30f593638731 <String[3]: use>,config=0x1773c4e13bc9 <Object map = 0x124b4d...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [svg-term]
 2: 0x55a83b478011 [svg-term]
 3: v8::Utils::ReportOOMFailure(char const*, bool) [svg-term]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [svg-term]
 5: v8::internal::Factory::NewMap(v8::internal::InstanceType, int, v8::internal::ElementsKind) [svg-term]
 6: v8::internal::Map::RawCopy(v8::internal::Handle<v8::internal::Map>, int) [svg-term]
 7: v8::internal::Map::CopyDropDescriptors(v8::internal::Handle<v8::internal::Map>) [svg-term]
 8: v8::internal::Map::CopyReplaceDescriptors(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::DescriptorArray>, v8::internal::Handle<v8::internal::LayoutDescriptor>, v8::internal::TransitionFlag, v8::internal::MaybeHandle<v8::internal::Name>, char const*, v8::internal::SimpleTransitionFlag) [svg-term]
 9: v8::internal::Map::Copy(v8::internal::Handle<v8::internal::Map>, char const*) [svg-term]
10: v8::Maybe<bool> v8::internal::JSObject::PreventExtensionsWithTransition<(v8::internal::PropertyAttributes)5>(v8::internal::Handle<v8::internal::JSObject>, v8::internal::Object::ShouldThrow) [svg-term]
11: v8::internal::JSReceiver::SetIntegrityLevel(v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::PropertyAttributes, v8::internal::Object::ShouldThrow) [svg-term]
12: 0x55a83ae2e02f [svg-term]
13: 0x3de9c34196dd
Aborted (core dumped)

Not sure what other diagnostic information I should provide, lmk.

I think I noticed someone else discussing node's memory limits, & that they can be increased, but I assume their default is a reasonable value, & my small cast really shouldn't be hitting that. My PC itself has 64GB.

The following works (taken from readme)

svg-term --cast=113643 --out parrot.svg
@strazto
Copy link
Author

strazto commented Sep 24, 2020

I find that it works reliably if I always convert using --cast with asciinema's UUID, so for now, it's okay to just upload them and use that

@pdevine
Copy link

pdevine commented Dec 6, 2020

I just ran into the same thing. Have 32 GB of RAM, but it seems like it's complaining about being out of heap memory with the error:
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

@Accacio
Copy link

Accacio commented Dec 10, 2020

Same here:

 <--- Last few GCs --->

[3566:0x55b8e2ce9260]   686477 ms: Mark-sweep 1837.5 (2382.2) -> 1837.4 (2329.2) MB, 1164.4 / 0.0 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 1165 ms) last resort GC in old space requested
[3566:0x55b8e2ce9260]   687668 ms: Mark-sweep 1837.4 (2329.2) -> 1837.4 (2309.7) MB, 1191.2 / 0.1 ms  last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x2da95dc18fe1 <JSObject>
    1: new constructor [/usr/local/lib/node_modules/svg-term-cli/node_modules/load-asciicast/index.js:~901] [pc=0x17132b1f0ffd](this=0x104482b2f959 <JSObject>,a=0x2da95dc02211 <null>,b=0x2c29369ce439 <String[13]: new-line-mode>,c=0x2c29369ce439 <String[13]: new-line-mode>,d=1467504785)
    4: cljs$core$IAssociative$_assoc$arity$3 [/usr/local/lib/node_modules/svg-term-cli/node_modules/load-asciic...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [svg-term]
 2: 0x55b8e147e011 [svg-term]
 3: v8::Utils::ReportOOMFailure(char const*, bool) [svg-term]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [svg-term]
 5: v8::internal::Factory::NewCode(v8::internal::CodeDesc const&, unsigned int, v8::internal::Handle<v8::internal::Object>, bool, int) [svg-term]
 6: v8::internal::CodeGenerator::MakeCodeEpilogue(v8::internal::TurboAssembler*, v8::internal::EhFrameWriter*, v8::internal::CompilationInfo*, v8::internal::Handle<v8::internal::Object>) [svg-term]
 7: v8::internal::compiler::CodeGenerator::FinalizeCode() [svg-term]
 8: v8::internal::compiler::PipelineImpl::FinalizeCode() [svg-term]
 9: v8::internal::compiler::PipelineCompilationJob::FinalizeJobImpl() [svg-term]
10: v8::internal::CompilationJob::FinalizeJob() [svg-term]
11: v8::internal::Compiler::FinalizeCompilationJob(v8::internal::CompilationJob*) [svg-term]
12: v8::internal::OptimizingCompileDispatcher::InstallOptimizedFunctions() [svg-term]
13: v8::internal::StackGuard::HandleInterrupts() [svg-term]
14: v8::internal::Runtime_StackGuard(int, v8::internal::Object**, v8::internal::Isolate*) [svg-term]
15: 0x17132b0840bd
[1]    3566 abort (core dumped)  svg-term --cast 375764 --out controlled.svg --width=80 --height=25

@pdevine
Copy link

pdevine commented Dec 10, 2020

I noticed I was able to work around this by using OSX instead of Linux on the exact same asciinema cast. I tried changing the heap size in Linux but still ran into the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants