2

Most dotnet commands I run on my Ubuntu 20.04 system gives me the error:
Segmentation fault (core dumped)

I tried rerunning the dotnet installation scripts and I tried modifying the stack size with uint -n (as advised on the internet). (It's important to note that I was using the backend of an app on dotnet without any problems, and this error seems to have come out of nowhere.)

I cannot find a solution for this. What can I do to fix this?

The following commands produce the segfault:

  • dotnet -h
  • dotnet --info

The following commands do not produce a segfault:

  • dotnet (without any arguments)
  • dotnet --list-sdks
  • dotnet --list-runtimes

I used the official microsoft documentation from here https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu to install .NET and it ran just fine until a few days ago.

EDIT: Upon further investigation, I found out that if I uninstall the SDK I stop getting the error but as soon as I reinstall, it reapears.

8
  • 1
    Please don't post screenshots of terminal output - you should edit your question and copy/paste the text from the terminal window.
    – guntbert
    Jul 24, 2020 at 22:59
  • Follow @guntbergs advice and also add the commands you used to install it. Make sure to use markdown syntax (see stackoverflow.com/editing-help#code )
    – Garo
    Jul 25, 2020 at 0:08
  • You say “Any dotnet command I run … gives me [this] error”, but your screenshot shows otherwise. Jul 25, 2020 at 0:41
  • I improved your question but you still have to add the installation commands that you used
    – Garo
    Jul 25, 2020 at 0:57
  • Thanks for improving my question :) . I didn't inculde the installation process because I had no problem running the command a few days ago, and I didn't make any important changes to the system that shouldw influenced the sdk. Anyways, I put the official microsoft instalation instructions, as those are what I used. Jul 25, 2020 at 8:15

3 Answers 3

1

I had this problem using the dotnet installed via snap. I uninstalled and installed directly, via APT. Now it works perfectly. I used the commands from the following link: Dotnet Core

0

On arch (Manjaro GNOME 21.2.5 in my case) installing it with pacman instead of snap fixed it.

First, remove the one installed with snap:

sudo snap remove dotnet-sdk

Then, install it with pacman:

sudo pacman -S dotnet-sdk
0

Apparentyly,because of issues with Snaps, snap installs of Microsoft's Dotnet packages requires you to do "sudo dotnet..." And doing so just grants you "segmentation fault" without the core dump.

This is as of Dotnet 6.0.108... And the only real reason that I can see running the snapfu version of dotnet is because the package manager version uses libunwind13, and not (the current as of this writing) libunwind14. In my own use case, I can either have a fully functional, non-snapfu'd dotnet, or I can have Discord... but not both. (Ubuntu 22.04)

I was hoping that I had the answer, but I'm still getting the segmentation fault... just without the core dump. I'm thinking that the actual answer is to drop the snap version and use the version from packages.microsoft.com As it doesn't use libunwind? supposedly and it works. (Once upon a time, I switched from that version the one that comes with ubuntu.)

I'm adding this here because 1) I can't comment; 2) because down the road, it may help someone else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.