Skip to content

Conversation

@brunobat
Copy link
Member

@brunobat brunobat commented Dec 18, 2025

There are 2 fixes here:

  • Make sure we clear the reference for the VertxMDC reference before we add more data there. If we don't do that, that reference will end up being used in multiple threads and be subject to crosstalk.
  • When we close the scope, we were restoring previous scopes from spans that were already finished.

Did some refactoring to clarify context objects because we have too many types of contexts.
Added some debug logs for future debugging.

@quarkus-bot
Copy link

quarkus-bot bot commented Dec 18, 2025

/cc @ebullient (micrometer), @radcortez (opentelemetry)

@brunobat brunobat force-pushed the fix-43134-MDC-context-disappears branch from a1b9114 to 890a77a Compare December 19, 2025 09:17
@brunobat brunobat marked this pull request as ready for review December 19, 2025 09:18
@quarkus-bot

This comment has been minimized.

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.

Very nice work!

I only added some trivial comments

@brunobat
Copy link
Member Author

@geoand I was commenting here: #49630 (comment)
And I think I will add a method in VertxMDC to clear the context there to create awareness to this issue.

@brunobat brunobat force-pushed the fix-43134-MDC-context-disappears branch from 890a77a to 0f0e867 Compare December 19, 2025 10:14
@quarkus-bot

This comment has been minimized.

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!

@quarkus-bot
Copy link

quarkus-bot bot commented Dec 19, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 0f0e867.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Tests - JDK 17

📦 extensions/scheduler/deployment

io.quarkus.scheduler.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.scheduler.test.PausedSchedulerTest.testSchedulerPauseResume(PausedSchedulerTest.java:47)

⚙️ JVM Tests - JDK 17 Windows

📦 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)

⚙️ Gradle Tests - JDK 17 Windows

📦 integration-tests/gradle

io.quarkus.gradle.BasicMultiModuleQuarkusBuildTest.testBasicMultiModuleBuild - History

Exception in thread "main" java.io.IOException: Downloading from https://services.gradle.org/distributions/gradle-8.14-bin.zip failed: timeout (10000ms)-java.lang.AssertionError`

Details
java.lang.AssertionError: 

Expecting actual:
  "Downloading https://services.gradle.org/distributions/gradle-8.14-bin.zip

Exception in thread "main" java.io.IOException: Downloading from https://services.gradle.org/distributions/gradle-8.14-bin.zip failed: timeout (10000ms)
	at org.gradle.wrapper.Install.forceFetch(SourceFile:4)
	at org.gradle.wrapper.Install$1.call(SourceFile:8)

io.quarkus.gradle.devmode.KotlinProjectWithCompilerArgsDevModeTest.main - History

  • Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 2 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 2 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.getHttpResponse(DevModeClient.java:164)
	at io.quarkus.gradle.devmode.QuarkusDevGradleTestBase.getHttpResponse(QuarkusDevGradleTestBase.java:165)

@brunobat
Copy link
Member Author

Failures seem unrelated. Will merge.

@brunobat brunobat merged commit 2dc6e30 into quarkusio:main Dec 22, 2025
65 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.31 - main milestone Dec 22, 2025
@brunobat
Copy link
Member Author

@gsmet We should consider this to backport, if possible.

@gsmet gsmet removed this from the 3.31 - main milestone Dec 23, 2025
@gsmet gsmet added this to the 3.30.5 milestone Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenTelemetry: MDC context disappears on ManagedExecutor thread

3 participants