Can you run an strace
and upload the log file (logfile
below) somewhere?
strace -f -o logfile dotnet new console -o hwapp
Edit: does dotnet --info
work?
Here you go :
$ dotnet --info
.NET Command Line Tools (2.0.0)
Product Information:
Version: 2.0.0
Commit SHA-1 hash: cdcd1928c9
Runtime Environment:
OS Name: debian
OS Version:
OS Platform: Linux
RID: debian-x64
Base Path: /usr/share/dotnet/sdk/2.0.0/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
The strace also returns a segmentation fault :
$ strace -f -o logfile dotnet new console -o hwapp
Getting ready...
[1] 1297 segmentation fault strace -f -o logfile dotnet new console -o hwapp
Hi, any news on this ? Anything else I can do to help debug?
@livarcocc is this the one people have been working around by disabling the first run experience?
export DOTNET_CLI_TELEMETRY_OPTOUT=1
removed the segmentation fault for me
bashforger, Shahed-Atik, and DoginUwU reacted with hooray emoji
vitorpiovezam, gilles-leblanc, c-zab, RedlineTriad, Scharps, bashforger, kolaczyn, Dunigan, and DoginUwU reacted with heart emoji
bashforger and DoginUwU reacted with rocket emoji
bashforger and DoginUwU reacted with eyes emoji
should I close the issue or you want it left open until a real fix has been issued?
Lets leave it open until @livarcocc confirms that there is an issue somewhere tracking the fix. Once we have that, this can be closed. Thanks @ierpe!
@Petermarcu @steveharter can you help debug this and understand why the telemetry code is causing a seg fault? If this were in native code, I would expect a stack trace somewhere. But we will investigate.
@livarcocc I’m installing fresh debian now, will report back tomorrow.
I couldn’t repro. I used debian stretch. One difference is that dotnet --info
reports the RID as Linux-x64 instead of debian-x64.
dotnet --info
.NET Command Line Tools (2.0.0)
Product Information:
Version: 2.0.0
Commit SHA-1 hash: cdcd1928c9
Runtime Environment:
OS Name: debian
OS Version: 9
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/2.0.0/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
@ierpe what is the contents of your /etc/apt/sources.list.d/dotnetdev.list file? I have:
deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch main
the same issue @Mac
the official guide says:
dotnet new console -o hwapp
cd hwapp
I checked the dotnet help (dotnet core sdk 2.0)
~ dotnet help new
.NET Initializer
Usage: dotnet new [options]
Options:
-h|--help Show help information
-l|--lang <LANGUAGE> Language of project [C#|F#]
-t|--type <TYPE> Type of project
➜ source mkdir dotnet
all the guide shuold be update to :
mkdir -p hwapp
cd hwapp
dotnet new -t console
FWIW here’s my Debian Stretch environment (no repro, clean install)
$ curl -V
curl 7.52.1 (x86_64-pc-linux-gnu) libcurl/7.52.1 OpenSSL/1.0.2l zlib/1.2.8 libidn2/0.16 libpsl/0.17.0 (+libidn2/0.16) libssh2/1.7.0 nghttp2/1.18.1 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL
$ openssl version
OpenSSL 1.1.0f 25 May 2017
$ cat /proc/version
Linux version 4.9.0-3-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19)
$ cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
@icedfish
the same issue @mac
So you’re also getting the seg fault during dotnet new console
?
Does export DOTNET_CLI_TELEMETRY_OPTOUT=1
prevent the seg fault?
@ierpe have you tried to debug the seg fault, or look at any dumps in order to determine the crashing modulestack? I can send you gdb instructions.
@icedfish
I checked the dotnet help (dotnet core sdk 2.0)
Can you confirm this? What does dotnet --version
say? What does dotnet --info
say?
~ dotnet help new .NET Initializer Usage: dotnet new [options] Options: -h|--help Show help information -l|--lang <LANGUAGE> Language of project [C#|F#] -t|--type <TYPE> Type of project ➜ source mkdir dotnet
That looks like the older 1.0 Preview SDK. -t
does not work with the 1.x or 2.x SDKs.
@ierpe probably the easiest way is to catch the seg fault with gdb if you can. You’ll likely need to be root to install that. So
su
apt-get install gdb
exit
and then run dotnet:
gdb --args dotnet new console
run
after seg fault
hopefully you get a crashing module (libcurl?) and stack.
@omajid sorry , I checked my system, find that I used to install the old 1.0RC SDK before install the new 2.0 sdk.
after uninstall the old version by the cli script
and reinstalled the sdk 2.0, It’s ok now.
But it’s really puzzle, the the 2.0 sdk not remove the old sdk automaticlly or even notify me the incompact…..
@steveharter is that what you wanted ?
$ gdb --args dotnet new console
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from dotnet...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/dotnet new console
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7f0ea6576700 (LWP 11703)]
[New Thread 0x7f0e9ffff700 (LWP 11704)]
[New Thread 0x7f0ea5d75700 (LWP 11705)]
[New Thread 0x7f0ea5574700 (LWP 11706)]
[New Thread 0x7f0ea4d73700 (LWP 11707)]
[New Thread 0x7f0e9f7fe700 (LWP 11708)]
[New Thread 0x7f0e2e140700 (LWP 11709)]
[Thread 0x7f0e2e140700 (LWP 11709) exited]
[New Thread 0x7f0e2e140700 (LWP 11710)]
[New Thread 0x7f0ea41b9700 (LWP 11711)]
[New Thread 0x7f0e2d93f700 (LWP 11712)]
[New Thread 0x7f0e2d13e700 (LWP 11713)]
[New Thread 0x7f0ea4178700 (LWP 11714)]
[New Thread 0x7f0e07ffd700 (LWP 11715)]
[New Thread 0x7f0e077fc700 (LWP 11716)]
[New Thread 0x7f0deed59700 (LWP 11717)]
[New Thread 0x7f0dee558700 (LWP 11718)]
[Thread 0x7f0dee558700 (LWP 11718) exited]
Thread 16 "dotnet" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f0deed59700 (LWP 11717)]
0x00007f0e2c67dd6d in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
(gdb) backtrace
#0 0x00007f0e2c67dd6d in ?? ()
from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#1 0x00007f0e2c678c8b in X509_verify_cert ()
from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#2 0x00007f0e31168e06 in ?? ()
#3 0x00007f0deed57e50 in ?? ()
#4 0x6c00fa377b77ae7b in ?? ()
#5 0x0000000007bcbd60 in ?? ()
#6 0x00007f0ea83f5488 in ?? ()
from /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/libcoreclr.so
#7 0x00007f0deed58688 in ?? ()
#8 0x00007f0e312a2580 in ?? ()
#9 0x00007f0e312a2580 in ?? ()
#10 0x00007f0deed57e50 in ?? ()
#11 0x00007f0e31168e06 in ?? ()
#12 0x00007f0deed57ee0 in ?? ()
#13 0x00007f0e312a2580 in ?? ()
#14 0x00007f0e083b6760 in ?? ()
#15 0x0000000000000001 in ?? ()
#16 0x00007f0e080de958 in ?? ()
#17 0x00007f0e08634f90 in ?? ()
#18 0x00007f0e08634f20 in ?? ()
#19 0x00007f0e083b6760 in ?? ()
---Type <return> to continue, or q <return> to quit---
#20 0x00007f0de40ff270 in ?? ()
#21 0x00007f0deed57f50 in ?? ()
#22 0x00007f0e30f7ce57 in ?? ()
#23 0x00007f0deed57ef0 in ?? ()
#24 0x00007f0e08634f20 in ?? ()
#25 0x00007f0e080de958 in ?? ()
#26 0x0000000000000000 in ?? ()
@ierpe yes thanks. It is likely crashing when calling into OpenSsl.
Can you run a couple commands please:
$ openssl version
and
ls /usr/lib/x86_64-linux-gnu/libssl.so.*
You should get back
OpenSSL 1.1.0f 25 May 2017
and
/usr/lib/x86_64-linux-gnu/libssl.so.1.0.2 /usr/lib/x86_64-linux-gnu/libssl.so.1.1
If not, and you’re getting the 1.0.0 version you can give this a try:
apt-get remove ssl1.0.0
apt-get install ssl1.0.2
@steveharter
$ openssl version
OpenSSL 1.1.0f 25 May 2017
$ ls /usr/lib/x86_64-linux-gnu/libssl.so.*
/usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
/usr/lib/x86_64-linux-gnu/libssl.so.1.0.2
/usr/lib/x86_64-linux-gnu/libssl.so.1.1
@ierpe since you have the 1.0.0 version, that is likely conflicting and has been a problem for others. You can remove that by doing an apt-get remove ssl1.0.0
Typically the 1.0.0 version is there due to an upgrade to stretch or buster, and not a clean install. It could have come from another app’s dependency as well.
cc @bartonjs is there an issue to address this in some manner? Like if 1.0.2 is there use that first. Thanks
@steveharter removing ssl1.0.0 fixed it for me, thanks for the support!
@steveharter The reason I had 1.0.0 version was that spotify-client
depends on it and I had manually installed it. Please refer to my post in #649
This was referenced
May 17, 2018
I have multiple apps that depend on version 1.0.0 and others that depend on 1.0.2.
What do I do?
When I try to run ‘dotnet new console’ in either the Ubuntu or VS Code Terminal, I get the following error
Segmentation fault (core dumped)
Running it in the Ubuntu Terminal seems to give more information, looks like it’s failing to do the ‘dotnet restore’ that automatically runs when you do ‘dotnet new console’
Getting ready...
The template "Console Application" was created successfully.
Processing post-creation actions...
Running 'dotnet restore' on /home/max/Programming/C Sharp/Hello World/Hello World.csproj...
Determining projects to restore...
Restore failed.
Post action failed.
Description: Restore NuGet packages required by this project.
Manual instructions: Run 'dotnet restore'
Segmentation fault (core dumped)
Running dotnet restore manually just gives the segfault error
Version of Ubuntu is 21.04, I have already installed everything as per https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#2104-
Another thing to note is that I can build and run C Sharp applications fine in Monodevelop, and I can run non .NET languages such as Python fine in VS Code
Any ideas / assistance would be appreciated, thanks
I am following https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/create
When I try to create a project, I get the following:
oskar@oskarslaptop:~/Programming/Resorvoir-CLI$ dotnet new console -o MyApp
Segmentation fault (core dumped)
I have installed dotnet 5.0 via snap using:
sudo snap install dotnet-sdk --classic --channel=5.0
sudo snap alias dotnet-sdk.dotnet dotnet
Snap information:
oskar@oskarslaptop:~/Programming/Resorvoir-CLI$ sudo snap info dotnet-sdk
name: dotnet-sdk
summary: Develop high performance applications in less time, on any platform.
publisher: Microsoft .NET Core (dotnetcore✓)
store-url: https://snapcraft.io/dotnet-sdk
contact: https://dot.net/core
license: unset
description: |
.NET Core is the modular and high performance implementation of .NET for creating web applications
and services that run on Windows, Linux and Mac. It is open source and it can share the same code
with .NET Framework and Xamarin apps.
.NET Core is a .NET Foundation project. https://dotnetfoundation.org/
commands:
- dotnet-sdk.dotnet
snap-id: uHc4y9lWxyqYfxsqcr4xILzAai4L1BHs
tracking: 5.0/stable
refresh-date: today at 13:36 BST
channels:
latest/stable: 5.0.302 2021-07-13 (132) 139MB classic
latest/candidate: ↑
latest/beta: ↑
latest/edge: 5.0.202 2021-04-16 (120) 137MB classic
lts/stable: 3.1.411 2021-07-13 (133) 123MB classic
lts/candidate: ↑
lts/beta: ↑
lts/edge: ↑
6.0/stable: –
6.0/candidate: –
6.0/beta: 6.0.100-preview.6.21355.2 2021-07-14 (134) 144MB classic
6.0/edge: ↑
5.0/stable: 5.0.302 2021-07-13 (132) 139MB classic
5.0/candidate: ↑
5.0/beta: 5.0.100 2020-11-10 (105) 267MB classic
5.0/edge: ↑
3.1/stable: 3.1.411 2021-07-13 (133) 123MB classic
3.1/candidate: ↑
3.1/beta: ↑
3.1/edge: ↑
2.1/stable: 2.1.816 2021-05-11 (124) 245MB classic
2.1/candidate: ↑
2.1/beta: ↑
2.1/edge: 2.1.808 2020-07-14 (91) 245MB classic
installed: 5.0.302 (132) 139MB classic
- Печать
Страницы: [1] 2 Все Вниз
Тема: Ошибка сегментирования при установки .net sdk (Прочитано 1781 раз)
0 Пользователей и 1 Гость просматривают эту тему.

Stell_a
dotnet new —help // я выполнил вот эту команду
Получил вот эту ошибку: Ошибка сегментирования (стек памяти сброшен на диск)
Устанавливал .donnet sdk так:
sudo snap install dotnet-sdk --classic
sudo snap alias dotnet-sdk.dotnet dotnet
Как это можно исправить

damix
Stell_a, какую версию надо поставить?
inxi -SC
что выдает?
dotnet --list-sdks
Попробуйте этот способ.

Stell_a
stell@BMH-WCX9:~$ inxi -SC
System:
Host: BMH-WCX9 Kernel: 5.15.0-27-generic x86_64 bits: 64
Desktop: GNOME 42.0 Distro: Ubuntu 22.04 LTS (Jammy Jellyfish)
CPU:
Info: 6-core model: AMD Ryzen 5 5500U with Radeon Graphics bits: 64
type: MT MCP cache: L2: 3 MiB
Speed (MHz): avg: 2020 min/max: 1400/4056 cores: 1: 2369 2: 3007 3: 1407
4: 3047 5: 2610 6: 2067 7: 1505 8: 1425 9: 2203 10: 1397 11: 1715 12: 1490
stell@BMH-WCX9:~$ dotnet --list-sdks
6.0.202 [/snap/dotnet-sdk/162/sdk]
stell@BMH-WCX9:~$

