You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Investigate flaky test - sequential/test-performance-eventloopdelay #41286
diff --git a/test/sequential/test-performance-eventloopdelay.js b/test/sequential/test-performance-eventloopdelay.js
index f262e9de3f..eddc9348fa 100644
--- a/test/sequential/test-performance-eventloopdelay.js+++ b/test/sequential/test-performance-eventloopdelay.js@@ -62,7 +62,7 @@ const { sleep } = require('internal/util');
histogram.disable();
// The values are non-deterministic, so we just check that a value is
// present, as opposed to a specific value.
- assert(histogram.min > 0);+ assert(histogram.min > 0, `histogram.min (${histogram.min}) > 0`);
assert(histogram.max > 0);
assert(histogram.stddev > 0);
assert(histogram.mean > 0);
Is this a bug in the test and the docs? Is it possible for the minimum recorded event loop delay to be 0 (or rather, to round to 0) on a sufficiently fast machine? @jasnell
I'm not sure if I should rather open a new issue or continue posting in this old one, but I can confirm that this test is flaky on my build system that has 32 cores @ 5.7 ghz with exactly the same test failure as reported here.
It happens relatively regularly (my estimate: 25% of the time) if my system is not doing a lot of other things at the time of testing.
This is a bog-standard x86_64 GNU/Linux system, fwiw.
EDIT:
This is still the case for v22.12.0
@jellelicht I guess nevermind since I only 96a3804 only modified the time for s390x.
It would be usefull if you could check if a similar change on your system reduces the flakiness. I'm guessing its a similar issue.
This notification slipped throught the cracks. I've just tested; even increasing spin by huge amounts (x4) does not entirely prevent the issue, so I've simply disabled the test locally as it's quite flaky according to CI logs I've found floating around
I was looking at this, but I think the test is wrong, tbh — it should check min >= 0.
monitorEventLoopDelay configures the histogram with lowest_discernible_value = 1000 ns. hdr_min() returns the lower bound of the bucket the smallest sample landed in, and for that config the first bucket is [0, 512) ns — lower bound 0.
So min === 0 just means the smallest sample fell into the first bucket.
In other words, seems to me that the assert is wrong, and min === 0 is legit
This issue has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
This issue slipped through the cracks because our previous stale bot only tracked issues and couldn't catch all the issues.
Our new stale bot flagged this, and would have closed it shortly after RenderATL, but I'm just doing it a bit early so
maintainer's can focus on new code-and-learn PRs during the event.
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.
Activity
richardlau commentedon Jan 4, 2022
According to https://github.com/nodejs/reliability/issues?q=is%3Aissue+test-performance-eventloopdelay this first showed up on 22 December 2021.
richardlau commentedon Jan 4, 2022
Walking backwards from commits landed on 22 December 2021, I've started two stress runs around 23637e9:
665b404: https://ci.nodejs.org/view/Stress/job/node-stress-single-test/306/nodes=rhel7-s390x/ (✔️ no failures in 1000 runs)
23637e9: https://ci.nodejs.org/view/Stress/job/node-stress-single-test/307/nodes=rhel7-s390x/ (❌ 100 failures in 1000 runs)
richardlau commentedon Jan 4, 2022
I've added some debug to the test
and kicked off another stress run (based on current
masterbranch): https://ci.nodejs.org/view/Stress/job/node-stress-single-test/309/nodes=rhel7-s390x/consoleand it looks like in the failure case
histogram.minis0:e.g.
test: mark test-performance-eventloopdelay flaky
test: mark test-performance-eventloopdelay flaky
test: mark test-performance-eventloopdelay flaky
test: mark test-performance-eventloopdelay flaky
Trott commentedon Mar 19, 2022
Happened again today (and I'm sure many, many other days, but since it's marked as flaky, people probably don't log it).
Details
https://ci.nodejs.org/job/node-test-commit-linuxone/nodes=rhel8-s390x/31271/console
Trott commentedon Mar 19, 2022
Is this a bug in the test and the docs? Is it possible for the minimum recorded event loop delay to be 0 (or rather, to round to 0) on a sufficiently fast machine? @jasnell
jasnell commentedon Mar 19, 2022
Most likely test bug. I'll be able to look tomorrow
mhdawson commentedon Jun 15, 2022
@jasnell any chance you are goin to be able to take a look at this soon?
test: increase spin for eventloop test on s390
test: increase spin for eventloop test on s390
jellelicht commentedon Jan 6, 2025
I'm not sure if I should rather open a new issue or continue posting in this old one, but I can confirm that this test is flaky on my build system that has 32 cores @ 5.7 ghz with exactly the same test failure as reported here.
It happens relatively regularly (my estimate: 25% of the time) if my system is not doing a lot of other things at the time of testing.
This is a bog-standard x86_64 GNU/Linux system, fwiw.
EDIT:
This is still the case for v22.12.0
mhdawson commentedon Jan 6, 2025
@jellelicht can you confirm you have the commit for 96a3804 in where you see the failure?
mhdawson commentedon Jan 6, 2025
@jellelicht I guess nevermind since I only 96a3804 only modified the time for s390x.
It would be usefull if you could check if a similar change on your system reduces the flakiness. I'm guessing its a similar issue.
test: increase spin for eventloop test on s390
jellelicht commentedon May 30, 2025
This notification slipped throught the cracks. I've just tested; even increasing spin by huge amounts (x4) does not entirely prevent the issue, so I've simply disabled the test locally as it's quite flaky according to CI logs I've found floating around
joyeecheung commentedon Sep 4, 2025
This is flaking up the CI again (and has been significantly flaky for a few months), it might be time to mark it as flaky at least https://github.com/nodejs/reliability/blob/main/reports/2025-09-04.md
marcopiraccini commentedon May 3, 2026
I was looking at this, but I think the test is wrong, tbh — it should check min >= 0.
monitorEventLoopDelay configures the histogram with lowest_discernible_value = 1000 ns. hdr_min() returns the lower bound of the bucket the smallest sample landed in, and for that config the first bucket is [0, 512) ns — lower bound 0.
So min === 0 just means the smallest sample fell into the first bucket.
In other words, seems to me that the assert is wrong, and
min=== 0 is legitHere a PR: #63100
github-actions commentedon Aug 2, 2026
This issue has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
avivkeller commentedon Aug 9, 2026
This issue slipped through the cracks because our previous stale bot only tracked issues and couldn't catch all the issues.
Our new stale bot flagged this, and would have closed it shortly after RenderATL, but I'm just doing it a bit early so
maintainer's can focus on new code-and-learn PRs during the event.
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.