GeezerVison is showing github.com — `test-perf-hooks-histogram-external-memory` failures on node-test-comit-plinux · Issue #67374 · nodejs/node
test-perf-hooks-histogram-external-memory failures on node-test-comit-plinux #67374
Labels flaky-testIssues and PRs involving tests that fail intermittently in CI.ppcIssues and PRs related to the Power architecture. DescriptionTest
parallel/test-perf-hooks-histogram-eternal-memory
Platform
Linux PPC64LE
Console output
---
duration_ms: 123.749
exitcode: 1
severity: fail
stack: |-
node:internal/process/promises:324
triggerUncaughtException(err, true /* fromPromise */);
^
AssertionError [ERR_ASSERTION]: Expected a major garbage collection caused by histogram memory
at /home/iojs/build/workspace/node-test-commit-plinux/nodes/rhel8-power9le/test/parallel/test-perf-hooks-histogram-external-memory.js:36:10 {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '==',
diff: 'simple'
}
Node.js v28.0.0-pre
...
Build links
Looking at recent runs of the PR tester I have noticed that there is a high proportion of failures due to the plinux job (Links not public visible).
Looking at the most recent failures - it most mostly on a single machine, but not exclusively so:
It looks like today's reliability report is the first in a while to mention it suggesting it was potentially a recent change that has caused it.
Additional information
No response Activitysxa commented on Nov 10, 2026 The first failure was in https://ci.nodejs.org/job/node-test-commit-plinux/67470/ at 0722 UTC yesterday on the -5 machine. The last good run on the -4 machine (where the problem seems most prolific) was at https://ci.nodejs.org/job/node-test-commit-plinux/nodes=rhel8-power9le/67464/testReport/(root)/parallel/ at 2035 the previous day.
If it was down to a code change that would suggest it could be one of these:
* f344e7f552e 2026-11-09 | worker: preload streams into startup snapshot [Matteo Collina]
* 7ae68bd0f41 2026-11-09 | stream: trim webstreams sink wrappers and BYOB transfers [Matteo Collina]
* 5d59de845c1 2026-11-09 | sea: generate a compile cache for the VFS modules [Matteo Collina]
* 768315cf716 2026-11-08 | test: deflake test-worker-eventlooputil [Matteo Collina]
I'm going to try some tests on the most problematic machine but I'll also tag @mcollina in case there's any possibility that one of those made a change that could cause a problem in that test. changed the title [-]`test-perf-hooks-histogram-eternal-memory` failures on node-test-comit-plinux[/-] [+]`test-perf-hooks-histogram-external-memory` failures on node-test-comit-plinux[/+] on Nov 10, 2026sxa commented on Nov 10, 2026 sxa commented on Nov 10, 2026 Noting also that on the main test results page of node-test-commit-plinux there is a difference in whether the tests section shows the test case which fails e.g.:
In both cases it was the same failure on the same machine, but there was a difference in how it was reported. sxa commented on Nov 10, 2026 mcollina commented on Nov 10, 2026 SponsorMember More actions
The first failure was in https://ci.nodejs.org/job/node-test-commit-plinux/67470/ at 0722 UTC yesterday on the -5 machine. The last good run on the -4 machine (where the problem seems most prolific) was at https://ci.nodejs.org/job/node-test-commit-plinux/nodes=rhel8-power9le/67464/testReport/(root)/parallel/ at 2035 the previous day.
If it was down to a code change that would suggest it could be one of these:
* f344e7f552e 2026-11-09 | worker: preload streams into startup snapshot [Matteo Collina]
* 7ae68bd0f41 2026-11-09 | stream: trim webstreams sink wrappers and BYOB transfers [Matteo Collina]
* 5d59de845c1 2026-11-09 | sea: generate a compile cache for the VFS modules [Matteo Collina]
* 768315cf716 2026-11-08 | test: deflake test-worker-eventlooputil [Matteo Collina]
I'm going to try some tests on the most problematic machine but I'll also tag @mcollina in case there's any possibility that one of those made a change that could cause a problem in that test.
not of my knowledge sxa commented on Nov 10, 2026 Testing on test-osuosl-rhel10-ppc64_le-1 with a "manual bisect" since it was quite a small timeframe:
eb3ae472b6 - failed 9/100
82940d6fa5 (just prior to the ones listed above) - Passed 100/100
9aa379e22f (just after the ones listed above0 - Failed 7/100
7ae68bd0f4 passed 100/100
f344e7f552 failed 9/100
The last two lines definitely point the finger at the prelead streams into startup snapshot change.
I've just re-tested the one before it 7ae68bd0f4 and it passes 1000/1000 iterations sxa commented on Nov 10, 2026 Fired some AI at it and it suggests increasing the histogram count in the test case to increase memory pressure to ensure that the GC event is triggered. I have confirmed that increasing the invocations of histogram.snapshot() to 800 from 400 in the test allows it to pass reliably so given the analysis below - specifically the "race condition" section - it seems plausible that this is a valid fix. I will prepare a PR, but I want to verify that it works with a high number of iterations on a RHEL8 system (ideally -4 based on the initial analysis of failures)
The last PR test run executed on osu-rhel8-4 and passed ok at https://ci.nodejs.org/job/node-test-commit-plinux/nodes=rhel10-ppc64le/67464/ - the earlier runs have already removed themselves from the CI.
Root Cause Analysis
The intermittent failure on Linux/ppc64le is caused by PR #66311 which preloads streams into the startup snapshot. This change affects V8's external memory accounting and GC triggering specifically on the PowerPC architecture.
Why It Fails
1. Memory Accounting Timing:
When streams are preloaded into the startup snapshot, the initial memory layout and V8's external memory accounting are altered. On PPC64LE, this appears to affect when V8 recognizes memory pressure from external allocations.
2. Architecture-Specific Behavior:
PPC64LE has different:
- Memory page sizes (typically 64KB vs 4KB on x86)
- Memory alignment requirements
- Cache line sizes (128 bytes vs 64 bytes)
These differences can affect V8's GC heuristics and threshold calculations.
3. Race Condition:
The test creates 400 histogram snapshots (~140MB native memory) and expects this external memory pressure to trigger a major GC. With the snapshot changes, the timing of when V8 accounts for this external memory may have shifted, creating a race condition where the test completes before the GC event is observed.
Probable Root Cause
The snapshot preloading changes how V8 initializes its heap and external memory tracking. On PPC64LE, this initialization difference causes V8 to either:
- Not properly account for the histogram's external memory immediately
- Delay GC triggering due to different memory pressure calculations
- Have the GC event occur but not be observed in time by the PerformanceObserver
sxa commented on Nov 10, 2026 christianaurichzm commented on Nov 12, 2026 Since the bisect points at the snapshot change, I took a look at how it could affect this test. The snapshots are garbage as soon as they’re created, and a scavenge in the middle of the loop frees the ones taken so far. V8 only forces the major GC inside the loop once memory is 32 MiB past the initial global limit (heap.cc). On x64 that’s around 265 snapshots. If the scavenge lands after about iteration 135, the loop doesn’t get there anymore. Then a V8 task finishes the GC later, and the test only waits 10 setImmediate turns for it.
Loading stream from the snapshot changes how much of the young generation is in use when the loop starts. I think that’s what moves the scavenge into that range on ppc64le and s390x, so it’s really the test depending on GC timing. On x64 I could get the late GC by allocating some garbage before the loop. With 400 iterations that happened in 9 of 62 runs. With 800 it didn’t happen once.
MetadataMetadataflaky-testIssues and PRs involving tests that fail intermittently in CI.ppcIssues and PRs related to the Power architecture. DevelopmentNo branches or pull requestsIssue actions
|