Skip to content

csc.dll code 139 error when building project on .NET Core 2.1.302 Ubuntu 16.04 ARM64 #10933

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

Closed
gauravagarwal28 opened this issue Aug 21, 2018 · 26 comments
Assignees
Milestone

Comments

@gauravagarwal28
Copy link

I have downloaded .NET Core SDK for linux ARM64 on my Jetson TX2 running ubuntu 16.04.

nvidia@tegra-ubuntu:~$ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.1.302
 Commit:    9048955601

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  16.04
 OS Platform: Linux
 RID:         ubuntu.16.04-arm64
 Base Path:   /usr/share/dotnet/sdk/2.1.302/

Host (useful for support):
  Version: 2.1.2
  Commit:  811c3ce6c0

.NET Core SDKs installed:
  2.1.302 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.NETCore.App 2.1.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
nvidia@tegra-ubuntu:~$ 

However I am unable to run any dotnet application (even the hello world example) on my Jetson TX2.

nvidia@tegra-ubuntu:~$ dotnet new console -o myApp --force
The template "Console Application" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on myApp/myApp.csproj...
  Restoring packages for /home/nvidia/myApp/myApp.csproj...
  Generating MSBuild file /home/nvidia/myApp/obj/myApp.csproj.nuget.g.props.
  Generating MSBuild file /home/nvidia/myApp/obj/myApp.csproj.nuget.g.targets.
  Restore completed in 1.58 sec for /home/nvidia/myApp/myApp.csproj.

Restore succeeded.
nvidia@tegra-ubuntu:~/myApp$ dotnet run
/usr/share/dotnet/sdk/2.1.302/Roslyn/Microsoft.CSharp.Core.targets(52,5): error MSB6006: "csc.dll" exited with code 139. [/home/nvidia/myApp/myApp.csproj]

The build failed. Please fix the build errors and run again.

I wish to build iotedge for Jetson TX2 and dotnet Core 2.1 is a dependency for the same.

This is my binary log file. I had to rename it with a .zip extension to upload here.
just rename the file from msbuild.binlog.zip to msbuild.binlog

msbuild.binlog.zip

dotnet/roslyn#29194

@jashook jashook self-assigned this Aug 31, 2018
@jashook
Copy link
Contributor

jashook commented Sep 4, 2018

Adding info from the Roslyn issue:

This currently has not been investigated. For a work around to this issue please use the dotnet core 2.2 aarch64 preview release in place of dotnet core 2.1 for aarch64.

The latest preview of 2.2 can be found https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.2.1xx/dotnet-sdk-latest-linux-arm64.tar.gz. If the link no longer works see: https://github.com/dotnet/core-sdk for more downloads.

Please feel free to target netcoreapp2.1, just use the newer runtime.

Currently the dotnet core 3.0 preview is broken due to https://github.com/dotnet/coreclr/issues/19805. Once it is fixed I will update with a link and suggest using the 3.0 preview.

@pellet
Copy link

pellet commented Sep 23, 2018

I tried this version and it didn't work for me: 2.2.100-preview2-009404/Roslyn/Microsoft.CSharp.Core.targets(52,5): error MSB6006: "csc.dll" exited with code 139. Preview 3 wouldn't get as far and broke on an unrelated parsing error.

@gauravagarwal28
Copy link
Author

@pellet Can you provide more details about your platform so that I can know if we have the same issue or not?

P.S. I am not working on this anymore but would like to keep track of the issue for the future.

@pellet
Copy link

pellet commented Sep 26, 2018

@gauravagarwal28 sure it's ubuntu 16 arm64. I've switched to using mono for the time being.

@hez2010
Copy link
Contributor

hez2010 commented Oct 2, 2018

The problem still exists on 2.1.402 and 2.2.100-preview3-009423.
But the problem doesn't exist on sdk 3.0.100-alpha1-009630 (host: 3.0.0-preview1-26928-03).

@olgierdd
Copy link

olgierdd commented Oct 5, 2018

Here is mine testcase:
rock64@rock64:~/dev$ dotnet new console -o myApp --force
The template "Console Application" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on myApp/myApp.csproj...
Restoring packages for /home/rock64/dev/myApp/myApp.csproj...
Generating MSBuild file /home/rock64/dev/myApp/obj/myApp.csproj.nuget.g.props.
Generating MSBuild file /home/rock64/dev/myApp/obj/myApp.csproj.nuget.g.targets.
Restore completed in 4.37 sec for /home/rock64/dev/myApp/myApp.csproj.

