Skip to content

Investigate flaky async-hooks.test-improper-unwind #58463

Description

@RaisinTen

Test

test/async-hooks/test-improper-unwind.js

Platform

AIX

Console output

---
duration_ms: 362.309
exitcode: 1
severity: fail
stack: |-
  node:assert:94
    throw new AssertionError(obj);
    ^

  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:

  null !== 1

      at ChildProcess.<anonymous> (/home/iojs/build/workspace/node-test-commit-aix/nodes/aix72-ppc64/test/async-hooks/test-improper-unwind.js:59:12)
      at ChildProcess.<anonymous> (/home/iojs/build/workspace/node-test-commit-aix/nodes/aix72-ppc64/test/common/index.js:437:15)
      at ChildProcess.emit (node:events:507:28)
      at maybeClose (node:internal/child_process:1101:16)
      at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: null,
    expected: 1,
    operator: 'strictEqual'
  }

  Node.js v25.0.0-pre
...

Build links

Additional information

No response

Activity

  1. added
    flaky-testIssues and PRs involving tests that fail intermittently in CI.
    on May 26, 2025
  2. added
    aixIssues and PRs related to the AIX platform.
    on May 26, 2025
  3. RaisinTen commented on May 27, 2025

    @RaisinTen
    MemberAuthor

    cc @nodejs/async_hooks

  4. Flarna commented on May 27, 2025

    @Flarna
    Member

    This doesn't look like it is related to async hooks.
    A child process is spawned but the close event of child process doesn't provide the exit code.
    Could be also some issue in child process on aix or some temp resource limitation that child process couldn't be started. properly.

  5. added
    child_processIssues and PRs related to the child_process subsystem.
    async_hooksIssues and PRs related to the async hooks subsystem.
    on May 27, 2025
  6. RaisinTen commented on May 27, 2025

    @RaisinTen
    MemberAuthor

    The child_process implementation in

    this.signalCode = null;
    this.exitCode = null;
    this.killed = false;
    this.spawnfile = null;
    this._handle = new Process();
    this._handle[owner_symbol] = this;
    this._handle.onexit = (exitCode, signalCode) => {
    if (signalCode) {
    this.signalCode = signalCode;
    } else {
    this.exitCode = exitCode;
    }
    shows that initially the signalCode and exitCode properties on the child process object are both set to null.

    On exit:

    • if signalCode is truthy
      • just the signalCode property is set with the new value
      • and the exitCode property remains null
    • otherwise
      • just the exitCode property is set with the new value
      • and the signalCode property remains null

    The child process is getting killed with a signal, that's why the 'close' callback is called with a null code and a truthy signal (we don't know what value this holds because it's not being logged). I think the test should log the signal and continue the assertions for now.

  7. RaisinTen commented on May 27, 2025

    @RaisinTen
    MemberAuthor

    Submitted a PR: #58478

  8. RaisinTen commented on May 28, 2025

    @RaisinTen
    MemberAuthor

    I have also created a PR to update the child process docs with this info - #58479

  9. RaisinTen commented on Jun 3, 2025

    @RaisinTen
    MemberAuthor

    I can confirm that #58478 has fixed this issue.

    This flake was appearing in the reliability report 2-4 times daily from 2025-05-23 - nodejs/reliability#1209 till 2025-06-01 nodejs/reliability#1218. The PR landed on 2025-05-29 and after the PRs where CI was being run on included this change, the flake went away in all recent reliability reports.

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

    aixIssues and PRs related to the AIX platform.async_hooksIssues and PRs related to the async hooks subsystem.child_processIssues and PRs related to the child_process subsystem.flaky-testIssues and PRs involving tests that fail intermittently in CI.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions