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]: Segmentation Fault when rendering Angular component with dynamic import. #14400

Closed
Bushuo opened this issue Aug 10, 2023 · 4 comments
Closed

Comments

@Bushuo
Copy link

Bushuo commented Aug 10, 2023

Version

29.6.2

Steps to reproduce

  1. Clone my repo at https://github.com/Bushuo/jest-segfault-repro
  2. run npm install
  3. run npm test
  4. test passes
  5. run npm test
  6. test crashes

Expected behavior

Passing the test.

Actual behavior

A segmentation fault happens.

Additional context

I managed to get a coredump and backtrace using llnode.
I guess the cause is a dynamic import in a library ngx-quill that we are using.

(llnode) v8 bt
 * thread #1: tid = 0x0000, 0x00000001025ade28 node`node::loader::ImportModuleDynamically(v8::Local<v8::Context>, v8::Local<v8::Data>, v8::Local<v8::Value>, v8::Local<v8::String>, v8::Local<v8::FixedArray>) + 592
  * frame #0: 0x00000001025ade28 node`node::loader::ImportModuleDynamically(v8::Local<v8::Context>, v8::Local<v8::Data>, v8::Local<v8::Value>, v8::Local<v8::String>, v8::Local<v8::FixedArray>) + 592
    frame #1: 0x0000000102883d90 node`v8::internal::Isolate::RunHostImportModuleDynamicallyCallback(v8::internal::Handle<v8::internal::Script>, v8::internal::Handle<v8::internal::Object>, v8::internal::MaybeHandle<v8::internal::Object>) + 852
    frame #2: 0x0000000102c65fdc node`v8::internal::Runtime_DynamicImportCall(int, unsigned long*, v8::internal::Isolate*) + 276
    frame #3: 0x0000000102fb12c4 <exit>
    frame #4: 0x00000001030461bc <stub>
    frame #5: 0x0000000102f3c198 (this=0xc32a09c5a39:<Object: no constructor>, <Smi: 0>) at /Users/paulb/Projects/work/segfault-test/node_modules/ngx-quill/fesm2020/ngx-quill.mjs:73:78 fn=0x00000c32a09e46e9
    frame #6: 0x0000000102f700d0 next(this=0xc32a09e4c31:<unknown>) at  fn=0x00000a190f8b8fe1
    frame #7: 0x0000000102f3c198 (this=0xa190f8a31d9:<Global proxy>, 0xc32a09e48f1:<function:  at /Users/paulb/Projects/work/segfault-test/node_modules/zone.js/bundles/zone-testing-bundle.umd.js:1188:33>, 0xc32a09e49c9:<function:  at /Users/paulb/Projects/work/segfault-test/node_modules/zone.js/bundles/zone-testing-bundle.umd.js:1188:33>, <Smi: 0>) at /Users/paulb/Projects/work/segfault-test/node_modules/ngx-quill/fesm2020/ngx-quill.mjs:26:22 fn=0x00000c32a09e4761
    frame #8: 0x0000000107e3174c ZoneAwarePromise(this=0xc32a09e4799:<Object: ZoneAwarePromise>, 0xc32a09e4761:<function:  at /Users/paulb/Projects/work/segfault-test/node_modules/ngx-quill/fesm2020/ngx-quill.mjs:26:22>, 0xc32a09e4799:<Object: ZoneAwarePromise>) at /Users/paulb/Projects/work/segfault-test/node_modules/zone.js/bundles/zone-testing-bundle.umd.js:1349:38 fn=0x000039e02018e689
(llnode)

Please note that I have no experience in debugging native code, but I hope this helps to get to the bottom of this issue :)

Environment

System:
  OS: macOS 13.5
  CPU: (8) arm64 Apple M1
Binaries:
  Node: 18.17.0 - ~/.nvm/versions/node/v18.17.0/bin/node
  npm: 9.6.7 - ~/.nvm/versions/node/v18.17.0/bin/npm
npmPackages:
  jest: 29.6.2 => 29.6.2

Also happens on Windows 10 with the same versions.
@jlbooker
Copy link

Likely duplicate of #11438. See also: nodejs/node#35889, and the associated V8 bug.

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Sep 14, 2023
@SimenB
Copy link
Member

SimenB commented Sep 15, 2023

Yeah, will be fixed by next node release

@SimenB SimenB closed this as completed Sep 15, 2023
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants