Skip to content

SEA tests run into SIGSEGV during SEA execution #50740

Description

@joyeecheung

From the latest reliability report, it seems many of the SEA tests are running into SIGSEGV on Windows/macOS/RHEL when executing the generated SEA.

nodejs/reliability#718

Some ideas about investigating into the flakes:

  1. Use spawnSyncAndExitWithoutError() for better output
  2. Use NODE_DEBUG_NATIVE=SEA to log the deserialization
  3. Log onto the machines to check out what's going on

cc @nodejs/single-executable

Activity

  1. added
    single-executableIssues and PRs related to single-executable applications.
    flaky-testIssues and PRs involving tests that fail intermittently in CI.
    on Nov 15, 2023
  2. richardlau commented on Nov 16, 2023

    @richardlau
    Member

    Crashed on GHA too on main: https://github.com/nodejs/node/actions/runs/6892307239

    test-linux: test/sequential/test-single-executable-application-snapshot-and-code-cache.js#L64
    --- stderr ---
    [process 207047]: --- stderr ---
    
    [process 207047]: --- stdout ---
    
    [process 207047]: status = null, signal = SIGSEGV
    /home/runner/work/node/node/test/common/child_process.js:86
        throw new Error(`${failures.join('\n')}`);
        ^
    
    Error: - process terminated with status null, expected 0
    - process terminated with signal SIGSEGV, expected null
        at logAndThrow (/home/runner/work/node/node/test/common/child_process.js:86:11)
        at expectSyncExit (/home/runner/work/node/node/test/common/child_process.js:91:5)
        at spawnSyncAndExitWithoutError (/home/runner/work/node/node/test/common/child_process.js:125:10)
        at Object.<anonymous> (/home/runner/work/node/node/test/sequential/test-single-executable-application-snapshot-and-code-cache.js:64:3)
        at Module._compile (node:internal/modules/cjs/loader:1376:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
        at Module.load (node:internal/modules/cjs/loader:1207:32)
        at Module._load (node:internal/modules/cjs/loader:1023:12)
        at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
        at node:internal/main/run_main_module:28:49
    
    Node.js v22.0.0-pre
    Command: out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /home/runner/work/node/node/test/sequential/test-single-executable-application-snapshot-and-code-cache.js
  3. joyeecheung commented on Nov 16, 2023

    @joyeecheung
    MemberAuthor

    Not sure if this is the same as the "all failed on PPC" that we are seeing. I'll open another PR to at least log some stuff.

    Seperately it would be great if we can install a built-in SIGSEGV handler to dump the stack trace..

  4. 7 remaining items

  5. reopened this on Mar 14, 2024
  6. targos commented on Mar 14, 2024

    @targos
    Member

    Still happening: https://ci.nodejs.org/job/node-test-commit-linux-containered/42065/nodes=ubuntu2204_sharedlibs_withoutintl_x64/console

    12:42:11 not ok 4088 sequential/test-single-executable-application-snapshot-and-code-cache
    12:42:11   ---
    12:42:11   duration_ms: 8854.83400
    12:42:11   severity: fail
    12:42:11   exitcode: 1
    12:42:11   stack: |-
    12:42:11     Copied /home/iojs/build/workspace/node-test-commit-linux-containered/out/Release/node to /home/iojs/node-tmp/.tmp.4087/sea
    12:42:11     Injected /home/iojs/node-tmp/.tmp.4087/sea-prep.blob into /home/iojs/node-tmp/.tmp.4087/sea
    12:42:11     [process 1363650]: --- stderr ---
    12:42:11     Found SEA blob 0x556134220080, size=4308861
    12:42:11     Found SEA resource 0x556134220080, size=4308861
    12:42:11     Read<uint32_t>()(4-byte), count=1: { 21223968 }, read 4 bytes
    12:42:11     Read SEA magic 143da20
    12:42:11     Read<uint32_t>()(4-byte), count=1: { 6 }, read 4 bytes
    12:42:11     Read SEA flags 6
    12:42:11     Read<uint64_t>()(8-byte), count=1: { 11 }, read 8 bytes
    12:42:11     ReadStringView(), length=11: 0x556134220090, read 11 bytes, content: snapshot.js
    12:42:11     Read SEA code path 0x556134220090, size=11
    12:42:11     Read<uint64_t>()(8-byte), count=1: { 4308826 }, read 8 bytes
    12:42:11     ReadStringView(), length=4308826: 0x5561342200a3, read 4308826 bytes
    12:42:11     Read SEA resource snapshot 0x5561342200a3, size=4308826
    12:42:11     Read<uint64_t>()(8-byte), count=1: 
    12:42:11     [process 1363650]: --- stdout ---
    12:42:11     
    12:42:11     [process 1363650]: status = null, signal = SIGSEGV
    12:42:11     /home/iojs/build/workspace/node-test-commit-linux-containered/test/common/child_process.js:86
    12:42:11         throw new Error(`${failures.join('\n')}`);
    12:42:11         ^
    12:42:11     
    12:42:11     Error: - process terminated with status null, expected 0
    12:42:11     - process terminated with signal SIGSEGV, expected null
    12:42:11         at logAndThrow (/home/iojs/build/workspace/node-test-commit-linux-containered/test/common/child_process.js:86:11)
    12:42:11         at expectSyncExit (/home/iojs/build/workspace/node-test-commit-linux-containered/test/common/child_process.js:91:5)
    12:42:11         at spawnSyncAndExitWithoutError (/home/iojs/build/workspace/node-test-commit-linux-containered/test/common/child_process.js:125:10)
    12:42:11         at Object.<anonymous> (/home/iojs/build/workspace/node-test-commit-linux-containered/test/sequential/test-single-executable-application-snapshot-and-code-cache.js:67:3)
    12:42:11         at Module._compile (node:internal/modules/cjs/loader:1357:14)
    12:42:11         at Module._extensions..js (node:internal/modules/cjs/loader:1415:10)
    12:42:11         at Module.load (node:internal/modules/cjs/loader:1207:32)
    12:42:11         at Module._load (node:internal/modules/cjs/loader:1023:12)
    12:42:11         at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:177:12)
    12:42:11         at node:internal/main/run_main_module:28:49
    12:42:11     
    12:42:11     Node.js v22.0.0-pre
    
  7. joyeecheung commented on Jul 30, 2024

    @joyeecheung
    MemberAuthor

    I figured out the cause of the crash and opened #54120

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

    flaky-testIssues and PRs involving tests that fail intermittently in CI.single-executableIssues and PRs related to single-executable applications.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions