Comments (2)
Hi @bin,
Good find. I took a look at this and I don't think it's a deadlock, but it is clearly a race condition.
I have a similar setup going in the pipeline_test
, but with one key difference - i'm spawning a new task to run concurrent command there instead of in a single loop.
The deadlock-detection
logic in parking lot hasn't picked anything up, and there should only be one lock in play in the code paths used by your example. That usage is limited to single-line push_back
and pop_front
on a VecDeque
, so I doubt that's the issue.
In looking at the network traffic I noticed that when this does repro it always happens when the client decides not to flush the socket after writing some bytes. This was just an optimization, and callers can disable it by setting the pipeline
flag in the config to false
. When I disable pipelining this no longer repros for me as well. But that would make sense, since if the server never received all the bytes in a frame then it won't respond.
I also found an issue in the logic that decides whether to flush the socket, so I think that's the root cause. My suspicion is that it's an atomic ordering issue in the counter that determines whether to flush some bytes, which would explain why it doesn't repro on a single thread.
I'll need to spend some time with loom but if that's the issue I'll get an update out hopefully this weekend.
from fred.rs.
Yeah, that is the issue. It's not an issue of using the wrong Ordering
, but I just had an incr
line at the wrong location. I was able to patch this locally and I can no longer repro the issue.
I'll get a patch up for 4.x this weekend.
from fred.rs.
Related Issues (20)
- [Bug] blocking (blpop) timeout lead to confusing RedisErrors HOT 1
- about how to set key-value HOT 2
- How to set a key:value where value is a complex struct HOT 4
- Disallowing nested items interferes with `serde_json::Value` HOT 1
- Can't resume automatically after redis cluster reboot HOT 1
- No subscriber message_rx stop after quit HOT 1
- Is it possible to implement all traits on SubscriberClient? HOT 2
- Change log print format [Bug] HOT 3
- [Bug?] Using `info replication` for replica discovery yields private ips HOT 3
- [Bug] replicas feature broken with pooling? HOT 5
- [Bug] Support multiple IPs result in DNS resolver HOT 1
- Get rid of global configs HOT 1
- Behavior during reconnect HOT 9
- [Bug] Not receiving invalidation messages on RedisPool
- [Bug] Redis array response is wrongly translated
- Keepalive support
- [Bug] Type `ClusterRouting` is not `pub` thus `ClusterLike::cached_cluster_state()` can not be used HOT 2
- [Bug?] 6.0.0: Reading concurrently from multiple connections HOT 12
- [Feature-request] Improve `watch` interface for transactions (`multi`) HOT 3
- [Feature request] Support for client-side caching HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fred.rs.