.NET 6 Preview 5 for Linux was built with PGO enabled, causing it to litter default.profraw files
See original GitHub issueOn Ubuntu 20.04, using .NET 6 Preview 5 (or Preview 6) is causing default.profraw
files to appear all over my project and bogus “LLVM Profile Error” messages to print to my console wherever I run dotnet
commands. I don’t normally run .NET Previews on Linux, but I assume this is not expected.
This seems to be occurring because the preview release of the SDK has PGO enabled via Clang’s -fcs-profile-generate
option. Ideally this would not be the case for the published preview builds.
I unfortunately cannot inspect the actual contents of the profiles using llvm-profdata show
due to a version mismatch. (Manually reading the file’s header in a hex editor suggests they’re from something built with LLVM 9 or older.) However I can infer it’s caused by the .NET Preview because they don’t appear if I disable previews in global.json
:
In case it matters, I installed the .NET preview using these instructions. Let me know if you need any further details from me!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:10 (8 by maintainers)
Top GitHub Comments
@Redfoggg If you use the tar.gz files instead of the deb/RPMs, those should contain the proper preview binaries.
Found it: this is actually in the runtime build. It looks like packaging debs and rpms is at a separate post-step in publishing.
https://github.com/dotnet/runtime/blob/f399076cb971fcfdab397d8b3786f321acb4b4d5/eng/pipelines/installer/jobs/base-job.yml#L429
The PGO builds disable building the installers, but these steps come along after and crack open the zip file created from earlier. Since this step is included in the PGO build, it’s packaging up the PGO bits and publishing with the exact same name as the non-PGO bits.
When they get published, this creates a race condition where whoever publishes first wins.
Simple fix is to disable this step for PGO, but I’d like to also find some way to prevent the PGO build from building extra things by default.