Changed order of clients and server shutdown to prevent freeze on GitLab CI. by AlexeyKuznetsov-DD · Pull Request #10104 · DataDog/dd-trace-java · GitHub
Skip to content

Changed order of clients and server shutdown to prevent freeze on GitLab CI. - #10104

Merged
AlexeyKuznetsov-DD merged 1 commit into
masterfrom
alexeyk/redison-spec-cleanup-fix
Dec 9, 2025
Merged

AlexeyKuznetsov-DD merged 1 commit into
masterfrom
alexeyk/redison-spec-cleanup-fix

Conversation

@AlexeyKuznetsov-DD

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD commented Dec 8, 2025 •

Copy link
Copy Markdown
Contributor

What Does This Do

Refactored test to follow the proper cleanup pattern: resources should be released in reverse order of their creation, and dependencies (clients) should be cleaned up before the things they depend on (the server).

Motivation

Test is freezing from time to time (not too often, but still) on GitLab CI with thread dump like:

"Test worker" #1 [48480] prio=5 os_prio=0 cpu=6671.20ms elapsed=1145.91s tid=0x00007f48f8032b90 nid=48480 in 
Object.wait()  [0x00007f48fedb4000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait0(java.base@21.0.9/Native Method)
	- waiting on <no object reference available>
	at java.lang.Object.wait(java.base@21.0.9/Object.java:366)
	at java.lang.Object.wait(java.base@21.0.9/Object.java:339)
	at io.netty.util.concurrent.DefaultPromise.awaitUninterruptibly(DefaultPromise.java:286)
	- locked <0x00000000c38034f8> (a io.netty.util.concurrent.DefaultPromise)
	at io.netty.util.concurrent.DefaultPromise.syncUninterruptibly(DefaultPromise.java:225)
	at io.netty.util.concurrent.DefaultPromise.syncUninterruptibly(DefaultPromise.java:32)
	at org.redisson.connection.MasterSlaveConnectionManager.shutdown(MasterSlaveConnectionManager.java:472)
	at org.redisson.Redisson.shutdown(Redisson.java:301)
	at org.redisson.RedissonClient$shutdown$7.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130)
	at RedissonClientTest.cleanupSpec(RedissonClientTest.groovy:53)

Additional Notes

…Lab CI.

This follows the proper cleanup pattern: resources should be released in reverse order of their creation, and dependencies (clients) should be cleaned up before the things they depend on (the server).
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD self-assigned this Dec 8, 2025
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added type: bug fix Bug fix tag: no release notes Changes to exclude from release notes inst: redis Redis instrumentation labels Dec 8, 2025
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD marked this pull request as ready for review December 8, 2025 21:37
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD requested a review from a team as a code owner December 8, 2025 21:37
@pr-commenter

pr-commenter Bot commented Dec 8, 2025

Copy link
Copy Markdown

@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD merged commit a10ebc2 into master Dec 9, 2025
548 of 550 checks passed
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD deleted the alexeyk/redison-spec-cleanup-fix branch December 9, 2025 15:10
@github-actions github-actions Bot added this to the 1.57.0 milestone Dec 9, 2025

This branch was previously deployed

1 inactive deployment
ci-build — 827bf4a8 Deployed Dec 8, 2025 by AlexeyKuznetsov-DD via build #6541
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: redis Redis instrumentation tag: no release notes Changes to exclude from release notes type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants