-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
Hi,
We are getting the following exception intermittently in production:
at System.IO.Pipelines.ThrowHelper.ThrowInvalidOperationException_NoReadingAllowed()
at System.IO.Pipelines.Pipe.AdvanceReader(SequencePosition& consumed, SequencePosition& examined)
at System.IO.Pipelines.Pipe.DefaultPipeReader.AdvanceTo(SequencePosition consumed, SequencePosition examined)
at StackExchange.Redis.PhysicalConnection.ReadFromPipe() in /_/src/StackExchange.Redis/PhysicalConnection.cs:line 1850
When this happens its alway after we have called IDatabase.StreamAddAsync.
Looking at PhysicalConnection I'm wondering if there is a race condition between ReadFromPipe and something calling Dispose?

Does that make sense? I'm pretty sure this class is used by multiple threads and so I think the above is posslbe. Looking at the exception handler it seems like we don't even really want to report this exception?

So to sum up:
- Is this error happening due to the described race condition?
- Do we even want to report this exception up to the caller?
We have seen this happen on multiple OS, dotnet, and package versions:
- Ubuntu 20.04 and 22.04
- Dotnet 7.0.17 and 8.0.3
- StackExchange.Redis 2.7.20 and 2.7.33
Let me know if you need more info.
Thanks!
tecAmoRaller and DAVILT21998MAY25
Metadata
Metadata
Assignees
Labels
No labels