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

bug: Fatal JavaScript invalid size error #423

Open
jlarmstrongiv opened this issue Mar 26, 2024 · 1 comment
Open

bug: Fatal JavaScript invalid size error #423

jlarmstrongiv opened this issue Mar 26, 2024 · 1 comment

Comments

@jlarmstrongiv
Copy link

Describe the bug

A type of out of memory exception

#
# Fatal error in , line 0
# Fatal JavaScript invalid size error 169220804 (see crbug.com/1201626)
#
#
#
#FailureMessage Object: 0x16db74828
----- Native stack trace -----

 1: 0x1023b9340 node::NodePlatform::GetStackTracePrinter()::$_3::__invoke() [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
 2: 0x10343c9ac V8_Fatal(char const*, ...) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
 3: 0x10267d334 v8::internal::FactoryBase<v8::internal::Factory>::NewFixedArrayWithFiller(v8::internal::Handle<v8::internal::Map>, int, v8::internal::Handle<v8::internal::Oddball>, v8::internal::AllocationType) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
 4: 0x102820a00 v8::internal::(anonymous namespace)::ElementsAccessorBase<v8::internal::(anonymous namespace)::FastPackedObjectElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)2>>::GrowCapacity(v8::internal::Handle<v8::internal::JSObject>, unsigned int) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
 5: 0x102a64600 v8::internal::Runtime_GrowArrayElements(int, unsigned long*, v8::internal::Isolate*) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
 6: 0x102dd0c44 Builtins_CEntry_Return1_ArgvOnStack_NoBuiltinExit [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
 7: 0x108198918
 8: 0x1081b493c
 9: 0x1081aca1c
10: 0x1081a2000
11: 0x1081a7a2c
12: 0x1081ac604
13: 0x1081a68b0
14: 0x102d7f210 Builtins_AsyncFunctionAwaitResolveClosure [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
15: 0x102e2cfb8 Builtins_PromiseFulfillReactionJob [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
16: 0x102d6eb94 Builtins_RunMicrotasks [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
17: 0x102d463f4 Builtins_JSRunMicrotasksEntry [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
18: 0x10261c4d0 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
19: 0x10261c9bc v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
20: 0x10261cb98 v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate*, v8::internal::MicrotaskQueue*) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
21: 0x102643d64 v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
22: 0x102644500 v8::internal::MicrotaskQueue::PerformCheckpoint(v8::Isolate*) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
23: 0x102d49ef0 Builtins_CallApiCallback [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
24: 0x1081b74f0
25: 0x102d4650c Builtins_JSEntryTrampoline [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
26: 0x102d461f4 Builtins_JSEntry [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
27: 0x10261c4f8 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
28: 0x10261b944 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/user/.asdf/installs/nodejs/20.11.1/bin/node]
29: 0x1024f6214 v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
30: 0x102284d3c node::InternalCallbackScope::Close() [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
31: 0x10228501c node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
32: 0x10229b4b8 node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
33: 0x10235b00c node::fs::FSReqCallback::Resolve(v8::Local<v8::Value>) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
34: 0x10235bd54 node::fs::AfterInteger(uv_fs_s*) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
35: 0x1023504e8 node::MakeLibuvRequestCallback<uv_fs_s, void (*)(uv_fs_s*)>::Wrapper(uv_fs_s*) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
36: 0x102d2239c uv__work_done [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
37: 0x102d25dec uv__async_io [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
38: 0x102d37ec4 uv__io_poll [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
39: 0x102d263b0 uv_run [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
40: 0x102285754 node::SpinEventLoopInternal(node::Environment*) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
41: 0x102395c6c node::NodeMainInstance::Run(node::ExitCode*, node::Environment*) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
42: 0x102395a08 node::NodeMainInstance::Run() [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
43: 0x10231f718 node::Start(int, char**) [/Users/user/.asdf/installs/nodejs/20.11.1/bin/node]
44: 0x18038e0e0 start [/usr/lib/dyld]

To Reproduce

I went to implement #415 since the comment logic was fixed

However, when I switched over to it, I got the error above.

The full option list is:

const defaultParseOptions: ParseOptions = {
  bom: true,
  cast: true,
  columns: false,
  comment: "#",
  comment_no_infix: true,
  delimiter: "  ",
  escape: null,
  groupColumnsByName: false,
  quote: null,
  record_delimiter: ["\n", "\r", "\r\n"],
  relax_quotes: true,
  skip_empty_lines: true,
};

However, the only options I changed were enabling these two options:

  comment: "#",
  comment_no_infix: true,

Setup is similar to #415 (which uses streams in the sample), but you can use a larger file like allCountries.txt inside https://download.geonames.org/export/dump/allCountries.zip

Additional context

The only change I made was with those settings, so I assume the memory leak is there.

@wdavidw
Copy link
Member

wdavidw commented May 13, 2024

I imported your setup here. However, it seems to run fine form with a stable memory usage and reaching the end as expected. Can you review my configuration to make sure I understood your setup correctly ?

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

2 participants