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

SQSRequestHandler.ProcessResponse exceptions #2811

Closed
indy-singh opened this issue Oct 7, 2024 · 3 comments · Fixed by #2833
Closed

SQSRequestHandler.ProcessResponse exceptions #2811

indy-singh opened this issue Oct 7, 2024 · 3 comments · Fixed by #2833
Labels
bug Something isn't working community To tag external issues and PRs

Comments

@indy-singh
Copy link

Description
While grepping through logs for this issue. I noticed that this exception is very prevalent (well 1660 lines in 8,216,840 log lines).

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at NewRelic.Providers.Wrapper.AwsSdk.SQSRequestHandler.<>c__DisplayClass2_0.<HandleSQSRequest>g__ProcessResponse|1(Task responseTask)
   at NewRelic.Agent.Extensions.Providers.Wrapper.Delegates.<>c__DisplayClass8_1`1.<OnSuccess>g__EndSegmentWithPossibleException|1()
   at NewRelic.Agent.Extensions.Providers.Wrapper.IAgentWrapperExtensions.HandleExceptions(IAgent agent, Action action)

Expected Behavior
An exception should not be thrown.

Steps to Reproduce
Any app that listens to SQS in the background.

Your Environment
Windows Server 2022
dotnet8
On-prem
Hosted via IIS
NewRelicDotNetAgent_10.30.0_x64.msi (deployed using DSC: ADDLOCAL=NETCoreSupport)
newrelic-infra-amd64.1.57.1.msi (deployed using DSC)

I think the related method is

SqsHelper.AcceptDistributedTraceHeaders(transaction, receiveMessageResponse.Messages[0].MessageAttributes);

@indy-singh indy-singh added the bug Something isn't working label Oct 7, 2024
@workato-integration
Copy link

@github-actions github-actions bot added the community To tag external issues and PRs label Oct 7, 2024
@nrcventura
Copy link
Member

Thank you for submitting this bug and for the analysis that you have already done. I think that you are correct about one of the lines where this error can occur (the other line is for the async version of the method).

@indy-singh
Copy link
Author

Happy to send in a PR if you want?

Cheers,
Indy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community To tag external issues and PRs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants