Skip to content

[BUG] Azure.Extensions.AspNetCore.DataProtection.Keys Heavy load causes blocked threads #40174

@kimbell

Description

@kimbell

Library name and version

Azure.Extensions.AspNetCore.DataProtection.Keys 1.2.2

Describe the bug

We are using this together with ASP.NET Cookie authentication. One of our applications receives very many requests. When we restarted this application, it stopped responding. We took a memory dump, and it showed that all threads were waiting on

return Task.Run(() => DecryptAsync(encryptedElement)).GetAwaiter().GetResult();

https://github.com/davidfowl/AspNetCoreDiagnosticScenarios/blob/master/AsyncGuidance.md#avoid-using-taskresult-and-taskwait

Expected behavior

It should handle heavy load during startup.

Actual behavior

All threads were blocked.

Reproduction Steps

NA

Environment

.NET 7

Metadata

Metadata

Assignees

Labels

ClientThis issue is related to a non-management packageExtensionsASP.NET Core extensionscustomer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions