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] Microsoft.IdentityModel.Protocols.ConfigurationManager.UpdateCurrentConfiguration blocks the system #2959

Closed
13 tasks
jw444 opened this issue Oct 31, 2024 · 2 comments
Labels
More info needed Customer has been asked for more information

Comments

@jw444
Copy link

jw444 commented Oct 31, 2024

Which version of Microsoft.IdentityModel are you using?
8.0.2

Note that to get help, you need to run the latest version.

Where is the issue?

  • M.IM.JsonWebTokens
  • M.IM.KeyVaultExtensions
  • M.IM.Logging
  • M.IM.ManagedKeyVaultSecurityKey
  • [X ] M.IM.Protocols
  • M.IM.Protocols.OpenIdConnect
  • M.IM.Protocols.SignedHttpRequest
  • M.IM.Protocols.WsFederation
  • M.IM.TestExtensions
  • M.IM.Tokens
  • M.IM.Tokens.Saml
  • M.IM.Validators
  • M.IM.Xml
  • S.IM.Tokens.Jwt
  • Other (please describe)

Is this a new or an existing app?
a. The app is in production and I have upgraded to a new version of Microsoft.IdentityModel.*

We host a web service (CSES) on Azure. After a recent upgrade of the Microsoft.IdentityModel packages, our service became irresponsive when the load is high. The dump shows that most of the thread (more than 3000) are stuck waiting for something. Here is the call stack:

ntdll.dll!NtWaitForMultipleObjects()    Unknown

KERNELBASE.dll!WaitForMultipleObjectsEx() Unknown
[Managed to Native Transition]
mscorlib.dll!System.Threading.ManualResetEventSlim.Wait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Unknown
mscorlib.dll!System.Threading.Tasks.Task.SpinThenBlockingWait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Unknown
mscorlib.dll!System.Threading.Tasks.Task.InternalWait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Unknown
mscorlib.dll!System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task) Unknown
[Waiting on Async Operation, double-click or press enter to view Async Call Stacks]
Microsoft.IdentityModel.Protocols.dll!Microsoft.IdentityModel.Protocols.ConfigurationManager<Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfiguration>.UpdateCurrentConfiguration() Line 320 C#
mscorlib.dll!System.Threading.Tasks.Task.Execute() Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot) Unknown
mscorlib.dll!System.Threading.Tasks.Task.ExecuteEntry(bool bPreventDoubleExecution) Unknown
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Unknown
[Native to Managed Transition]
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknown

Is this a known issue? Any solutions?
We are running .net framework 4.7.2. The version for Microsoft.IdentityModel.Protocols.dll is 8.0.2.

@pmaytak pmaytak added More info needed Customer has been asked for more information and removed needs attention untriaged labels Nov 5, 2024
@pmaytak
Copy link
Contributor

pmaytak commented Nov 5, 2024

@jw444 This may have been fixed in 8.1.1. Can you try to repro with the latest 8.2.0?

@jw444
Copy link
Author

jw444 commented Nov 15, 2024

Thank you @pmaytak. I've upgraded to 8.2.0, and the tests so far seem to show that the issue is indeed fixed.

@pmaytak pmaytak closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
More info needed Customer has been asked for more information
Projects
None yet
Development

No branches or pull requests

2 participants