镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Segmentation fault: 11 on macOS #44219

Closed as not planned
Closed as not planned

Description

@adlerfaulkner

Version

v16.16.0

Platform

Locally:
macOS Monterey 12.4
Darwin 20.6.0

Reproduced in a github workflow:
macOS Big Sur 11
Darwin 20.?

Subsystem

No response

What steps will reproduce the bug?

I have a node application which uses the Components.js dependency injection framework. As soon as the call is made to instantiate my application (like this) I get a Segmentation fault: 11.

Full trace using the Segfault handler package:

PID 5340 received SIGSEGV for address: 0x18
0   segfault-handler.node               0x0000000106e3c0ba _ZL16segfault_handleriP9__siginfoPv + 298
1   libsystem_platform.dylib            0x00007ff8027e4dfd _sigtramp + 29
2   node                                0x00000001049ab124 _ZN2v88internal7SlotSet6InsertILNS0_10AccessModeE1EEEvm + 60
3   node                                0x0000000104955022 _ZN2v88internal7Isolate38RunHostImportModuleDynamicallyCallbackENS0_6HandleINS0_6ScriptEEENS2_INS0_6ObjectEEENS0_11MaybeHandleIS5_EE + 218
4   node                                0x0000000104c19ecf _ZN2v88internal25Runtime_DynamicImportCallEiPmPNS0_7IsolateE + 314
5   node                                0x0000000104eac5b4 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvInRegister_NoBuiltinExit + 52
6   node                                0x0000000104f3ae8e Builtins_CallRuntimeHandler + 78
7   node                                0x0000000104e3eeca Builtins_InterpreterEntryTrampoline + 202

I am also getting Segmentation fault: 11 when running a script with node ./dist/index.js that does not use Components.js.

I'm not sure what I should do to debug further.

This seems related to: #25424, #44211, or #43205?

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

Sometimes if I restart my computer it works.

What is the expected behavior?

No segmentation fault and the application doesn't crash

What do you see instead?

The application crashes

Additional information

No response

Activity

  1. adlerfaulkner commented on Aug 12, 2022

    @adlerfaulkner
    Author

    The problem seems to go away when I comment out imports of @comake/skql-js-engine (which I authored), but it's not clear to me why importing that causes a segmentation fault.

  2. mscdex commented on Aug 12, 2022

    @mscdex
    Contributor

    Perhaps "components.js" is monkey patching or messing with module loader internals in a way that's not compatible?

  3. adlerfaulkner commented on Aug 12, 2022

    @adlerfaulkner
    Author

    Yeah, not sure because I have other projects which use components.js that don't seg fault. What kinds of things would I look up to see if it's "messing with module loader internals"?

  4. adlerfaulkner commented on Aug 14, 2022

    @adlerfaulkner
    Author

    I was able to reproduce the error in a github workflow test of an application running my module @comake/skql-js-engine. Thus, this error does not have anything to do with Components.js as I thought previously.

    Here you can see the test fails on macos-latest (macOS Big Sur 11) but passes on ubuntu-latest:
    https://github.com/comake/skql-js-engine/runs/7830015283?check_suite_focus=true

    Here you can see the test fails on macos-12 (macOS Monterey 12) but passes on ubuntu-latest, windows-latest, and macos-latest:
    https://github.com/comake/skql-js-engine/runs/7830113462?check_suite_focus=true

    On a subsequent run of the tests it passes on all OSs (macos-latest, ubuntu-latest, windows-latest, and mac-12).
    https://github.com/comake/skql-js-engine/actions/runs/2857591843

    On my local machine running macOS Monterey 12.4 the error happens most times that the test is run but not 100% of the time.

    The test is run by npm run test:package which executes a bash script validate-package.sh. The script packs my module and installs it into an example application in ./test/deploy and runs a node script. The segmentation fault is produced by the execution of the node script.

  5. changed the title [-]Segmentation fault: 11[/-] [+]Segmentation fault: 11 on macOS[/+] on Aug 15, 2022
  6. bnoordhuis commented on May 7, 2023

    @bnoordhuis
    Member

    This issue is very likely a duplicate of #43205. I'll go ahead and close it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions