-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Deadlock between DockerClientFactory and RyukResourceReaper with JUnit 5 parallel tests #9120
Comments
Hi @pkwarren, can you please provide a project that reproduces the issue? |
Here's an example repo showing the problem: https://github.com/pkwarren/testcontainers-issue-9120 |
Thanks for sharing @pkwarren. I did some changes because the docker-compose.yml file was not found and also had to set version but can not reproduce the issue. Do you mind taking a look? |
It should be here: https://github.com/pkwarren/testcontainers-issue-9120/blob/main/docker-compose.yml
I don't follow - where did a version need to be specified?
If you could provide more specifics on what you're doing and any errors you're seeing I'd be happy to update the example project. For me just running |
I had to change from
I was talking about version in docker-compose.yml file. But executing again, I don't need it anymore. I jus wanted to make sure we have the same code to reproduce. After that, just ran |
Pushed updates to fix the I'm on the latest version of Docker desktop (v4.33.0) if it matters. |
Module
Core
Testcontainers version
1.20.1
Using the latest Testcontainers version?
Yes
Host OS
MacOS
Host Arch
arm64
Docker version
Client: Version: 27.1.1 API version: 1.46 Go version: go1.21.12 Git commit: 6312585 Built: Tue Jul 23 19:54:12 2024 OS/Arch: darwin/arm64 Context: desktop-linux Server: Docker Desktop 4.33.0 (160616) Engine: Version: 27.1.1 API version: 1.46 (minimum version 1.24) Go version: go1.21.12 Git commit: cc13f95 Built: Tue Jul 23 19:57:14 2024 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.7.19 GitCommit: 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41 runc: Version: 1.7.19 GitCommit: v1.1.13-0-g58aa920 docker-init: Version: 0.19.0 GitCommit: de40ad0
What happened?
I'm attempting to run tests in parallel with JUnit 5. One test spins up a static
ComposeContainer
with.withLocalCompose(true)
and another spins up a staticKafkaContainer
. This leads to a deadlock on startup, where one thread acquires the lock onRyukResourceReaper
and then fails to acquire the lock inDockerClientFactory
, while the other thread does the opposite.Relevant log output
Kafka container thread:
Compose container thread:
Additional Information
No response
The text was updated successfully, but these errors were encountered: