Closed Nikita240 closed 8 months ago
Thanks for the report... I see there's a v1.2.0
version of Hyper out and version v0.1.3
of hyper-util, let's see if we can reproduce this on those versions.
I actually can't reproduce this problem. Can you give more detail on your system, and maybe any dockerd logs you find ? you can turn on debug logging in the daemon using the following configuration in /etc/docker/daemon.json
:
{
"debug": true,
"raw-logs": true
}
That's very strange. I'm able to replicate this on two different machines running different docker versions.
I think the issue here is caused by the statically stored Docker
instance static DOCKER: OnceCell<Docker>
.
When running tokio
tests with multi_thread
, tokio will actually run the tests concurrently, but spawn a unique runtime for each one of them.
As of bollard@0.16
, somehow, the Docker
instance "absorbs" the first tokio runtime it sees, and if that runtime is dropped while someone else is making a request, you get the error "runtime dropped the dispatch task"
.
Ah yes, I see it now if you run them all together..
I put this test scenario into bollard's CI system, and it seems to fail on all connectors (http / ssl / named pipe / unix socket), so that excludes any issue with any individual connector. I also checked locally running against the latest master branch of hyper and it still fails (albeit less often).
I did find a fix, if you have the time, I'd appreciate if you can check if it works for you.. https://github.com/fussybeaver/bollard/pull/390
Related to this https://github.com/hyperium/hyper/issues/2312
I just got around to test your fix. I can confirm it works!
Thank you so much for your support on this ❤️
After upgrading from bollard v0.15 to v0.16 I started encountering a race condition in my unit tests. I believe this is likely related to the upgrade to hyper v1.1, but I can't quite pin down what's happening.
Here is the test setup to replicate:
Here is what the error looks like:
The test failures are random and inconsistent.
Do you have any ideas how to root-cause this?