Comments (5)
Awesome, great to hear - and great to fix this bug; I hadn't seen it, but: quite likely it was causing some connection failures that I wasn't attributing to this, especially under load
from pipelines.sockets.unofficial.
I see the same error in v2.0.7
.
EDIT:
I think I forget to cleanup and rebuild everything.
Looks good after a few round tests. Confirmed the fix.
Thanks!
from pipelines.sockets.unofficial.
v2.0.7 uploaded to nuget - please let me know how you get on, and thanks for a great error report
from pipelines.sockets.unofficial.
I am very intrigued! Below is mostly my thought process while reading it. Sorry if it is disjointed - that's just how I think.
It looks like the problem here is with the actual list - I can't see any other way for System.Collections.Generic.List
1.get_Item(Int32 index)` to throw, when it is accessed via:
int bufferCount = value.Count;
...
for (int i = 0; i < bufferCount; i++)
{
ArraySegment<byte> buffer = value[i];
RangeValidationHelpers.ValidateSegment(buffer);
_bufferListInternal.Add(buffer);
}
so yes, I agree that the most likely problem here is somehow two threads squabbling over the same list. I'd also be happy to conclude that buffer
coming out incomplete (a torn value) would be a possible cause of the second stack-trace, if we accept that the first stack-trace is caused by two threads fighting over the list.
So... how could such a thing have happened? (scratches beard)
I suspect that the problem is: in the "socket work completed synchronously case" we're recycling the buffer, but not clearing the buffer-list on the socket-args - that list is then up for grabs, and if the next IO work is also multi-buffer, we'll get into problems. Yeah, I'm pretty confident that's what has happened... fixing.
(minor edits to clarify wording - see history)
from pipelines.sockets.unofficial.
I will test it tomorrow. thank you!
from pipelines.sockets.unofficial.
Related Issues (20)
- TLS/SSL support HOT 6
- How to find out when/if the reader/writer completed HOT 3
- Does this project only support .Net Core, instead of .Net Framework? HOT 8
- if the implementation of this library has relation ship for Rio(Winsock registered I/O extensions) in Windows? HOT 2
- Unable to wait for socket closure HOT 2
- Test: MutexSlim_ConcurrentLoadAsync_DisableContext - fails on my machine
- Test: ConnectTests.Connect - Fails on my machine HOT 1
- Test: BufferWriterDoesNotLeak also fails on my machine
- Set unsafeSuppressExecutionContextFlow on SocketAsyncEventArgs HOT 3
- Loopback fast path is deprected on Windows and can cause high cpu on Win Server 2019 HOT 2
- How do I flush synchronously? HOT 5
- Pump a pair of PipeReader/PipeWriter
- Investigating SemaphoreSlim on net6.0+ HOT 1
- Unnecessary _queue.Count check in DedicatedThreadPoolPipeScheduler.RunWorkLoop HOT 7
- netstandard2.1 DoReceive fails on Zero Length Reads on Mono HOT 1
- Thread Safety Violation Warnings found by InferSharp static analysis tool HOT 3
- Trim and AOT warnings in Delegates and PerTypeHelpers HOT 3
- Fix Thread Safety and other static code analysis issues reported by Infer#
- Improve package readme
- Socket callbacks spill to the main thread pool on Linux
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 pipelines.sockets.unofficial.