Skip to content

Auto-port 4.1: Fix flaky PooledByteBufAllocatorTest#16324

Merged
chrisvest merged 1 commit into4.1from
auto-port-pr-16313-to-4.1
Feb 21, 2026
Merged

Auto-port 4.1: Fix flaky PooledByteBufAllocatorTest#16324
chrisvest merged 1 commit into4.1from
auto-port-pr-16313-to-4.1

Conversation

@netty-project-bot
Copy link
Copy Markdown
Contributor

Auto-port of #16313 to 4.1
Cherry-picked commit: 1e78d3f


Motivation:
We observed the testThreadCacheDestroyedByThreadCleaner test failing due to timing out after 10 seconds, while in the runFinalization call.

After analyzing the code, I've determined that the most likely cause is that the runFinalization call itself is very slow, because it waits for the processing of all eligible finalizers, rather than just the one we care about.

Modification:

  • Remove the call to runFinalization and instead rely on the background reference processing thread.
  • Increase the timeout from 10 to 20 seconds, to account for a busier runtime environment now that we run all the buffer tests in parallel.

Result:
More stable build, hopefully.

Motivation:
We observed the testThreadCacheDestroyedByThreadCleaner test failing due
to timing out after 10 seconds, while in the `runFinalization` call.

After analyzing the code, I've determined that the most likely cause is
that the `runFinalization` call itself is very slow, because it waits
for the processing of _all_ eligible finalizers, rather than just the
one we care about.

Modification:
- Remove the call to `runFinalization` and instead rely on the
background reference processing thread.
- Increase the timeout from 10 to 20 seconds, to account for a busier
runtime environment now that we run all the buffer tests in parallel.

Result:
More stable build, hopefully.

(cherry picked from commit 1e78d3f)
@chrisvest chrisvest added this to the 4.1.132.Final milestone Feb 21, 2026
@chrisvest chrisvest merged commit a66d7d3 into 4.1 Feb 21, 2026
19 checks passed
@chrisvest chrisvest deleted the auto-port-pr-16313-to-4.1 branch February 21, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants