-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
CoreCLR fails to load if lttng fails #5515
Comments
LTTng is already a soft-dependency. If it's not installed you should get no output. This is likely specific to Ubuntu for Windows. |
To clarify my earlier comment, you should get no output on LTTng and the app should run as expected. |
ensure that at line : https://github.com/dotnet/coreclr/blob/master/src/pal/src/misc/tracepointprovider.cpp#L106, the load fails for your case. it should not be loading libcoreclrtraceptprovider.so for WSL, probably the load emulation is not as strict on linux |
Ah, yes, this is happening because I followed the instructions to build CoreCLR, and thus installed the It would be nice to be able to build and run CoreCLR, though. :) |
@joshfree, we've actually already hardened this scenario a bunch to ensure that if LTTng isn't present, that everything goes well. Per @ericeil's comment above, LTTng was on the machine as it is a build-time dependency, but something failed at runtime. Removing LTTng from the machine made this error go away. We can debug this and try to figure out if there is a nice way to work around it, but I'm not sure that there will be as the errors are already in LTTng code, not CoreCLR code. |
@joshfree to make it work out of the box, possibly we could do one of 3 things:
|
cc @gkhanna79 |
@ericeil Even with It sounds like on your end you have things running now, so was there some other step that I missed? I have also already run |
@ramarag Something like Option 3 but instead we do could a check to see if lttng is enabled? There are multiple reasons why depending on lttng during the early boot process isn't necessarily desirable. I think the fact that file exists is not enough and we need another indicator that we should even search for the libcoreclrtraceptprovider.so @mikeschuld For the time being, just delete the libcoreclrtraceptprovider.so from your directory and things will work. |
Today, LTTng has a requirement that we load at start-up. If we don’t do this (e.g. delete the tracepoint provider lib), then all tracepoints become no-ops for the life of the process. So, we load at start-up so that we have the ability to profile later if we need to. From: Mukul Sabharwal [mailto:notifications@github.com] @ramaraghttps://github.com/ramarag Something like Option 3 but instead we do could a check to see if lttng is enabled? There are multiple reasons why depending on lttng during the early boot process isn't necessarily desirable. I think the fact that file exists is not enough and we need another indicator that we should even search for the libcoreclrtraceptprovider.so @mikeschuldhttps://github.com/mikeschuld For the time being, just delete the libcoreclrtraceptprovider.so from your directory and things will work. — |
Based upon this discussion, it appears that we should understand why loading libcoreclrtraceptprovider.so is different from between WSL and Ubuntu and drive the discussion from there. Unless we want to treat WSL as a different platform target (e.g. known as RID - runtime identifier - in nuget parlance) from Ubuntu, we should continue to binplace libcoreclrtraceptprovider.so as the file, in addition to getting binplaced, is packaged in the Ubuntu nuget package for CoreCLR as well. If WSL can fail the load, then libcoreclr execution should be able to continue normally. @dethoma Are you the right person to look into the load issue? |
CC @janvorli |
We don't want to treat WSL as a different platform target (with a separate RID) from Ubuntu. I believe given the investigation that this bug should be moved to https://github.com/Microsoft/BashOnWindows/issues for the BashOnWindows team to resolve. |
@ramarag Can you please move the issue to the other repo? |
closing this ans opening in WSL team's issues [https://github.com/microsoft/WSL/issues/302] |
If running in an environment where lttng does not work, CoreCLR fails to load, with an error message like this:
This currently happens in the "Ubuntu on Windows" environment in the latest Windows 10 preview, for example. This issue and #5478 appear to be the only blockers to basic managed code execution in that environment.
As a workaround, it seems to work if I delete
libcoreclrtraceptprovider.so
.Since LTTng is not critical functionality for CoreCLR (application code will work just fine without it), it would be nice if we could detect this failure and handle it more gracefully, perhaps by simply disabling LTTng usage for the process.
@brianrob @ramarag
The text was updated successfully, but these errors were encountered: