NET 9.0 Android Console App SIGSEGV Crash

Open
#111,071 7 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
28/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, csharp, linux

Research direction

The issue names no source file or test. Start by reproducing the listed dotnet publish command on an Android phone and inspect the attached logcat.txt, then compare the net9.0/linux-bionic-arm64 result with the working .NET 8.0 case. Done means the published console app runs without a segmentation fault and prints "Hello, World!".

Written by the indexing model from the issue text.

Description

area-VM-meta-mono os-android
Description

Publish a console app using linux-bionic-arm64 and running on the phone causes Segmentation Fault.
I am not able to observe this issue on NET 8.0 SDK but on NET 9.0 SDK.

Reproduction Steps
  1. dotnet new console -o hello
  2. cd hello
  3. dotnet publish -r linux-bionic-arm64 --self-contained -f net9.0
  4. Copy all the contents in bin folder to phone
  5. Run bin/Release/net9.0/linux-bionic-arm64/hello on the phone using adb or Termux app
  6. Observe crash
Expected behavior

Should not crash. Prints Hello, World!

Actual behavior

Prints Segmentation Fault and crash. Attach logcat.txt for inspection.

Regression?

Works on NET 8.0 (8.0.11).

Known Workarounds

No response

Configuration
.NET SDK:
 Version:           9.0.101
 Commit:            eedb237549
 Workload version:  9.0.100-manifests.3068a692
 MSBuild version:   17.12.12+1cce77968

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  22.04
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /home/jylo/.dotnet/sdk/9.0.101/

.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.

Host:
  Version:      9.0.0
  Architecture: x64
  Commit:       9d5a6a9aa4

.NET SDKs installed:
  8.0.404 [/home/jylo/.dotnet/sdk]
  9.0.101 [/home/jylo/.dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.11 [/home/jylo/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 9.0.0 [/home/jylo/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.11 [/home/jylo/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.0 [/home/jylo/.dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download
Other information

No response

Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/runtime

All issues in dotnet/runtime

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.