question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[QUERY] Service Bus - OperationCanceledException on RenewLock

See original GitHub issue

Query/Question Sometimes I got “The operation was canceled.” in my SubscriptionClient with SessionHandler. I could not find any reasons for that. Could you please describe the case?

Please let me know if I need provide more info

Microsoft.Azure.ServiceBus.ServiceBusException: at Microsoft.Azure.ServiceBus.MessageSession+<OnRenewSessionLockAsync>d__14.MoveNext (Microsoft.Azure.ServiceBus, Version=5.1.2.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.ServiceBus.MessageSession+<OnRenewSessionLockInstrumentedAsync>d__18.MoveNext (Microsoft.Azure.ServiceBus, Version=5.1.2.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.ServiceBus.SessionReceivePump+<RenewSessionLockTaskAsync>d__24.MoveNext (Microsoft.Azure.ServiceBus, Version=5.1.2.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c) Inner exception System.OperationCanceledException handled at Microsoft.Azure.ServiceBus.MessageSession+<OnRenewSessionLockAsync>d__14.MoveNext: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.Amqp.AsyncResult.End (Microsoft.Azure.Amqp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at Microsoft.Azure.ServiceBus.Core.MessageReceiver+<>c__DisplayClass86_0.<ExecuteRequestResponseAsync>b__1 (Microsoft.Azure.ServiceBus, Version=5.1.2.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.ServiceBus.Core.MessageReceiver+<ExecuteRequestResponseAsync>d__86.MoveNext (Microsoft.Azure.ServiceBus, Version=5.1.2.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.ServiceBus.MessageSession+<OnRenewSessionLockAsync>d__14.MoveNext (Microsoft.Azure.ServiceBus, Version=5.1.2.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c)

There is similar issue with MessagePumpTaskAsync. It was fixed by ignoring the OperationCanceledException. Can I also ignore such exceptions or is it critical for RenewLock?

Environment:

  • Name and version of the Library package used: Microsoft.Azure.ServiceBus 5.1.3
  • Hosting platform or OS and .NET runtime version (dotnet --info output for .NET Core projects): 5.0.203 Windows
  • IDE and version : Visual Studio 16.9.6

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jsquirecommented, Aug 23, 2021

Hi @Marusyk. Yes; @shankarsama’s team owns the Service Bus service and the generation of the SDK that you’re asking about. Looping in a few of the other team members in case they’re available to assist.

//cc: @DorothySun216, @bainian12345, @vinaysurya, @yvgopal

1reaction
jsquirecommented, Jul 14, 2021

Thank you for your feedback. Tagging and routing to the team best able to assist.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RenewLock error using ServiceBus SubscriptionClient
My Topic entity within ServiceBus is called "test" and I have a subscription also called "test" (full path would be "test/subscriptions/test").
Read more >
Azure Service Bus client library for .NET
It offers automatic completion of processed messages, automatic message lock renewal, and concurrent execution of user specified event handlers.
Read more >
Azure Service Bus end-to-end tracing and diagnostics
Overview of Service Bus client diagnostics and end-to-end tracing (client through all the services that are involved in processing.)
Read more >
Azure ServiceBus - Apache Camel
Query Parameters (25 parameters) ; scheduledEnqueueTime (producer). Sets OffsetDateTime at which the message should appear in the Service Bus queue or topic.
Read more >
Azure Service Bus and Logic App integration Pattern using ...
Logic App atomically retrieves and locks a message from a queue or subscription for processing. The message is now guaranteed not to be ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found