You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.
I have been testing and have found the following crash whenever a "large" (2MB in my test) amount of data is sent from the server -> client. The crash occurs in the following code within HubConnectionHandler.cs:
finally
{
// The buffer was sliced up to where it was consumed, so we can just advance to the start.
// We mark examined as buffer.End so that if we didn't receive a full frame, we'll wait for more data
// before yielding the read again.
input.AdvanceTo(buffer.Start, buffer.End);
}
I've modified it slightly, but here is my console output for an example crash:
Buffer start: 429 end : 429
Buffer start: 0 end : 2048
Buffer start: 0 end : 2048
Buffer start: 0 end : 2048
System.InvalidOperationException: Advancing examined to the end would cause pipe to deadlock because FlushAsync is waiting.
at System.IO.Pipelines.ThrowHelper.ThrowInvalidOperationException_BackpressureDeadlock()
at System.IO.Pipelines.Pipe.AdvanceReader(BufferSegment consumedSegment, Int32 consumedIndex, BufferSegment examinedSegment, Int32 examinedIndex)
at System.IO.Pipelines.Pipe.AdvanceReader(SequencePosition& consumed, SequencePosition& examined)
at System.IO.Pipelines.Pipe.DefaultPipeReader.AdvanceTo(SequencePosition consumed, SequencePosition examined)
at Microsoft.AspNetCore.SignalR.HubConnectionHandler`1.DispatchMessagesAsync(HubConnectionContext connection) in C:\Users\Jon\Desktop\testproject\SignalR_2_1_\Microsoft.AspNetCore.SignalR.Core\HubConnectionHandler.cs:line 215
This would then crash the connection (i.e. uncleanly close it for all clients that the file is being pushed to). The test functionality in question is uploading an image to redis (as a blob) over HTTP, then retrieving it via SignalR to the clients. I appreciate a lot has changed, but there was no issue with this in previous (< core 2.1) code. Unsure as to what else i can do here to help but if there's anything more please let me know.
Cheers!
The text was updated successfully, but these errors were encountered:
The issue I referenced outlines the current issues with large uploads and the danger in increasing the max buffer size if your application is exposed to anonymous users. I've filed this issue to look at addressing the problem https://github.com/aspnet/SignalR/issues/2320
Hi Guys,
I have been testing and have found the following crash whenever a "large" (2MB in my test) amount of data is sent from the server -> client. The crash occurs in the following code within HubConnectionHandler.cs:
I've modified it slightly, but here is my console output for an example crash:
This would then crash the connection (i.e. uncleanly close it for all clients that the file is being pushed to). The test functionality in question is uploading an image to redis (as a blob) over HTTP, then retrieving it via SignalR to the clients. I appreciate a lot has changed, but there was no issue with this in previous (< core 2.1) code. Unsure as to what else i can do here to help but if there's anything more please let me know.
Cheers!
The text was updated successfully, but these errors were encountered: