-
Notifications
You must be signed in to change notification settings - Fork 4.9k
[Snap] .NET Core 3.0 RC1 console app (and webapp) does not work under Linux #3775
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
Comments
Does "strace" suggest anything? |
Thanks. I didn't know that trace was a thing. However this is not the result I expected. dotnet run - gives nothing sudo dotnet run - gives nothing sudo strace -o trace2.log dotnet bin/Debug/netcoreapp2.0/strace-sample2.dll - makes it work! sudo dotnet run bin/Debug/netcoreapp3.0/strace-sample2.dll - gives nothing dotnet run bin/Debug/netcoreapp3.0/strace-sample2.dll - gives nothing Running the trace makes it work, but all options not using the trace don't work. So I assume the trace is going to suggest everything is good? However that trace does mean nothing to me. Take a look and let me know. Just a little bit of extra information, this time I had a disk space problem with my virtual machine, so I deleted it and started again with a fresh KUbuntu 19.04 install. This is very easy to replicate. |
I tried with a clean install of KUbuntu 19.04 on VirtualBox (I chose the minimum installation). Then I installed dotnet-sdk with:
Then I ran your commands:
And it displayed "Hello World!" as expected. Is there something you're doing differently? |
Ok I reproduce it now. I did two things: I updated the system and I rebooted. Not sure which step did the trick. Interestingly, |
It's starting to look crazy. If I create a folder named "1" at the root ( I haven't been able to figure out the error yet. I see nothing obvious with strace (well there's 1MB of traces so it's hard to find the relevant parts), and for some reason |
Taking the dotnet sdk out of the equation, the application seems to crash if less than 7 folders deep
Not sure where the segmentation fault comes from, lldb has no symbols for that frame:
It looks like we're trying to invoke a null pointer somewhere. Since calling Edit: actually, we got there following a |
Thanks. I did not realise there would be a difference between this, which doesn't work, dotnet run bin/Debug/netcoreapp3.0/strace-sample2.dll And this which does work, dotnet bin/Debug/netcoreapp3.0/strace-sample2.dll At least now there is a work around, I will try again with the beta channel and see if it works with my proper app. Otherwise when the underlying issue is fixed I am happy to upgrade and give it another go. |
/cc @MichaelSimons @leecow, an issue labeled for the snap, however, based on @kevingosse's last comment |
Well there's two things:
|
Following the discussion https://github.com/dotnet/core-setup/issues/5186, I tried dumping the RPATH on the ELF loader:
The faulty bit seems to be If $ORIGIN is less than 7 folders deep, then As to know why using Edit: For what it's worth, When not using the snap version of the SDK, then the RPATH of the output is just |
Read this, https://askubuntu.com/questions/1131867/dotnet-command-not-found-after-installing-using-snap I did add an alias like that to get the command dotnet working, sudo snap alias dotnet-sdk.dotnet dotnet But I did try it on a clean installation running without the alias, and it still has the same issue. So it is something about the snap rather than the alias specifically. |
Hi, same issue here but with stable release. Could somebody give me a bit more information on how the |
@deinok, there are snapcraft files checked in at https://github.com/dotnet/core-setup/tree/master/src/pkg/packaging/snaps. Note that they aren't built by CI or official builds, and they're kept up to date manually. I wouldn't expect the overall strategy to change much between 3.0 builds, however, so there may be some good insights in there. @leecow would know for sure. |
@dagood For what I see, seems like the process is just dump the published precompiled binaries inside the Snap package, so the issue is probably due something regarding snap. Could you point me on what folder should I apply changes in order to fix the next dotnet-sdk snap release? I supose |
dotnet-sdk is the one to use at the moment. Based on this issue and another related conversation, we'll be re-working the package mix soon (possibly this week). |
I wanted to try the latest preview, and it has the same problem,
Gives nothing. However this works fine,
Going back to dotnet-sdk 3.1.300 and doing the same,
gives me,
This works,
I have switched to Kubuntu 20.04 these days, not that it matters. This appears to be a snap only problem. Grabbing the latest tar.gz from master works fine. sdk-5.0.100-preview.6.20275.9-linux-x64 - is all good I recently switched my server to the snap dotnet 3.1 package without thinking about this issue. Everything is running, but I realised it is because I am starting applications like this in a shell script,
There are some good work arounds for this issue which is the main thing for now. I have 3 linux machines, so let me know if there is anything I can help with, e.g. testing etc. Or if there are other linux specific issues you want help with. |
FYI, folks, this is still an issue with the latest stable .NET 5 SDK from Snap. |
[Triage] Closing Snap issues to reflect current priorities. |
I am using .NET Core from a snap package on KUbuntu. I switched to the beta and edge channels to upgrade from .NET Core 2.2 to .NET Core 3.0.
When on beta or edge my console app doesn't work, whereas it was working perfectly under .NET Core 2.2.
I decided to go back to basics. Create a new console app to see what would happen,
mkdir testdotnet
cd testdotnet
dotnet new console
dotnet build
dotnet run
It runs for a second, and gives nothing. No output, whereas I would normally expect,
Hello World!
My actual app does the same thing. Running the app doesn't actually run any code. When I change back to the stable channel, everything works.
Please let me know what additional information you need. I ran this,
dotnet run -v diag
But the output was no different (as far as I could see) between .NET Core 2.2 and .NET Core 3.0, it just shows the build process that was run first. However if that is useful or something similar then let me know.
Something else, I also tried this,
dotnet new webapp
dotnet build
dotnet run
And it does the same. If you want me to run this against a different version of Linux, or a clean version of Linux I can do do.
The text was updated successfully, but these errors were encountered: