sentry-dotnet
sentry-dotnet copied to clipboard
Profiling logs warning in failing to process sample due to OOM
Repro: This commit: bruno-garcia/cloudflare-dynamic-dns@8d19d1b
(#2)
It's a rather small app. The published app (i'm testing publish) has 68 MB untrimmed. Includes the runtime (PublishSingleFile=true).
A profile actually gets captured, but I get a lot of warnings (do I miss some samples?):
Parts of the log:
Debug: De-queueing event 9f6bc857fe10430a8b79cd2c03735dde
Debug: Signaling flush completed.
Debug: Successfully flushed all events up to call to FlushAsync.
Warning: Failed to process a profile sample.
System.OutOfMemoryException: Array dimensions exceeded supported range.
at System.Array.Resize[T](T[]& array, Int32 newSize)
at Sentry.Internal.GrowableArray`1.Realloc(Int32 minSize)
at Sentry.Internal.GrowableArray`1.Reserve(Int32 size)
at Sentry.Internal.SparseScalarArray`1.set_Item(Int32 index, T value)
at Sentry.Profiling.SampleProfileBuilder.AddStackTrace(CallStackIndex callstackIndex)
at Sentry.Profiling.SamplingTransactionProfiler.OnThreadSample(TraceEvent data)
Warning: Failed to process a profile sample.
System.OutOfMemoryException: Array dimensions exceeded supported range.
at System.Array.Resize[T](T[]& array, Int32 newSize)
at Sentry.Internal.GrowableArray`1.Realloc(Int32 minSize)
at Sentry.Internal.GrowableArray`1.Reserve(Int32 size)
at Sentry.Internal.SparseScalarArray`1.set_Item(Int32 index, T value)
at Sentry.Profiling.SampleProfileBuilder.AddStackTrace(CallStackIndex callstackIndex)
at Sentry.Profiling.SamplingTransactionProfiler.OnThreadSample(TraceEvent data)
... goes on for around 30 times
Warning: Failed to process a profile sample.
System.OutOfMemoryException: Array dimensions exceeded supported range.
at System.Array.Resize[T](T[]& array, Int32 newSize)
at Sentry.Internal.GrowableArray`1.Realloc(Int32 minSize)
at Sentry.Internal.SparseScalarArray`1.set_Item(Int32 index, T value)
at Sentry.Profiling.SampleProfileBuilder.AddStackFrame(CodeAddressIndex codeAddressIndex)
at Sentry.Profiling.SampleProfileBuilder.CreateStackTrace(CallStackIndex callstackIndex)
at Sentry.Profiling.SampleProfileBuilder.AddStackTrace(CallStackIndex callstackIndex)
at Sentry.Profiling.SamplingTransactionProfiler.OnThreadSample(TraceEvent data)
Info: AppDomain process exited: Disposing SDK.
Info: Disposing the Hub.
Debug: Successfully flushed all events up to call to FlushAsync.
On another run I saw:
Debug: De-queueing event 62324ea24ad6400d924c700a618e5b6b
Debug: Envelope handed off to transport (event ID: 'd367de8effc743899fd175298b4562b9'). 1 items in queue.
Warning: CollectAsync timed out after 1 second. Were there any samples collected?
Debug: Envelope 'd367de8effc743899fd175298b4562b9' successfully sent. Content:
... Seemed to include stacks
"stacks":[[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],[17,18,19,20,21,22,23,24],[25,26,27,22,23,24],[17,18,19,20,21,22,23,24],[17,18,19,20,21,22,23,24],[25,26,28,22,23,24],[29,30,31,23,24],[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,6