Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] IndexOutOfRangeException in EventSource #23203

Closed
kasobol-msft opened this issue Aug 9, 2021 · 5 comments
Closed

[BUG] IndexOutOfRangeException in EventSource #23203

kasobol-msft opened this issue Aug 9, 2021 · 5 comments
Labels
Azure.Core bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library.

Comments

@kasobol-msft
Copy link
Contributor

Describe the bug

System.Diagnostics.Tracing.EventSourceException : An error occurred when writing to a listener.
----> System.IndexOutOfRangeException : Index was outside the bounds of the array.
 at System.Diagnostics.Tracing.EventSource.DispatchToAllListeners(Int32 eventId, Guid* childActivityID, EventWrittenEventArgs eventCallbackArgs)
   at System.Diagnostics.Tracing.EventSource.WriteToAllListeners(Int32 eventId, UInt32* osThreadId, DateTime* timeStamp, Guid* activityID, Guid* childActivityID, Object[] args)
   at System.Diagnostics.Tracing.EventSource.WriteEventVarargs(Int32 eventId, Guid* childActivityID, Object[] args)
   at System.Diagnostics.Tracing.EventSource.WriteEvent(Int32 eventId, Object[] args)
   at Azure.Core.Diagnostics.AzureCoreEventSource.ErrorResponse(String requestId, Int32 status, String reasonPhrase, String headers, Double seconds)
   at Azure.Core.Pipeline.LoggingPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
   at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted(ValueTask task)
   at Azure.Core.Pipeline.LoggingPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.RedirectPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
   at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted(ValueTask task)
   at Azure.Core.Pipeline.RedirectPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
   at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
   at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted(ValueTask task)
   at Azure.Core.Pipeline.RetryPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipeline.Send(HttpMessage message, CancellationToken cancellationToken)
   at Azure.Storage.Queues.QueueRestClient.Delete(Nullable`1 timeout, CancellationToken cancellationToken) in /_/sdk/storage/Azure.Storage.Queues/src/Generated/QueueRestClient.cs:line 139
   at Azure.Storage.Queues.QueueClient.DeleteInternal(Boolean async, CancellationToken cancellationToken, String operationName) in /_/sdk/storage/Azure.Storage.Queues/src/QueueClient.cs:line 1008
   at Azure.Storage.Queues.QueueClient.DeleteIfExistsInternal(Boolean async, CancellationToken cancellationToken) in /_/sdk/storage/Azure.Storage.Queues/src/QueueClient.cs:line 898
   at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted[T](Task`1 task) in /_/sdk/core/Azure.Core/src/Shared/TaskExtensions.cs:line 33
   at Azure.Storage.Queues.QueueClient.Dele

Expected behavior
No exception

Actual behavior (include Exception or Stack Trace)
Exception being thrown.

To Reproduce
Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)

This seems to be intermittent error that was hit in storage live tests.

Environment:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1038417&view=ms.vss-test-web.build-test-results-tab&runId=22357766&resultId=105598&paneView=debug

image

@kasobol-msft kasobol-msft added Client This issue points to a problem in the data-plane of the library. Azure.Core bug This issue requires a change to an existing behavior in the product in order to be resolved. labels Aug 9, 2021
@christothes
Copy link
Member

christothes commented Feb 2, 2022

Another instance of this:

Failed Catch_Bad_Name_At_IndexTime [63 ms]
Error Message:
 System.Diagnostics.Tracing.EventSourceException : An error occurred when writing to a listener.
