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

Node 14, 16 (Ubuntu) crash with --experimental-vm-modules if require and import are used in the same test file #39330

Closed
connorjclark opened this issue Jul 9, 2021 · 1 comment
Labels
vm Issues and PRs related to the vm subsystem.

Comments

@connorjclark
Copy link

connorjclark commented Jul 9, 2021

Version

14.17.1, 16.4.2

Platform

Ubuntu 20.04.2 LTS

Subsystem

vm

What steps will reproduce the bug?

Full details: GoogleChrome/lighthouse#12702 (comment)

  • Use both require and import in a jest test file
  • Have a good number (~10-20+) of other test files (make things busy)
  • Run tests with node --experimental-vm-modules ./node_modules/jest/bin/jest.js

How often does it reproduce? Is there a required condition?

~100% given enough tests are run / there is enough load on the machine

What is the expected behavior?

No crash.

What do you see instead?

Crash.

[
   "/home/runner/work/lighthouse/lighthouse/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x3785) [0x7fbe3cdf2785]",
   "/lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0) [0x7fbe410063c0]",
   "/opt/hostedtoolcache/node/14.17.1/x64/bin/node() [0x964366]",
   "/opt/hostedtoolcache/node/14.17.1/x64/bin/node(_ZN2v88internal7Isolate38RunHostImportModuleDynamicallyCallbackENS0_6HandleINS0_6ScriptEEENS2_INS0_6ObjectEEE+0x78) [0xcfdb48]",
   "/opt/hostedtoolcache/node/14.17.1/x64/bin/node(_ZN2v88internal25Runtime_DynamicImportCallEiPmPNS0_7IsolateE+0xaf) [0x1089b0f]",
   "/opt/hostedtoolcache/node/14.17.1/x64/bin/node() [0x1427254]"
]

example failure: https://github.com/GoogleChrome/lighthouse/runs/3025648367?check_suite_focus=true

Additional information

The crash only seems to happen when enough other tests are running. For the same set of tests, I noticed a big difference in crash rate at different times of the day. Given I'm running this on remote GitHub Action machines, and libpthread is the source of the crash, I assume the crash is caused by errant multithreading and is dependent on machine load.

I was never able to repro this locally on my Mac, Windows, or Debian machine. I do not have access to Ubuntu (besides via GHA).

@connorjclark
Copy link
Author

This seems to be the same issue as #35889 (same segfault stacktrace). That issue has a better repro and more details, so this issue can probably be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vm Issues and PRs related to the vm subsystem.
Projects
None yet
Development

No branches or pull requests

2 participants