damix
Ну и после того способа снова посмотрите, чего получается.
dotnet --list-sdks
dotnet new --help
which dotnet

Stell_a
Ввожу:
./dotnet-install.sh -c Current
Дальше ничего не происходит:
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
dotnet-install: Attempting to download using aka.ms link https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.202/dotnet-sdk-6.0.202-linux-x64.tar.gz
Пользователь добавил сообщение 09 Мая 2022, 16:42:03:
Разобрался нужно просто перейти по ссылке и скачать, только теперь пишу
dotnet new --help
И не выводит список доступных sdk
Пользователь добавил сообщение 09 Мая 2022, 16:49:26:
Попробуйте этот способ.
Это устанавливает, но пишет что
Команда «dotnet» не найдена, но может быть установлена с помощью:
sudo snap install dotnet-sdk
« Последнее редактирование: 09 Мая 2022, 16:49:26 от Stell_a »

damix
Команда «dotnet» не найдена
echo $DOTNET_ROOT
echo $PATH

Stell_a
Все равно пишет: Ошибка сегментирования (стек памяти сброшен на диск)
Может переустановить, только как теперь удалить .net?

damix
Просто удалить папку и убрать из bashrc что добавили. Но переустанавливать — без толку.
А что команды выдают?
dotnet --list-sdks
dotnet new --help
which dotnet
Пользователь добавил сообщение 09 Мая 2022, 18:47:44:
echo $DOTNET_ROOT
« Последнее редактирование: 09 Мая 2022, 18:47:44 от damix »

Stell_a
dotnet —list-sdks
stell@BMH-WCX9:~$ dotnet --list-sdks
dotnet new —help
6.0.202 [/snap/dotnet-sdk/162/sdk]
stell@BMH-WCX9:~$ dotnet new --help
Ошибка сегментирования (стек памяти сброшен на диск)
stell@BMH-WCX9:~$ which dotnet
/snap/bin/dotnet
echo $DOTNET_ROOT ничего не выводит.
echo $PATH
stell@BMH-WCX9:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin

damix
Зависимости все установлены согласно инструкции по ссылке?

Stell_a
./dotnet-install.sh -c Current
./dotnet-install.sh -c Current --runtime aspnetcore
И потом вот эти команды ввел по очереди:
DOTNET_FILE=dotnet-sdk-6.0.100-linux-x64.tar.gz
export DOTNET_ROOT=$(pwd)/.dotnet
mkdir -p "$DOTNET_ROOT" && tar zxf "$DOTNET_FILE" -C "$DOTNET_ROOT"
export PATH=$PATH:$DOTNET_ROOT
Пользователь добавил сообщение 09 Мая 2022, 21:50:25:
ТОлько версию dotneta поменял

damix
Stell_a, вот зависимости.
./dotnet-install.sh -c Current
./dotnet-install.sh -c Current —runtime aspnetcore
я предлагал Manual install, а это Scripted install.
И потом вот эти команды ввел по очереди:
И что вывело?
Удалите dotnet из снапа и
export DOTNET_ROOT=/opt/dotnet
где вместо
export PATH=$DOTNET_ROOT:$PATH
echo $DOTNET_ROOT
echo $PATH
which dotnet
dotnet new --help
dotnet --list-sdks
/opt/dotnet
путь, где лежит устанолвенный вручную dotnet.

Stell_a
И что вывело?
stell@BMH-WCX9:~$ mkdir -p "$DOTNET_ROOT" && tar zxf "$DOTNET_FILE" -C "$DOTNET_ROOT"
tar (child): dotnet-sdk-6.0.100-linux-x64.tar.gz: Функция open завершилась с ошибкой: Нет такого файла или каталога
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Все остальные ничего не выводят, я попробовал установить, скачал dotnet install scripts
Вручную там написано скачать пакет sdk но я перешел по ссылке https://dotnet.microsoft.com/en-us/download/dotnet/6.0 и что из этого качать не понимаю там есть только bash скрипт
Пользователь добавил сообщение 10 Мая 2022, 11:17:29:
Зависимости проверил, все установлены уже были.
« Последнее редактирование: 10 Мая 2022, 11:17:29 от Stell_a »

damix

jurganov
« Последнее редактирование: 10 Мая 2022, 18:21:02 от jurganov »
- Печать
Страницы: [1] 2 Все Вверх
Earlier this evening I installed .NET core preview 2 on Debian Sid, and tried to create a new project via the dotnet new command, only to get a segmention fault error message:
matt@IDSiG:~/git/testproject$ dotnet new console Segmentation fault
In this instance, the segmentation fault on creation of a new project was is due to .NET Core telemetry being incompatible with version 1.1 of OpenSSL.
A quick check via dpkg shows the current version I have of the OpenSSL package is indeed 1.1
[email protected]:~/git/testproject$ dpkg -s openssl | grep Version Version: 1.1.0e-1
Setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable disables telemetry.
export DOTNET_CLI_TELEMETRY_OPTOUT=1
[email protected]:~/git/testproject$ dotnet new console The template "Console Application" was created successfully. Processing post-creation actions... Running 'dotnet restore' on /home/zachery/git/testproject/testproject.csproj... Restoring packages for /home/zachery/git/testproject/testproject.csproj... Generating MSBuild file /home/zachery/git/testproject/obj/testproject.csproj.nuget.g.props. Generating MSBuild file /home/zachery/git/testproject/obj/testproject.csproj.nuget.g.targets. Restore completed in 219.75 ms for /home/zachery/git/testproject/testproject.csproj.
QED