preview8 - signal SIGSEGV on executables
See original GitHub issuepreview8 - signal SIGSEGV on executables
Create a console app “console1” and run with dotnet run
Nothing happens. Program just exits silently.
The program builds normally.
dotnet bin/Debug/netcoreapp3.0/console1.dll
works.
./bin/Debug/netcoreapp3.0/console1
crashes with segmentation fault.
General
$ lldb console1
(lldb) target create "console1"
Current executable set to 'console1' (x86_64).
(lldb) run
Process 26817 launched: '/mnt/docs/dev/tmp/console1/bin/Debug/netcoreapp3.0/console1' (x86_64)
Process 26817 stopped
* thread dotnet/sdk#4283, name = 'console1', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
frame #0: 0x0000000000000000
error: memory read failed for 0x0
$ dotnet --info
SDK do .NET Core (refletindo qualquer global.json):
Version: 3.0.100-preview8-013656
Commit: 8bf06ffc8d
Ambiente de tempo de execução:
OS Name: opensuse-tumbleweed
OS Version: 20190721
OS Platform: Linux
RID: linux-x64
Base Path: /snap/dotnet-sdk/45/sdk/3.0.100-preview8-013656/
Host (useful for support):
Version: 3.0.0-preview8-28405-07
Commit: d01b2fb7bc
.NET Core SDKs installed:
3.0.100-preview8-013656 [/snap/dotnet-sdk/45/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0-preview8.19405.7 [/snap/dotnet-sdk/45/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.0-preview8-28405-07 [/snap/dotnet-sdk/45/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
preview8 - signal SIGSEGV on executables · Issue #10432
preview8 - signal SIGSEGV on executables Create a console app "console1" and run with dotnet run Nothing happens.
Read more >Program received signal SIGSEGV when writing to code ...
This code fails because code section (.text) of ELF executable on Linux is not writable. Thus, writing to this section causes SIGSEGV signal...
Read more >what is this means??=> Program received signal SIGSEGV ...
On Unix-like operating systems, a signal called SIGSEGV is sent to a process that accesses an invalid memory address.
Read more >Thread 1 received signal SIGSEGV, segmentation fault
On Unix-like operating systems, a signal called SIGSEGV is sent to a process that accesses an invalid memory address.
Read more >SIGSEGV error - Lazarus Forum - Free Pascal
Program received signal SIGSEGV, Segmentation fault. ... Single stepping until exit from function ntdll!RtlInitAnsiStringEx, which has no line ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is a dupe of the core-setup issue. The problem is the that the apphost can’t resolve its dependencies because its RPATH isn’t correct to resolve them in the snap’s directory.
I was able to get the apphost working with this workaround:
Edit
bin/Debug/netcore3.0/console1.runtimeoptions.json
to include this in theruntimeOptions
settings:And then finally run with
DOTNET_ROOT
set:Another workaround is to disable building with the apphost by setting
<UseAppHost>false</UseAppHost>
in the project file. This will prevent the apphost from being created, sodotnet run
will work. However, to run the application manually you must usedotnet application.dll
to activate.I’m going to close this issue in favor of the dotnet/core-setup issue referenced above.
@thild thanks for reporting this to us!
Thanks for the workaround. All I needed was
patchelf
as well. Globalization setting was not needed and I didn’t have to define my project path in DOTNET_ROOTBecause this information is scattered all over the place, here is my complete solution to get the dotnet core snap fully up and running (on Solus) if it helps anyone:
dotnet
alias:sudo snap alias dotnet-sdk.dotnet dotnet
To resolve some certificate errors with nuget packages, I also needed:
/my-project/.vscode/settings.json
. More info at https://github.com/OmniSharp/omnisharp-vscode/issues/1998