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

Linux: "LLVM Profile Error" written to stderr when running unit tests #202

Closed
PathogenDavid opened this issue Jul 6, 2021 · 3 comments
Closed
Labels
Area-Translation Issues concerning the translation from libclang into Biohazrd Concept-OutputFriendliness Issues concerning the friendliness of using the Biohazrd output External Issues which represent work which affects Biohazrd but needs to happen outside of Biohazrd Platform-Linux Issues specific to Linux

Comments

@PathogenDavid
Copy link
Member

The following message is printed to stderr many times after running unit tests:

LLVM Profile Error: Failed to write file "default.profraw": Permission denied

Searching this error does not reveal anything particularly relevant or useful at a glance, everything's about some setting in Xcode.

This doesn't have any negative impact on actual Biohazrd operation, but it's annoying. Also in theory it might actually write this file to undesired places if it was possible. (It's not clear why permission is being denied in this case.) Additionally if Clang is actually putting extra effort into capturing some sort of profiling data we don't want it to do that.

TODO: Determine if this affects generators too. (Right now I'm only running the tests.)

@PathogenDavid PathogenDavid added Area-Translation Issues concerning the translation from libclang into Biohazrd Concept-OutputFriendliness Issues concerning the friendliness of using the Biohazrd output Platform-Linux Issues specific to Linux labels Jul 6, 2021
@PathogenDavid
Copy link
Member Author

image

lol, like I was saying.

Also the reason the permission is getting denied is probably because we have multiple instances of Clang/LLVM running in the same process and only one of them gets the lock on the file.

With that I realized I never searched for just default.profraw on its own. Searching that brings up all kinds of weird issues. It's not super clear where the fault lies. Is libclang trying to create a PGO file for the library we're processing or did I build libclang with PGO enabled?

@PathogenDavid
Copy link
Member Author

This actually isn't coming from libclang-pathogen because I accidentally ran all the tests without it and something was still trying to write them. I'm running the .NET preview, so maybe that's in? If so, I'm surprised there aren't issues about it on the runtime repo.

@PathogenDavid
Copy link
Member Author

Yup, it was the .NET Preview, more details here: dotnet/sdk#18829

@PathogenDavid PathogenDavid added the External Issues which represent work which affects Biohazrd but needs to happen outside of Biohazrd label Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Translation Issues concerning the translation from libclang into Biohazrd Concept-OutputFriendliness Issues concerning the friendliness of using the Biohazrd output External Issues which represent work which affects Biohazrd but needs to happen outside of Biohazrd Platform-Linux Issues specific to Linux
Projects
None yet
Development

No branches or pull requests

1 participant