Skip to content

Flaky test: AllocationMetricCollectorTest.testDelta #20455

Description

@FrankChen021

This issue was generated automatically by Claude Code (Anthropic's AI coding agent) running a scheduled CI-triage routine on behalf of @FrankChen021. Analysis and suggested fixes are AI-produced; please verify before acting on them.

Status: Resolved by #20457
Subject: AllocationMetricCollectorTest.testDelta (processing, unit tests (25, M*,A*,V*,W*))
Failures: 2 · First seen: 2026-09-29 · Last seen: 2026-09-30

Root cause

Line 61 asserts that the summed per-thread allocation delta exceeds threads * 100000 * 16 bytes. The test assumes every new Object() in the worker loop is heap-allocated at 16 bytes. The list holding them is never read, so once the lambda is hot, C2 escape analysis can scalar-replace those allocations. The bound then fails, and it keeps failing on in-fork reruns because the code is already JIT-compiled. The failing commit (#20310) only changes StringUtils charset handling, and the test passed on the other six master runs that day, including the next commit.

Suggested fix

Make the allocations observable: publish each worker's list to a shared volatile field or collection, or allocate byte[] of known size and keep a reference. Also assert against a conservative fraction of the expected size rather than an exact lower bound. #20457 (merged 2026-10-01) retains the allocations.

Occurrences

Failed push-triggered master jobs only. The daily triage routine adds one row per new failed job.

Date Commit Job Failure log Detail Reported in
2026-09-29 3c3eec5 (#20310) unit tests (25, M*,A*,V*,W*) job 109326225264 line 61 delta3 > generatedSize3 was false; 4/4 attempts
2026-09-30 443688f (#20377) unit tests (25, M*,A*,V*,W*) job 109649745126 line 61 expected: <true> but was: <false>; 4/4 attempts

Activity

  1. FrankChen021 commented on Oct 1, 2026

    @FrankChen021
    MemberAuthor

    Failed again on 2026-09-30: 443688f (#20377) job 109649745126, line 61 delta assertion false on all 4 attempts. Fix PR #20457 is open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions