-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
.NET runtime on RPI - Segmentation fault #3013
Comments
There is a decent chance this is because you don't have to the required apt-get packages installed. Take a look here to see the list of packages you should add to your list in your initial apt-get command. They names of the packages may vary slightly depending on distro. https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x |
In case you didn't see it, there are some instructions for all this here as well for the next steps which would be to get an app you built copied over. https://github.com/dotnet/core/blob/master/samples/RaspberryPiInstructions.md |
HI Peter! Thanks for the help. I just re-installed a fresh Raspbian Lite, ran a First your prerequisites link, Ubuntu section deps:
I noticed a couple of posts mentioning an issue with the
Then I found a couple other resources:
|
gdb doesn't help much, seems like the issue happens very early during the bin execution.
|
@janvorli any other thoughts on how to diagnose? |
Can you try running with strace and see if that gives any hints around anything that may be trying to get loaded but can't be found? That would help rule out dependencies. Also, can you share the output of |
Sure here's the output of strace and the content of the release file.
|
@Petermarcu Please let me know if you have any pointers on how I can investigate this, the error message isn't helping at all. I also can't believe I'm the only one experiencing this issue?
|
@florrain I have looked into it a bit. First, on RPI 3 with the same debian version and using your steps to install the dotnet, it works fine. My strace looks the same until the point where you get the SIGSEGV and then continues:
That doesn't give us any reasonable info on what can be causing the crash. I was googling for what can be causing a SIGSEGV before the main function is executed and it seems that it is most likely one of the shared libraries we depend on. Could you please try the following and get me the results?
|
This does not belong at |
@livarcocc why do you think it is about the runtime failing to run due to missing requirements? The log provided by @florrain doesn't show any attempt to load the runtime. |
@janvorli since this a missing dependency that the runtime requires, where do you think this should be? Kindof a gray area, since we don't have a "platform environment" or "troubleshooting distros" repo or area. I think coreclr would be the best location for this, as ideally a better error message can be displayed, or a tool that could do a pre-flight check of sorts. |
Seems I have it reproduced. If that confuses the thread, please remove. Here is the output requested by @janvorli This is also on a RPI2 with stretch. On my RPI3 with stretch it works fine. |
In case it is helpful, I am having the same issue as well, but with a first generation Raspberry Pi B. I cannot collect telemetry at this time. |
Exactly the same thing:
|
Experiencing the very same issue for a standalone .NET Core 2.1 hello world app on Raspberry Pi Zero W. EDIT: It looks like the issue is caused by the fact that .NET Core 2.1 apps can only be run on ARMv7 CPUs and newer. Raspberry Pi Zero W is built with ARMv6 BCM2835. This does not explain why the issue occurs for the original topic starter though (Raspberry Pi 2 Model B is based on ARMv7 BCM2836). |
cat /proc/cpuinfo Hardware : BCM2835 |
@oyvindh This is ARM v6 that is not supported by .NET Core. Your device is not Raspberry Pi 2, based on the BCM2835 reported, it is Raspberry Pi Model A, B, B+, the Compute Module, or the Raspberry Pi Zero (see https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/README.md) |
Hello, my app raised the same issue. I was using the .net core 2.1 and hosting the app at ubuntu 16.04. My app reading the text from a file and doing a rsa encription, then it crashed with Segmentation fault. I debuged with strace which shows almost same as @florrain described. After some researching, I found it was cased by the ASCII filetype, so I delete the text file and re-create avoiding ASCII, it works finally! So checking if there's any file created at windows. May it helps you. FYI: 13 hours debugging a segmentation fault in .NET Core on Raspberry Pi and the solution was... |
There is any way to install ASP.net core on Raspberry pi Zero W device?My device configuration: Hardware : BCM2835 |
@gnraju20411 no, it cannot be installed there. We don't support the ARMv6, only ARMv7. The ARMv6 doesn't support THUMB2 instruction encoding that our JIT generates and runtime requires. Some effort to make runtime work on ARMv6 was initiated by @franksinankaya (PR #657), but I am not aware of any work done on the JIT side. |
Steps to reproduce
sudo apt-get install curl libunwind8 gettext
curl -sSL -o dotnet.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-linux-arm.tar.gz
sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
Expected behavior
The runtime should run with no segfault.
Actual behavior
Whatever the options passed to the executable are, it always gives a segfault. Tried on Raspbian and on DietPi.
Environment data
I'm not sure what would be valuable for debugging so please tell me.
The text was updated successfully, but these errors were encountered: