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

AzureStorageOrchestrationService - LockNextTaskActivityWorkItem assert failure #1173

Open
KonradCzarny opened this issue Oct 21, 2024 · 1 comment

Comments

@KonradCzarny
Copy link

In one of our orchestrators that is running multiple activities in parallel, we've encountered following warning:

[Warning] Internal assert failure: Work item queue message with ID = {Id} is being processed multiple times concurrently

Activity is being launched via standard TaskOrchestrationContext.CallActivityAsync method. It resulted in orchestrator being stuck in limbo, and after activity ended - not being possible to start next activity from the orchestration queue.

What I have found in the OrchestrationService class, is following piece of code:

                if (!this.activeActivitySessions.TryAdd(message.Id, session))
                {
                    // This means we're already processing this message. This is never expected since the message
                    // should be kept invisible via background calls to RenewTaskActivityWorkItemLockAsync.
                    this.settings.Logger.AssertFailure(
                        this.azureStorageClient.QueueAccountName,
                        this.settings.TaskHubName,
                        $"Work item queue message with ID = {message.Id} is being processed multiple times concurrently.");
                    return null;
                }

According to the comment, this assert should never fail - however it did in our scenario. My question is: any ideas what could be the reason for that, and how to prevent it happening in future?

@cgillum
Copy link
Member

cgillum commented Oct 22, 2024

@KonradCzarny thanks for reporting this. One possible explanation is that the message renewal operation might be failing in the background. What version of the Microsoft.Azure.DurableTask.AzureStorage nuget package are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants