Under high load of my development environment the StackExchange.Redis PhysicalConnection class on internal void WriteHeader causes a uncaught exception without any clue. I am using the latest redis release on Ubuntu and the latest nuget version of stackexchange redis
Line 832 -> var span = _ioPipe!.Output.GetSpan(commandBytes.Length + 8 + Format.MaxInt32TextLen + Format.MaxInt32TextLen);
It seems like for no explainable reason the variable _ioPipe is null which causes the exception
Exception data ↓↓
| |
Name |
Value |
Type |
| ◢ |
$exception |
{"Object reference not set to an instance of an object."} |
System.NullReferenceException |
| |
▶ Data |
{System.Collections.ListDictionaryInternal} |
System.Collections.IDictionary {System.Collections.ListDictionaryInternal} |
| |
HResult |
-2147467261 |
int |
| |
HasBeenThrown |
true |
bool |
| |
HelpLink |
null |
string |
| |
▶ InnerException |
null |
System.Exception |
| |
Message |
"Object reference not set to an instance of an object." |
string |
| |
SerializationStackTraceString |
" at StackExchange.Redis.PhysicalConnection.WriteHeader(RedisCommand command, Int32 arguments, CommandBytes commandBytes) in /_/src/StackExchange.Redis/PhysicalConnection.cs:line 809" |
string |
| |
SerializationWatsonBuckets |
null |
object |
| |
Source |
"StackExchange.Redis" |
string |
| |
StackTrace |
" at StackExchange.Redis.PhysicalConnection.WriteHeader(RedisCommand command, Int32 arguments, CommandBytes commandBytes) in /_/src/StackExchange.Redis/PhysicalConnection.cs:line 832" |
string |
| |
▶ TargetSite |
{Void WriteHeader(StackExchange.Redis.RedisCommand, Int32, StackExchange.Redis.CommandBytes)} |
System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo} |
| |
_HResult |
-2147467261 |
int |
| |
▶ _data |
{System.Collections.ListDictionaryInternal} |
System.Collections.IDictionary {System.Collections.ListDictionaryInternal} |
| |
_dynamicMethods |
null |
object[] |
| |
_exceptionMethod |
null |
System.Reflection.MethodBase |
| |
_helpURL |
null |
string |
| |
▶ _innerException |
null |
System.Exception |
| |
_ipForWatsonBuckets |
0x00007ffa328be781 |
System.UIntPtr |
| |
_message |
"Object reference not set to an instance of an object." |
string |
| |
_remoteStackTraceString |
null |
string |
| |
_source |
null |
string |
| |
▶ _stackTrace |
{sbyte[48]} |
byte[] {sbyte[]} |
| |
_stackTraceString |
null |
string |
| |
_watsonBuckets |
null |
byte[] |
| |
_xcode |
-532462766 |
int |
| |
_xptrs |
0x0000000000000000 |
System.IntPtr |
| |
▶ Static members |
|
|
Callstack data ↓↓
StackExchange.Redis.dll!StackExchange.Redis.PhysicalConnection.WriteHeader(StackExchange.Redis.RedisCommand command, int arguments, StackExchange.Redis.CommandBytes commandBytes) Line 832 C#
StackExchange.Redis.dll!StackExchange.Redis.Message.CommandValueValueMessage.WriteImpl(StackExchange.Redis.PhysicalConnection physical) Line 1503 C#
StackExchange.Redis.dll!StackExchange.Redis.Message.WriteTo(StackExchange.Redis.PhysicalConnection physical) Line 699 C#
StackExchange.Redis.dll!StackExchange.Redis.PhysicalBridge.WriteMessageToServerInsideWriteLock(StackExchange.Redis.PhysicalConnection connection, StackExchange.Redis.Message message) Line 1508 C#
StackExchange.Redis.dll!StackExchange.Redis.PhysicalBridge.WriteMessageInsideLock(StackExchange.Redis.PhysicalConnection physical, StackExchange.Redis.Message message) Line 713 C#
StackExchange.Redis.dll!StackExchange.Redis.PhysicalBridge.WriteMessageTakingWriteLockAsync_Awaited(System.Threading.Tasks.Task<bool> pending, StackExchange.Redis.PhysicalConnection physical, StackExchange.Redis.Message message) Line 1277 C#
[Resuming Async Method]
System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<StackExchange.Redis.WriteResult>.AsyncStateMachineBox<StackExchange.Redis.PhysicalBridge.<WriteMessageTakingWriteLockAsync_Awaited>d__106>.ExecutionContextCallback(object s) Line 287 C#
System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 183 C#
System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<StackExchange.Redis.WriteResult>.AsyncStateMachineBox<StackExchange.Redis.PhysicalBridge.<WriteMessageTakingWriteLockAsync_Awaited>d__106>.MoveNext(System.Threading.Thread threadPoolThread) Line 324 C#
System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<StackExchange.Redis.WriteResult>.AsyncStateMachineBox<StackExchange.Redis.PhysicalBridge.<WriteMessageTakingWriteLockAsync_Awaited>d__106>.MoveNext() Line 302 C#
System.Private.CoreLib.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__12_0(System.Action innerContinuation, System.Threading.Tasks.Task innerTask) Line 301 C#
System.Private.CoreLib.dll!System.Threading.Tasks.AwaitTaskContinuation.System.Threading.IThreadPoolWorkItem.Execute() Line 647 C#
System.Private.CoreLib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Line 924 C#
System.Private.CoreLib.dll!System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() Line 77 C#
[Async Call Stack]
[Async] StackExchange.Redis.dll!StackExchange.Redis.ServerEndPoint.WriteDirectOrQueueFireAndForgetAsync.__Awaited|131_0<bool>(System.Threading.Tasks.ValueTask<StackExchange.Redis.WriteResult> l_result) Line 848 C#
[Async] StackExchange.Redis.dll!StackExchange.Redis.ServerEndPoint.HandshakeAsync(StackExchange.Redis.PhysicalConnection connection, StackExchange.Redis.LogProxy log) Line 930 C#
Under high load of my development environment the StackExchange.Redis PhysicalConnection class on internal void WriteHeader causes a uncaught exception without any clue. I am using the latest redis release on Ubuntu and the latest nuget version of stackexchange redis
Line 832 -> var span = _ioPipe!.Output.GetSpan(commandBytes.Length + 8 + Format.MaxInt32TextLen + Format.MaxInt32TextLen);
It seems like for no explainable reason the variable _ioPipe is null which causes the exception
Exception data ↓↓
Callstack data ↓↓