Skip to content

Conversation

@gsmet
Copy link
Member

@gsmet gsmet commented Dec 23, 2025

Fixes #51688

The issue is interesting as using JaCoCo causes the MemoryClassPathElement hosting the transformed classes to be massive, thus making the two leaks very very visible.

The first one manifests as:

Screenshot From 2025-12-23 11-03-24

The second one manifests as:

Screenshot From 2025-12-23 15-52-10

See individual commits for the details.

Now let's hope it doesn't break CI :).

I will have to add some recording and I don't think creating one more
specialized Recorder is the way to go.
Also added the phase annotations for documentation.
This will cause class loader leaks in test and dev mode, otherwise.

Fixes quarkusio#51688
When we reset the class loader with the new transformed classes, we need
to make sure we drop the element from the protectionDomains, otherwise
the MemoryClassPathElement is kept as a key and leaks to the next
test/dev mode runs.

Fixes quarkusio#51688
@gsmet gsmet requested a review from geoand December 23, 2025 14:54
@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/jackson Issues related to Jackson (JSON library) labels Dec 23, 2025
Comment on lines +236 to +237
// we don't want the previous MemoryClassPathElement to leak as a key of protectionDomains
protectionDomains.remove(this.transformedClasses);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the first we've run into this...

Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on this!!!

Copy link
Member

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@quarkus-bot
Copy link

quarkus-bot bot commented Dec 23, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 5bd70d1.

Failing Jobs

Status Name Step Failures Logs Raw logs Build scan
✔️ JVM Tests - JDK 17 Logs Raw logs 🔍
✔️ JVM Tests - JDK 21 Logs Raw logs 🔍
JVM Tests - JDK 21 Semeru Build Failures Logs Raw logs 🔍
✔️ JVM Tests - JDK 25 Logs Raw logs 🔍

You can consult the Develocity build scans.

Failures

⚙️ JVM Tests - JDK 21 Semeru #

- Failing: extensions/panache/hibernate-orm-panache-kotlin/runtime 
! Skipped: extensions/panache/hibernate-orm-panache-kotlin/deployment 

📦 extensions/panache/hibernate-orm-panache-kotlin/runtime

Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:2.3.0:compile (compile) on project quarkus-hibernate-orm-panache-kotlin: Compilation failure


Flaky tests - Develocity

⚙️ JVM Tests - JDK 17

📦 extensions/quartz/deployment

io.quarkus.quartz.test.PausedSchedulerTest.testSchedulerPauseResume - History

  • expected: <false> but was: <true> - org.opentest4j.AssertionFailedError
Details
org.opentest4j.AssertionFailedError: expected: <false> but was: <true>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:158)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:139)
	at org.junit.jupiter.api.AssertFalse.failNotFalse(AssertFalse.java:69)
	at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:41)
	at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:35)
	at org.junit.jupiter.api.Assertions.assertFalse(Assertions.java:246)
	at io.quarkus.quartz.test.PausedSchedulerTest.testSchedulerPauseResume(PausedSchedulerTest.java:47)

⚙️ JVM Tests - JDK 17 Windows

📦 extensions/micrometer-opentelemetry/deployment

io.quarkus.micrometer.opentelemetry.deployment.compatibility.MicrometerTimedInterceptorTest.testTimeMethod - History

  • Stream has no elements - java.lang.IllegalArgumentException
Details
java.lang.IllegalArgumentException: Stream has no elements
	at io.quarkus.micrometer.opentelemetry.deployment.common.MetricDataFilter.lambda$lastReading$2(MetricDataFilter.java:214)
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at io.quarkus.micrometer.opentelemetry.deployment.common.MetricDataFilter.lastReading(MetricDataFilter.java:214)
	at io.quarkus.micrometer.opentelemetry.deployment.common.MetricDataFilter.lastReadingDataPoint(MetricDataFilter.java:232)
	at io.quarkus.micrometer.opentelemetry.deployment.compatibility.MicrometerTimedInterceptorTest.testTimeMethod(MicrometerTimedInterceptorTest.java:76)

📦 extensions/quartz/deployment

io.quarkus.quartz.test.PausedSchedulerTest.testSchedulerPauseResume - History

  • expected: <false> but was: <true> - org.opentest4j.AssertionFailedError
Details
org.opentest4j.AssertionFailedError: expected: <false> but was: <true>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:158)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:139)
	at org.junit.jupiter.api.AssertFalse.failNotFalse(AssertFalse.java:69)
	at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:41)
	at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:35)
	at org.junit.jupiter.api.Assertions.assertFalse(Assertions.java:246)
	at io.quarkus.quartz.test.PausedSchedulerTest.testSchedulerPauseResume(PausedSchedulerTest.java:47)

⚙️ Maven Tests - JDK 17

📦 integration-tests/maven

io.quarkus.maven.it.DevMojoIT.testThatApplicationRecoversStartupIssue - History

  • Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 20 minutes. - org.awaitility.core.ConditionTimeoutException
Details
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 20 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129)
	at io.quarkus.test.devmode.util.DevModeClient.getHttpErrorResponse(DevModeClient.java:125)
	at io.quarkus.test.devmode.util.DevModeClient.getHttpErrorResponse(DevModeClient.java:116)

io.quarkus.maven.it.DevMojoIT.testThatApplicationRecoversStartupIssue - History

  • Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 20 minutes. - org.awaitility.core.ConditionTimeoutException
Details
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 20 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129)
	at io.quarkus.test.devmode.util.DevModeClient.getHttpErrorResponse(DevModeClient.java:125)
	at io.quarkus.test.devmode.util.DevModeClient.getHttpErrorResponse(DevModeClient.java:116)

⚙️ JVM Integration Tests - JDK 21 Semeru

📦 integration-tests/mailer

io.quarkus.it.mailer.MailerTest.sendHtmlEmail - History

  • java.lang.RuntimeException: java.lang.reflect.InvocationTargetException - java.lang.RuntimeException
Details
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:668)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:763)
	at java.base/java.util.Optional.orElseGet(Optional.java:364)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at io.quarkus.test.junit.TestResourceUtil$TestResourceManagerReflections.startReflectively(TestResourceUtil.java:217)

📦 integration-tests/virtual-threads/grpc-virtual-threads

io.quarkus.grpc.example.streaming.VirtualThreadTest.testGrpcClient - History

  • 1 expectation failed. Expected status code <200> but was <500>. - java.lang.AssertionError
Details
java.lang.AssertionError: 
1 expectation failed.
Expected status code <200> but was <500>.

	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:73)
	at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:60)

@gsmet gsmet merged commit d119e76 into quarkusio:main Dec 23, 2025
64 of 65 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.31 - main milestone Dec 23, 2025
@gsmet gsmet modified the milestones: 3.31 - main, 3.30.5 Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/jackson Issues related to Jackson (JSON library) kind/bugfix triage/backport-3.27 triage/flaky-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Potential memory leak with @QuarkusMainTest for CLI application

3 participants