runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Fix VirtualCallStubManager stats capturing on EE shutdown

Open yurai007 opened this issue 1 year ago • 2 comments
trafficstars

Before this change logging stats to StubLog file doesn't work because on EE shutdown we don't shut down manager. Since it's only about logging we can perform uninit earlier.

Part of https://github.com/dotnet/runtime/issues/84834, cc @dotnet/samsung

yurai007 avatar May 10 '24 10:05 yurai007

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

Before this change logging stats to StubLog file doesn't work because on EE shutdown we don't shut down manager

What is the exact situation where it does not work? Is the whole block with the call unreachable?

jkotas avatar May 10 '24 15:05 jkotas

Before this change logging stats to StubLog file doesn't work because on EE shutdown we don't shut down manager

What is the exact situation where it does not work? Is the whole block with the call unreachable?

I can explain giving a bit more background. Couple of weeks ago I tried capture VirtualCallStubManager stats, however I noticed that only empty StubLog was created. It turned out that whole block in EEShutDownHelper was bypassed because fIsDllUnloading was set to false. It happened on both RISC-V and x64 platforms.

yurai007 avatar May 11 '24 09:05 yurai007

Hmm, you are right. We do not seem to call this with fIsDllUnloading=true on Unix and so this block is never executed. @janvorli It sounds like another corner case shutdown bug that we have inherited from framework.

@yurai007 For this specific fix, could please move this logging call and also WriteJitHelperCountToSTRESSLOG to be right after Interpreter::PrintPostMortemData above? PrintPostMortemData is similar kind of logging, so we should have all those calls together.

jkotas avatar May 11 '24 17:05 jkotas