dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.54k stars 4.54k forks source link

CILJit::compileMethod :: Slow processing #103751

Open TuniDev83 opened 1 week ago

TuniDev83 commented 1 week ago

Greeting,

We are using Azure WebApp, with windows system and .Net8 Randomly, some response from our API suck and take time because of CILJit::compileMethod

Is there any recommendation to solve this issue. Thank's

image

En3Tho commented 1 week ago

Can you export this graph somehow (text maybe)? Or at least jit related parts.

TuniDev83 commented 1 week ago

Sorry, from Azure I'm not able to do any export for such data, but there is something got my attention. Inside CILJit::compileMethod (deep level, there is waiting). I'm not able to know for what!!!

image

EgorBo commented 1 week ago

Looks like a dead-lock in EEJitManager::allocCode (on m_CodeHeapCritSec lock) ? 🤔 cc @dotnet/jit-contrib

dotnet-policy-service[bot] commented 1 week ago

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.

AndyAyersMS commented 1 week ago

Might be the same issue as in https://github.com/dotnet/runtime/issues/102858

ken-swyfft commented 1 week ago

One way to troubleshoot this would be to disable the Azure Application Insights Profiler - see this SO post here: https://stackoverflow.com/a/78524471/68231.

We were having a similar (same?) problem, where certain API calls to our website would randomly take 100-1000 times as long as they should. Turning off the Application Insights Profiler fixed it immediately. I think ours was the specific problem that kicked off #102858.

JulieLeeMSFT commented 1 week ago

@brianrob, PTAL.

brianrob commented 1 week ago

Based on what I can see in the screenshot, I expect this is a dupe of https://github.com/dotnet/runtime/issues/102858.

brianrob commented 1 week ago

@pharring, does this look like the same issue we looked at regarding rundown?