From 1aa6fa19737c025dc7f1ca637cd63dd7475e74ad Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 20 Jul 2026 22:43:55 +0000 Subject: [PATCH 1/2] Add -XX:+EnableDynamicAgentLoading to test argLine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Silences the JDK 21 'A Java agent has been loaded dynamically' warning emitted when Lincheck self-attaches its instrumentation agent at runtime (no static -javaagent is configured). That warning is written to the native stderr, outside Surefire's wrapped System.err, and can intermittently corrupt the encoded fork channel — surfacing as 'Corrupted channel by directly writing to native stream' followed by a bogus 'There was a timeout in the fork' even though every test passed. Mirrors the same guard added to the sibling BitcoinAddressFinder repo (there triggered by Mockito's inline mock maker self-attaching byte-buddy). Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01Y84TKMNfhbFGi7EoCEvP99 --- llama/pom.xml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/llama/pom.xml b/llama/pom.xml index e1593628c..5d48c77ef 100644 --- a/llama/pom.xml +++ b/llama/pom.xml @@ -609,7 +609,19 @@ SPDX-License-Identifier: MIT org.apache.maven.plugins maven-surefire-plugin - @{argLine} -Xmx2g -XX:ErrorFile=hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=. + + @{argLine} -Xmx2g -XX:ErrorFile=hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=. -XX:+EnableDynamicAgentLoading + @{argLine} -Xmx2g -XX:ErrorFile=hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=. -XX:+EnableDynamicAgentLoading