dotnet / runtime

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

superpmi: `Method X is of low integrity` errors #74596

Open BruceForstall opened 2 years ago

BruceForstall commented 2 years ago

I noticed the Linux-arm64 PMI coreclr_tests collection has 8 cases of:

ERROR: Method 301 is of low integrity.

during the mcs -merge step. These should never occur: they indicate file corruption.

At the end, I see terminate called after throwing an instance of 'PAL_SEHException' which I believe comes from mcs, meaning we're probably not getting the full set of collected MCs into the base.mch file.

I didn't check to see if other collections or platforms have similar errors.

category:eng-sys theme:super-pmi skill-level:intermediate cost:medium impact:medium

ghost commented 2 years ago

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

Issue Details
I noticed the Linux-arm64 PMI coreclr_tests collection has 8 cases of: ``` ERROR: Method 301 is of low integrity. ``` during the `mcs -merge` step. These should never occur: they indicate file corruption. At the end, I see `terminate called after throwing an instance of 'PAL_SEHException'` which I believe comes from `mcs`, meaning we're probably not getting the full set of collected MCs into the base.mch file. I didn't check to see if other collections or platforms have similar errors.
Author: BruceForstall
Assignees: -
Labels: `arch-arm64`, `os-linux`, `area-CodeGen-coreclr`
Milestone: 8.0.0
BruceForstall commented 2 years ago

I see this error in the SuperPMI collect libraries_tests pmi Linux x64 checked job as well (just one, no "terminate" error).

jakobbotsch commented 1 year ago

One thing I have noticed long ago is that we call WriteFile without any synchronization from superpmi-shim-collector. We also assume that WriteFile also writes the entire buffer, even though it can potentially only write parts of it. I'll try to investigate and find the culprit.