----> System.IndexOutOfRangeException : Index was outside the bounds of the array.
Stack Trace:
   at System.Diagnostics.Tracing.EventSource.DispatchToAllListeners(Int32 eventId, Guid* childActivityID, EventWrittenEventArgs eventCallbackArgs)
 at System.Diagnostics.Tracing.EventSource.WriteEventVarargs(Int32 eventId, Guid* childActivityID, Object[] args)
 at Azure.Core.Diagnostics.AzureCoreEventSource.ErrorResponse(String requestId, Int32 status, String reasonPhrase, String headers, Double seconds) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Diagnostics\AzureCoreEventSource.cs:line 98
 at Azure.Core.Pipeline.LoggingPolicy.<ProcessAsync>d__9.MoveNext() in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\Internal\LoggingPolicy.cs:line 107
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Azure.Core.Pipeline.LoggingPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\Internal\LoggingPolicy.cs:line 37
 at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\HttpPipelinePolicy.cs:line 50
 at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\HttpPipelineSynchronousPolicy.cs:line 37
 at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\HttpPipelinePolicy.cs:line 50
 at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\HttpPipelineSynchronousPolicy.cs:line 37
 at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\HttpPipelinePolicy.cs:line 50
 at Azure.Core.Pipeline.RedirectPolicy.<ProcessAsync>d__5.MoveNext() in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\Internal\RedirectPolicy.cs:line 33
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Azure.Core.Pipeline.RedirectPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\Internal\RedirectPolicy.cs:line 174
 at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\HttpPipelinePolicy.cs:line 50
 at Azure.Core.Pipeline.RetryPolicy.<ProcessAsync>d__11.MoveNext() in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\Internal\RetryPolicy.cs:line 61
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Azure.Core.Pipeline.RetryPolicy.<ProcessAsync>d__11.MoveNext() in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\Internal\RetryPolicy.cs:line 96
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Azure.Core.Pipeline.RetryPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\Internal\RetryPolicy.cs:line 37
 at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\HttpPipelinePolicy.cs:line 50
 at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\HttpPipelineSynchronousPolicy.cs:line 37
 at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\HttpPipelinePolicy.cs:line 50
 at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\HttpPipelineSynchronousPolicy.cs:line 37
 at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\HttpPipelinePolicy.cs:line 50
 at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\HttpPipelineSynchronousPolicy.cs:line 37
 at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\HttpPipelinePolicy.cs:line 50
 at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\HttpPipelineSynchronousPolicy.cs:line 37
 at Azure.Core.Pipeline.HttpPipeline.Send(HttpMessage message, CancellationToken cancellationToken) in D:\a\_work\1\s\sdk\core\Azure.Core\src\Pipeline\HttpPipeline.cs:line 178
 at Azure.Storage.Queues.QueueRestClient.Delete(Nullable`1 timeout, CancellationToken cancellationToken) in D:\a\_work\1\s\sdk\storage\Azure.Storage.Queues\src\Generated\QueueRestClient.cs:line 139
 at Azure.Storage.Queues.QueueClient.<DeleteInternal>d__58.MoveNext() in D:\a\_work\1\s\sdk\storage\Azure.Storage.Queues\src\QueueClient.cs:line 1018
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Azure.Storage.Queues.QueueClient.<DeleteIfExistsInternal>d__55.MoveNext() in D:\a\_work\1\s\sdk\storage\Azure.Storage.Queues\src\QueueClient.cs:line 913
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Azure.Storage.Queues.QueueClient.DeleteIfExists(CancellationToken cancellationToken) in D:\a\_work\1\s\sdk\storage\Azure.Storage.Queues\src\QueueClient.cs:line 833
 at Microsoft.Azure.WebJobs.Extensions.Storage.Queues.QueueTests.SetUp() in D:\a\_work\1\s\sdk\storage\Microsoft.Azure.WebJobs.Extensions.Storage.Queues\tests\QueueTests.cs:line 32
--IndexOutOfRangeException
 at Microsoft.Extensions.Logging.LoggerFactory.CreateLoggers(String categoryName)
 at Microsoft.Extensions.Logging.LoggerFactory.CreateLogger(String categoryName)
 at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
 at Microsoft.Extensions.Azure.AzureEventSourceLogForwarder.LogEvent(EventWrittenEventArgs eventData) in D:\a\_work\1\s\sdk\extensions\Microsoft.Extensions.Azure\src\Internal\AzureEventSourceLogForwarder.cs:line 52
 at System.Diagnostics.Tracing.EventSource.DispatchToAllListeners(Int32 eventId, Guid* childActivityID, EventWrittenEventArgs eventCallbackArgs)

azure-sdk pushed a commit to azure-sdk/azure-sdk-for-net that referenced this issue Apr 18, 2023
Feature/cplat 2023 03 01 (Azure#22885)

* copy last version to 2023-03-01 folder

* update version reference in the new folder

* update versions reference in the new folder

* add new readme tag with new version

* sync with updates made to 2022-11-01 version

* fix generation error

* fix duplicate enum name thru c# directive instead.

* make all the changes to this version that was made to the last version (2022-11-01) to address modelvalidation errors

* update

* Revert "update"

This reverts commit 08417d3ed412ab63c7ee7bdb712ad756ded03c97.

* Added $expand option in ListAllVMs and ListAllVMs in RG (Azure#22800)

* Added $expand option in ListAllVMs and ListAllVMs in RG

* Update virtualMachine.json

* dedicatedHost Resize feature (Azure#23268)

* dedicatedHost Resize feature

* DedicatedHost Sku renamed to size and resolved lint errors.

* reviewer comments

* httpMethod fix

* Add property for VM (Azure#22882) (Azure#23329)

Co-authored-by: payalguptapg <126145083+payalguptapg@users.noreply.github.com>

* Add Reapply for VMSS (Azure#22344)

* Add Reapply for VMSS

* Prettier fix

* Update examples

* Address review comments 01

* Use typical resourceGroupName parameter.

* Address review comments - Rename examples

* Remove <br> syntax from many descriptions in CRP swagger files (Azure#23019)

* up to computeRPCommon

* all but computeRPCommons

* computerpcommon

* vmss clean

* common clean

* vmss try n

* trying only \n

* remove \n as it messes with rest docs

* cleanup 2022-11-01 accidents

* cleanups 2023

* remove ID from Update objects that do not have ID (Azure#23078)

* update

* add identifiers

---------

Co-authored-by: Theodore Chang <theodore.l.chang@gmail.com>

* Origin/feature/cplat 2023 03 01 (Azure#23203)

* Update virtualMachine.json

Added missing property for 
Additional properties not allowed: provisionAfterExtensions
Json path: $.value[*].properties.provisionAfterExtensions

* added missing property for provisionAfterExtensions

* add locatoin in VirtualMachineScaleSetVMExtension

* fixed issue of x-ms-mutability

---------

Co-authored-by: Younghyun Kim <younghyunkim@microsoft.com>

* Add securityPostureReference (Azure#23106)

* [RestorePoints] Adding Encryption, Source Details, HyperVGeneration and WriteAccelerated for Restore Point (Azure#23303)

* Restore Point Encryption Details

* Modified descriptions and made DiskRestorePointProperties as input property

* Renaming object and adding type

* Renaming DiskRestorePointProperties

* making DiskRestorePoint.id readOnly

* Modifying reference

* Running Prettier

* Renaming EncryptionType

* Adding HyperVGeneration and WriteAcceleratorEnabled (prchin)

* Add optional parameter hibernate to vmss deallocate api (Azure#23409)

* Add optional parameter hibernate to vmss deallocate api

* Fix with prettier

* update example for vmss deallocate

* Add Spot Related Properties to VMSS PATCH

* prettier and lintDiff suppressions

* retry lintDiff suppression

* lint diff suppression retry

* Add managed identities parameters for blobs, add treatFailureAsDeploymentFailure flag for Run Command (Azure#23557)

* Add managed identities inputs for script, errorBlob, outputBlob

* Add treatFailureAsDeploymentFailure flag

* Update proximityPlacementGroup.json (Azure#23556)

* Update proximityPlacementGroup.json

* Update proximityPlacementGroup.json

* Update proximityPlacementGroup.json

---------

Co-authored-by: Theodore Chang <theodore.l.chang@gmail.com>
Co-authored-by: Kartik Gupta <31189137+Kartik-715@users.noreply.github.com>
Co-authored-by: cakarata <47228825+cakarata@users.noreply.github.com>
Co-authored-by: payalguptapg <126145083+payalguptapg@users.noreply.github.com>
Co-authored-by: Anshul Verma <88476874+AnshulVermaa@users.noreply.github.com>
Co-authored-by: Adam Sandor <adsandor@microsoft.com>
Co-authored-by: younghyun5756 <102988755+younghyun5756@users.noreply.github.com>
Co-authored-by: Younghyun Kim <younghyunkim@microsoft.com>
Co-authored-by: krishnak-msft <127885427+krishnak-msft@users.noreply.github.com>
Co-authored-by: Linu George <127192938+linugeorgeofficial@users.noreply.github.com>
Co-authored-by: vatsan28 <vatsan9228@gmail.com>
Co-authored-by: Viv Lingaiah <viv.lingaiah@gmail.com>
Co-authored-by: Micah McKittrick <32313503+mimckitt@users.noreply.github.com>
@pallavit
Copy link
Contributor

@annelo-msft , @christothes , @JoshLove-msft have we seen any instances of it lately?

@christothes
Copy link
Member

I'm not aware of any.

Copy link

github-actions bot commented Mar 4, 2024

Hi @kasobol-msft, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

@jsquire
Copy link
Member

jsquire commented Mar 12, 2024

No instances of this have been reported in 2+ years; closing.

@jsquire jsquire closed this as not planned Won't fix, can't repro, duplicate, stale Mar 12, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

No branches or pull requests

4 participants