Comments (4)
Progress updates:
-
Managed to consistently reproduce the issue on Ubuntu 18.04 by adding GRPC_TRACE=all and GRPC_VERBOSITY=debug to the environment which slows down the execution and makes the issue much more likely to occur. To analyze the grpc traces, I also had to redirect standard output and standard error to a file with a
dup2
system call but not sure it's a necessary condition to make the issue reproducible. -
Only a single iteration of the test is required to reproduce the issue (instead of 50 in the test)
-
Analyzing the backtraces with
lldb
shows that the monoFinalizer
thread is waiting on a futex. I'm not 100% sure this is the cause but it's very likely given the information below - the Dispose calls are probably being done by the Finalizer thread. The fact that the test successfully passes and then the hanging occurs also supports this hypothesis. -
The issue occurs when we call
Dispose()
onAsyncDuplexStreamingCall
- it seems that it's currently in use only with persistent subscriptions. -
Removing
_call?.Dispose();
here stops the hanging: -
It is also related to the dispose calls on the
AsyncDuplexStreamingCall
in the interceptors - replacing any of theresponse.Dispose
calls with an empty action stops the hanging:
Summary:
It appears that multiple simultaneous calls to Dispose()
on AsyncDuplexStreamingCall
causes a deadlock due to a race condition.
I've attempted a minimal reproduction (without EventStore-specific code) but I've been unsuccessful so far.
from eventstore-client-dotnet.
Managed to get a minimal repro of the issue: https://github.com/shaan1337/async-duplex-streaming-call-hang
Opened an issue on gRPC repo: grpc/grpc#25488
from eventstore-client-dotnet.
PR: #93 is closed
from eventstore-client-dotnet.
In the end dealt with in #172 by dropping the (short lived) support for net48
from eventstore-client-dotnet.
Related Issues (20)
- Confusing Error when using untrusted private CA
- Expose ES Ping Functionality through EventStoreClient HOT 4
- Updating built-in projection `$by_correlation_id` corrupts it HOT 1
- DeadlineExceeded exception when trying to create persistent subscription to $all with ES Cloud 21.10.4 HOT 1
- Exception calling AppendToStreamAsync with duplicate event HOT 2
- AppendToStream can write a subset of events when errors occur. HOT 3
- Filtering on streams HOT 3
- Issue with dapr HOT 2
- Client continues to invoke the ChannelInfo factory after being disposed
- Connection string port is parsed wrong HOT 3
- What was the reason to implement connection string parser manually with lots of allocations? HOT 2
- Automatic reconnection to new leader HOT 5
- EventStoreClientSettings.Create is not correctly populating the created settings HOT 4
- SubscriptionFilterOptions support for StreamFilter and EventTypeFilter together HOT 1
- All settings classes like `EventStoreClientConnectivitySettings` must be records to be equatable out of the box HOT 3
- The link to Slack community " DDD-CQRS-ES" HOT 4
- IWriteResult.NextExpectedStreamRevision: Mismatch between member name and documentation
- Breaking change "SubscribeToAllAsync is no longer supported. Use SubscribeToAll instead" HOT 5
- v24.2.0 : gRPC.Core.RpcException even for INSECURE=true, TLS=false HOT 2
- RpcException When Using AppendToStreamAsync From Windows HOT 14
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 eventstore-client-dotnet.