Restore succeeded.
rock64@rock64:~/dev/myApp$ dotnet run
/home/rock64/dotnet/sdk/2.1.402/Roslyn/Microsoft.CSharp.Core.targets(52,5): error MSB6006: "csc.dll" exited with code 139. [/home/rock64/dev/myApp/myApp.csproj]

The build failed. Please fix the build errors and run again.

rock64@rock64:~/dev/myApp$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.1.402
Commit: 3599f217f4

Runtime Environment:
OS Name: ubuntu
OS Version: 18.04
OS Platform: Linux
RID: ubuntu.18.04-arm64
Base Path: /home/rock64/dotnet/sdk/2.1.402/

Host (useful for support):
Version: 2.1.4
Commit: 85255dde3e

.NET Core SDKs installed:
2.1.402 [/home/rock64/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.NETCore.App 2.1.4 [/home/rock64/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

@olgierdd
Copy link

olgierdd commented Oct 5, 2018

I installed preview version of dotnet:
rock64@rock64:~/dev/myApp2$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.2.100-preview3-009423
Commit: 559795b616

Runtime Environment:
OS Name: ubuntu
OS Version: 18.04
OS Platform: Linux
RID: ubuntu.18.04-arm64
Base Path: /home/rock64/dotnet/sdk/2.2.100-preview3-009423/

Host (useful for support):
Version: 2.2.0-preview3-27002-02
Commit: 525082ca3e

.NET Core SDKs installed:
2.2.100-preview3-009423 [/home/rock64/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.NETCore.App 2.2.0-preview3-27002-02 [/home/rock64/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

rock64@rock64:~/dev$ dotnet new console -o myApp2 --force
ASP.NET Core

Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.
Getting ready...
The template "Console Application" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on myApp2/myApp2.csproj...
Restoring packages for /home/rock64/dev/myApp2/myApp2.csproj...
/home/rock64/dev/myApp2/myApp2.csproj : error NU1102: Unable to find package Microsoft.NETCore.App with version (>= 2.2.0-preview3-27002-02)
/home/rock64/dev/myApp2/myApp2.csproj : error NU1102: - Found 43 version(s) in nuget.org [ Nearest version: 2.2.0-preview2-26905-02 ]
Generating MSBuild file /home/rock64/dev/myApp2/obj/myApp2.csproj.nuget.g.props.
Generating MSBuild file /home/rock64/dev/myApp2/obj/myApp2.csproj.nuget.g.targets.
Restore failed in 3.74 sec for /home/rock64/dev/myApp2/myApp2.csproj.

Restore failed.
Post action failed.
Description: Restore NuGet packages required by this project.
Manual instructions: Run 'dotnet restore'

rock64@rock64:/dev$ cd myApp2
rock64@rock64:
/dev/myApp2$ dotnet run
/home/rock64/dev/myApp2/myApp2.csproj : error NU1102: Unable to find package Microsoft.NETCore.App with version (>= 2.2.0-preview3-27002-02)
/home/rock64/dev/myApp2/myApp2.csproj : error NU1102: - Found 43 version(s) in nuget.org [ Nearest version: 2.2.0-preview2-26905-02 ]

The build failed. Please fix the build errors and run again.

@janvorli
Copy link
Member

janvorli commented Oct 5, 2018

@olgierdd as for the package restoration issue, the arm64 2.2 packages for the runtime you are using are not on nuget yet. You need to add NuGet.Config file with the following contents next to your .csproj:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="myget" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
  </packageSources>
</configuration>

The same is tru in case you'd like to try the 3.0 SDK nightly builds.

@bigredhdl
Copy link

I concur with @hez2010 . I still have the issue with 2.2.100-preview3-009423, but not 3.0.100-alpha1-009640

@olgierdd
Copy link

olgierdd commented Oct 6, 2018

@janvorli Thenks for helpful hint. I was able to restore packages, but compilation still does not work.
rock64@rock64:/dev/myApp5$ dotnet restore
Restoring packages for /home/rock64/dev/myApp5/myApp5.csproj...
Installing Microsoft.NETCore.DotNetAppHost 2.2.0-preview3-27002-02.
Installing Microsoft.NETCore.DotNetHostResolver 2.2.0-preview3-27002-02.
Installing Microsoft.NETCore.DotNetHostPolicy 2.2.0-preview3-27002-02.
Installing Microsoft.NETCore.Platforms 2.2.0-preview3-27002-02.
Installing Microsoft.NETCore.Targets 2.0.0.
Installing Microsoft.NETCore.App 2.2.0-preview3-27002-02.
Generating MSBuild file /home/rock64/dev/myApp5/obj/myApp5.csproj.nuget.g.props.
Generating MSBuild file /home/rock64/dev/myApp5/obj/myApp5.csproj.nuget.g.targets.
Restore completed in 8.85 sec for /home/rock64/dev/myApp5/myApp5.csproj.
rock64@rock64:
/dev/myApp5$ dotnet run
/home/rock64/dotnet/sdk/2.2.100-preview3-009423/Roslyn/Microsoft.CSharp.Core.targets(52,5): error MSB6006: "csc.dll" exited with code 139. [/home/rock64/dev/myApp5/myApp5.csproj]

The build failed. Please fix the build errors and run again.

rock64@rock64:~/dev/myApp5$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.2.100-preview3-009423
Commit: 559795b616

Runtime Environment:
OS Name: ubuntu
OS Version: 18.04
OS Platform: Linux
RID: ubuntu.18.04-arm64
Base Path: /home/rock64/dotnet/sdk/2.2.100-preview3-009423/

Host (useful for support):
Version: 2.2.0-preview3-27002-02
Commit: 525082ca3e

.NET Core SDKs installed:
2.2.100-preview3-009423 [/home/rock64/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.NETCore.App 2.2.0-preview3-27002-02 [/home/rock64/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

@olgierdd
Copy link

olgierdd commented Oct 6, 2018

I confirm dotnet core 3.0.100-alpha1-009640 works on ROCK64 ARM64. Good job.
rock64@rock64:/dev$ dotnet new console -o myApp6
rock64@rock64:
/dev/myApp6$ dotnet run
Hello World!
rock64@rock64:~/dev/myApp6$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.0.100-alpha1-009640
Commit: 0e75592c43

Runtime Environment:
OS Name: ubuntu
OS Version: 18.04
OS Platform: Linux
RID: ubuntu.18.04-arm64
Base Path: /home/rock64/dotnet/sdk/3.0.100-alpha1-009640/

Host (useful for support):
Version: 3.0.0-preview1-27004-04
Commit: 35a0b3f

.NET Core SDKs installed:
3.0.100-alpha1-009640 [/home/rock64/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.NETCore.App 3.0.0-preview1-27004-04 [/home/rock64/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

@rido-min
Copy link
Member

rido-min commented Oct 8, 2018

I still see this problem in 2.1.403:

.NET Core SDK (reflecting any global.json):
 Version:   2.1.403
 Commit:    04e15494b6

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  18.04
 OS Platform: Linux
 RID:         ubuntu.18.04-arm64
 Base Path:   /home/rido/dotnet/sdk/2.1.403/

Host (useful for support):
  Version: 2.1.5
  Commit:  290303f510

.NET Core SDKs installed:
  2.1.403 [/home/rido/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.NETCore.App 2.1.5 [/home/rido/dotnet/shared/Microsoft.NETCore.App]

Build fails with:

/home/rido/dotnet/sdk/2.1.403/Roslyn/Microsoft.CSharp.Core.targets(52,5): error MSB6006: "csc.dll" exited with code 139. [/home/rido/code/MyCoreConsole/MyCoreConsole.csproj]

@jkotas
Copy link
Member

jkotas commented Nov 9, 2018

Hit by dotnet/coreclr#20885

@Kirkaiya
Copy link

Kirkaiya commented Dec 4, 2018

I'm getting the same issue with the GA bits .NET Core 2.2 for ARM64 (dotnet-sdk-2.2.100-linux-arm64.tar.gz)
As others noted, I can run .net core DLLs that were built elsewhere (including local Windows machine), but not do a "dotnet build":

  Restoring packages for /home/ubuntu/armconsole22/armconsole22.csproj...
  Restore completed in 393.98 ms for /home/ubuntu/armconsole22/armconsole22.csproj.
/opt/dotnet/sdk/2.2.100/Roslyn/Microsoft.CSharp.Core.targets(52,5): error MSB6006: "csc.dll" exited with code 139. [/home/ubuntu/armconsole22/armconsole22.csproj]

I did the build with /bl on, and pulled down the msbuild.binlog file to my Windows 10 laptop.
The error shows up in the MSBuild Log Viewer, the Task is Csc, with following nodes:

  • Assembly = /opt/dotnet/sdk/2.2.100/Roslyn/Microsoft.Build.Tasks.CodeAnalysis.dll
  • Using shared compilation with compiler from directory: /opt/dotnet/sdk/2.2.100/Roslyn/bincore
  • CommandLineArguments = /opt/dotnet/dotnet /opt/dotnet/sdk/2.2.100/Roslyn/bincore/csc.dll /noconfig /unsafe- /checked- /nowarn:1701,1702,1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:TRACE;DEBUG;NETCOREAPP;NETCOREAPP2_2 /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/Microsoft.CSharp.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/Microsoft.VisualBasic.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/Microsoft.Win32.Primitives.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/mscorlib.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/netstandard.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.AppContext.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Buffers.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Collections.Concurrent.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Collections.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Collections.Immutable.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Collections.NonGeneric.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Collections.Specialized.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.ComponentModel.Annotations.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.ComponentModel.DataAnnotations.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.ComponentModel.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.ComponentModel.EventBasedAsync.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.ComponentModel.Primitives.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.ComponentModel.TypeConverter.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Configuration.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Console.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Core.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Data.Common.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Data.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Diagnostics.Contracts.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Diagnostics.Debug.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Diagnostics.DiagnosticSource.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Diagnostics.FileVersionInfo.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Diagnostics.Process.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Diagnostics.StackTrace.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Diagnostics.TextWriterTraceListener.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Diagnostics.Tools.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Diagnostics.TraceSource.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Diagnostics.Tracing.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Drawing.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Drawing.Primitives.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Dynamic.Runtime.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Globalization.Calendars.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Globalization.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Globalization.Extensions.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.IO.Compression.Brotli.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.IO.Compression.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.IO.Compression.FileSystem.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.IO.Compression.ZipFile.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.IO.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.IO.FileSystem.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.IO.FileSystem.DriveInfo.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.IO.FileSystem.Primitives.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.IO.FileSystem.Watcher.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.IO.IsolatedStorage.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.IO.MemoryMappedFiles.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.IO.Pipes.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.IO.UnmanagedMemoryStream.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Linq.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Linq.Expressions.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Linq.Parallel.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Linq.Queryable.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Memory.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Net.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Net.Http.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Net.HttpListener.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Net.Mail.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Net.NameResolution.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Net.NetworkInformation.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Net.Ping.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Net.Primitives.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Net.Requests.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Net.Security.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Net.ServicePoint.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Net.Sockets.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Net.WebClient.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Net.WebHeaderCollection.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Net.WebProxy.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Net.WebSockets.Client.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Net.WebSockets.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Numerics.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Numerics.Vectors.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.ObjectModel.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Reflection.DispatchProxy.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Reflection.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Reflection.Emit.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Reflection.Emit.ILGeneration.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Reflection.Emit.Lightweight.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Reflection.Extensions.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Reflection.Metadata.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Reflection.Primitives.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Reflection.TypeExtensions.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Resources.Reader.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Resources.ResourceManager.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Resources.Writer.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Runtime.CompilerServices.VisualC.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Runtime.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Runtime.Extensions.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Runtime.Handles.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Runtime.InteropServices.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Runtime.InteropServices.RuntimeInformation.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Runtime.InteropServices.WindowsRuntime.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Runtime.Loader.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Runtime.Numerics.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Runtime.Serialization.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Runtime.Serialization.Formatters.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Runtime.Serialization.Json.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Runtime.Serialization.Primitives.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Runtime.Serialization.Xml.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Security.Claims.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Security.Cryptography.Algorithms.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Security.Cryptography.Csp.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Security.Cryptography.Encoding.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Security.Cryptography.Primitives.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Security.Cryptography.X509Certificates.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Security.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Security.Principal.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Security.SecureString.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.ServiceModel.Web.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.ServiceProcess.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Text.Encoding.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Text.Encoding.Extensions.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Text.RegularExpressions.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Threading.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Threading.Overlapped.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Threading.Tasks.Dataflow.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Threading.Tasks.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Threading.Tasks.Extensions.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Threading.Tasks.Parallel.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Threading.Thread.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Threading.ThreadPool.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Threading.Timer.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Transactions.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Transactions.Local.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.ValueTuple.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Web.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Web.HttpUtility.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Windows.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Xml.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Xml.Linq.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Xml.ReaderWriter.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Xml.Serialization.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Xml.XDocument.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Xml.XmlDocument.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Xml.XmlSerializer.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Xml.XPath.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/System.Xml.XPath.XDocument.dll /reference:/home/ubuntu/.nuget/packages/microsoft.netcore.app/2.2.0/ref/netcoreapp2.2/WindowsBase.dll /debug+ /debug:portable /filealign:512 /optimize- /out:obj/Debug/netcoreapp2.2/armconsole22.dll /target:exe /warnaserror- /utf8output /deterministic+ Program.cs "/tmp/.NETCoreApp,Version=v2.2.AssemblyAttributes.cs" obj/Debug/netcoreapp2.2/armconsole22.AssemblyInfo.cs /warnaserror+:NU1605
  • Parameters [very large tree/graph, if this is helpful, let me know]

Or if someone wants to the msbuild.binlog file itself, I'm more than happy to stick it up on an S3 bucket or something.

@0ctane
Copy link

0ctane commented Dec 7, 2018

I am also receiving this error when trying to simply do the Hello World tutorial.

jeff@rock64:~/Programs/myApp$ dotnet run
/home/jeff/dotnet/sdk/2.2.100/Roslyn/Microsoft.CSharp.Core.targets(52,5): error MSB6006: "csc.dll" exited with code 139. [/home/jeff/Programs/myApp/myApp.csproj]

The build failed. Please fix the build errors and run again.

Armbian Ubunto 18.04 build.
Linux rock64 4.4.162-rockchip64 dotnet/coreclr#1 SMP Fri Oct 26 21:02:58 CEST 2018 aarch64 aarch64 aarch64 GNU/Linux

Used the precompiled dotnet-sdk-2.2.100-linux-arm64.tar.gz
Also tested the "latest" 2.2, which happened to be 2.2.101-rtm-009628, but the build failed with the same MSB6006 error.

3.0.100-preview-009820 seems to have the problem fixed, but it would be good to have it fixed in 2.2...

@cjmld5
Copy link

cjmld5 commented Dec 8, 2018

I also got same error 'error MSB6006: "csc.dll" exited with code 139' on arm64 (dotnet-sdk-2.2.100-linux-arm64.tar.gz)

root@odroid-stretch64:/opt/webapp2# dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.2.100
Commit: b9f2fa0ca8

Runtime Environment:
OS Name: debian
OS Version: 9
OS Platform: Linux
RID: debian.9-arm64
Base Path: /usr/share/dotnet/sdk/2.2.100/

Host (useful for support):
Version: 2.2.0
Commit: 1249f08fed

.NET Core SDKs installed:
2.2.100 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.NETCore.App 2.2.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
root@odroid-stretch64:/opt/webapp2# dotnet publish -c release
Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

Restore completed in 262.96 ms for /opt/webapp2/webapp2.csproj.
/usr/share/dotnet/sdk/2.2.100/Roslyn/Microsoft.CSharp.Core.targets(52,5): error MSB6006: "csc.dll" exited with code 139. [/opt/webapp2/webapp2.csproj]
`

@janvorli
Copy link
Member

janvorli commented Dec 10, 2018

I can confirm I ran repro it reliably on my Raspberry PI 3 with aarch64 arch linux. From the first look at the stack trace it looks like a GC hole. I will look into it.

@janvorli janvorli self-assigned this Dec 10, 2018
@janvorli
Copy link
Member

I've found what's wrong. It is not a GC hole, but rather a JIT bug when accessing Nullable<System.Security.Cryptography.HashAlgorithmName> argument in Microsoft.CodeAnalysis.Emit.EmitOptions..ctor(Boolean, Microsoft.CodeAnalysis.Emit.DebugInformationFormat, System.String, System.String, Int32, UInt64, Boolean, Microsoft.CodeAnalysis.SubsystemVersion, System.String, Boolean, Boolean, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Emit.InstrumentationKind>, System.Nullable<System.Security.Cryptography.HashAlgorithmName>)

If I recall it correctly, Nullable<T> type arguments should be passed as boxed T arguments, it means null if the nullable was empty or boxed T if it was not. However, the caller passes it as a byte (Nullable<T>.hasValue) immediately followed by T (the T goes at address of the hasValue + 1).
And the Microsoft.CodeAnalysis.Emit.EmitOptions..ctor tries to read it as if it was a byte (Nullable<T>.hasValue) followed by T at address of the hasValue + 8.
So both caller and callee are doing it wrong.

The relevant part of the callee code looks like this:

0000ffff3f3de8a0 a0630191             add     x0, x29, #0x58 <<< Arg location Nullable<System.Security.Cryptography.HashAlgorithmName>
^^^^^^^^^^^^^^^^ The value at that location contains byte 0x01 followed by eight bytes of the System.Security.Cryptography.HashAlgorithmName
0000ffff3f3de8a4 0b004039             ldrb    w11, [x0]
0000ffff3f3de8a8 ab630039             strb    w11, [x29, #0x18] <<< local Nullable<System.Security.Cryptography.HashAlgorithmName> (hasValue )
0000ffff3f3de8ac 000440f9             ldr     x0, [x0, #0x8] 
0000ffff3f3de8b0 a01300f9             str     x0, [x29, #0x20] <<< local Nullable<System.Security.Cryptography.HashAlgorithmName> (the value)

And the relevant part of the code of the caller (Microsoft.CodeAnalysis.CSharp.CSharpCommandLineParser.Parse(System.Collections.Generic.IEnumerable<System.String>, System.String, System.String, System.String)):

0000ffff3fcf9844 e0a30039             strb    w0, [sp, #0x28] <<< This is the 'hasValue' member 
0000ffff3fcf9848 eb9302f8             stur    x11, [sp, #0x29] <<< This is the actual value
0000ffff3fcf984c e00317aa             mov     x0, x23
0000ffff3fcf9850 abc340f9             ldr     x11, [x29, #0x180]
0000ffff3fcf9854 eb0300f9             str     x11, [sp]
0000ffff3fcf9858 cbcffff0             adrp    x11, -1541
0000ffff3fcf985c 6b413d91             add     x11, x11, #0xf50
0000ffff3fcf9860 030080d2             mov     x3, #0x0
0000ffff3fcf9864 040080d2             mov     x4, #0x0
0000ffff3fcf9868 c9cffff0             adrp    x9, -1541
0000ffff3fcf986c 29413d91             add     x9, x9, #0xf50
0000ffff3fcf9870 290140f9             ldr     x9, [x9]
0000ffff3fcf9874 20013fd6             blr     x9

Due to this issue, the call to Microsoft.CodeAnalysis.Emit.EmitOptions::set_PdbChecksumAlgorithm at the end of the constructor sets the PdbChecksumAlgorithm property to a garbage value instead of a valid string reference.

I've debugged it with 2.2.101-rtm-009628 release of the .NET core SDK (coreclr commit 418e094916).
cc @dotnet/jit-contrib, @jashook

@AndyAyersMS
Copy link
Member

I think Nullable<T> is just an ordinary struct from an ABI standpoint. So would hazard a guess that the caller is wrong here and the callee is ok?

This should repro for any Nullable<T> passed as the last of a large number of arguments (enough to exhaust all the register slots and force the nullable to be passed on the stack).

@jkotas
Copy link
Member

jkotas commented Dec 11, 2018

Nullable<T> type arguments should be passed as boxed T arguments, it means null if the nullable was empty or boxed T if it was not.

That is not correct.

I think Nullable<T> is just an ordinary struct from an ABI standpoint.

That is correct.

@janvorli
Copy link
Member

Ah, I got mislead by the reflection code - what I've said is true only for "this" reference.

@janvorli
Copy link
Member

@AndyAyersMS just in case you've missed that from the conversation above, the issue is fixed in master, so it would be great to figure out which commit was the cure and port it to 2.2.

@AndyAyersMS
Copy link
Member

Looked for likely PRs but nothing looked exactly like this. I would have to do some digging. Before I do that let me see if anyone else recognizes this issue with passing or receiving (potentially odd-sized) structs as memory args on Arm64.

@dotnet/arm64-contrib does the above ring any bells? Something that got fixed in the past few months?

@BruceForstall
Copy link
Contributor

We don't support ARM64 in 2.x (https://github.com/dotnet/coreclr/issues/19843), so do we need to keep this issue open?

@AndyAyersMS
Copy link
Member

Agree -- given that ARM64 is not supported in 2.2, I think we should close this.

@memory125
Copy link

I have the same issue on Ubuntu 18.04-ARM64.
image

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@msftgits msftgits added this to the 2.2.x milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests