Skip to content

flaky: async-hooks.test-emit-after-on-destroyed #58199

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

Closed
mhdawson opened this issue May 6, 2025 · 3 comments
Closed

flaky: async-hooks.test-emit-after-on-destroyed #58199

mhdawson opened this issue May 6, 2025 · 3 comments
Labels
flaky-test Issues and PRs related to the tests with unstable failures on the CI. linux Issues and PRs related to the Linux platform.

Comments

@mhdawson
Copy link
Member

mhdawson commented May 6, 2025

Test

async-hooks.test-emit-after-on-destroyed

Platform

Linux x64

Console output

---
duration_ms: 429.149
exitcode: 1
severity: fail
stack: |-
  node:assert:95
    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-linux-containered/test/async-hooks/test-emit-after-on-destroyed.js:56:12)
      at ChildProcess.<anonymous> (/home/iojs/build/workspace/node-test-commit-linux-containered/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

https://ci.nodejs.org/job/node-test-commit-linux-containered/50505/nodes=ubuntu2204_sharedlibs_openssl32_x64/testReport/junit/(root)/async-hooks/test_emit_after_on_destroyed/

Additional information

No response

@mhdawson mhdawson added the flaky-test Issues and PRs related to the tests with unstable failures on the CI. label May 6, 2025
@github-actions github-actions bot added the linux Issues and PRs related to the Linux platform. label May 6, 2025
@RaisinTen
Copy link
Member

@RaisinTen
Copy link
Member

cc @nodejs/async_hooks

RaisinTen added a commit to RaisinTen/node that referenced this issue May 27, 2025
When the spawned child process gets closed with a signal, the exit code
is not set and that is why the exit code assertion was failing. This
change adjusts the test to check the signal and if it is truthy, it
doesn't assert the exit code and instead logs the signal and continues
the rest of the assertions.

Refs: nodejs#58463 (comment)
Refs: nodejs#58199
Refs: nodejs#58463
Signed-off-by: Darshan Sen <raisinten@gmail.com>
nodejs-github-bot pushed a commit that referenced this issue May 29, 2025
When the spawned child process gets closed with a signal, the exit code
is not set and that is why the exit code assertion was failing. This
change adjusts the test to check the signal and if it is truthy, it
doesn't assert the exit code and instead logs the signal and continues
the rest of the assertions.

Refs: #58463 (comment)
Refs: #58199
Refs: #58463
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: #58478
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos pushed a commit that referenced this issue May 31, 2025
When the spawned child process gets closed with a signal, the exit code
is not set and that is why the exit code assertion was failing. This
change adjusts the test to check the signal and if it is truthy, it
doesn't assert the exit code and instead logs the signal and continues
the rest of the assertions.

Refs: #58463 (comment)
Refs: #58199
Refs: #58463
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: #58478
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@RaisinTen
Copy link
Member

I can confirm that #58478 has fixed this issue.

This flake was appearing in the reliability report 2-5 times daily from 2025-05-20 - nodejs/reliability#1206 till 2025-05-28 nodejs/reliability#1214. The PR landed on 2025-05-29 and then 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
Labels
flaky-test Issues and PRs related to the tests with unstable failures on the CI. linux Issues and PRs related to the Linux platform.
Projects
None yet
Development

No branches or pull requests

2 participants