Integrated: 8303470: containers/docker/TestMemoryAwareness.java failed with "'memory_limit_in_bytes:.*512000 k' missing from stdout/stderr"

Casper Norrbin cnorrbin at openjdk.org
Thu Jan 22 09:48:44 UTC 2026


On Tue, 20 Jan 2026 13:14:22 GMT, Casper Norrbin <cnorrbin at openjdk.org> wrote:

> Hi everyone,
> 
> When printing VM container info with trace container logging enabled, it is possible for the output to become interleaved. This can cause `TestMemoryAwareness.java` to fail, since the string it expects may be split by trace output appearing in the middle of the VM.info line.
> 
> In #28766, I added improved VM.info formatting with the `OSContainer::print_container_metric` function, but it still performed printing in 2 steps, making it possible for that output to be split. With this PR, I have changed this so we construct the full line with `snprintf` before printing, ensuring the whole line is printed in a single step. This prevents other output from splitting the line, so the test can reliably detect the expected values.
> 
> Since the test now works as expected, I have also removed it from the problemlist.
> 
> Testing:
> - Oracle tiers 1-5
> - Local container tests on cgroup v1/v2 with both podman and docker
> - Repeated runs of `TestMemoryAwareness.java` without any observed failures

This pull request has now been integrated.

Changeset: ddbd4617
Author:    Casper Norrbin <cnorrbin at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/ddbd4617a6172e3054b2afade4f304f66c79816e
Stats:     8 lines in 2 files changed: 1 ins; 1 del; 6 mod

8303470: containers/docker/TestMemoryAwareness.java failed with "'memory_limit_in_bytes:.*512000 k' missing from stdout/stderr"

Reviewed-by: sgehwolf, dholmes

-------------

PR: https://git.openjdk.org/jdk/pull/29319


More information about the hotspot-runtime-dev mailing list