Roslyn: error MSB6006: "csc.dll" exited with code 139

Created on 30 Apr 2018  路  14Comments  路  Source: dotnet/roslyn

Version Used:
the version embedded in the dotnet SDK version 2.2.100-preview1-008633 (daily build)

Steps to Reproduce:

  1. edit nuget.config file:
  2. navigate to any folder u like and using "dotnet new console" to create a .net core 2.1 console application
  3. dotnet build

note: my system is ubuntu 16.04 ARM64

Expected Behavior:
successfully build.

Actual Behavior:
.../sdk/2.2.100-preview1-008633/Roslyn/Microsoft.CSharp.Core.targets(52,5): error MSB6006: "csc.dll" exited with code 139. [/home/nvidia/Desktop/test/test.csproj]

build log:s (with -v diag)
log.txt

Area-Compilers

Most helpful comment

@jcouv Actually this issue only occurs on Linux ARM64 system and currently I don't have the environment to repo it. You can try executing "dotnet build" on Linux ARM64, I think this issue will 100% repo.

All 14 comments

@hez2010 Here's what I'd recommend you try:

Here are some steps to see the reason for the compilation failing:

  1. run the problematic build command, but add the option for binary logging /bl (for example, dotnet build /bl)
  2. assuming this reproduced the issue, open the msbuild.binlog file with the binary log viewer.
  3. the log viewer should show the failed Csc task (as shown below)
  4. you can view and copy the command-line arguments to a text file repro.rsp, removing the first two chunks (the first one for "dotnet.exe" and the second one for "csc.dll")
  5. re-use those two chunks to run dotnet.exe csc.dll @repro.rsp
  6. this should repro, but also print out the compiler diagnostics

image

Tagging @livarcocc, in case he has something to add. Livar, are there any known issues where CLI doesn't print out the compiler diagnostics? I thought there was one, but it had been fixed.

I didn't hear back on my request for additional information, so I'll go ahead and close the issue.
The problem of the error details not getting displayed was fixed in the compiler (https://github.com/dotnet/roslyn/pull/27349) and we'll have to wait for that fix to make its way into the CLI.
If the problem still occurs, please open an issue with more details. Thanks

@jcouv I have the same issue and i did the steps you have wrote above.

The output is:

Microsoft (R) Visual C# Compiler version 2.8.1.62915 (ff873b4b)
Copyright (C) Microsoft Corporation. All rights reserved.

warning CS2023: Ignoring /noconfig option because it was specified in a response file
Segmentation fault (core dumped)

I am running on openSUSE Tumbleweed (JeOS 4.16.6-1-default, aarch64) on a Raspberry PI 3B+. I use .NET Core SDK 2.1.300.

I got this error , too.

I found this url to download dotnetcore sdk , and tried it on arm64 :
https://www.microsoft.com/net/download/thank-you/dotnet-sdk-2.1.300-linux-arm64-binaries

I can run dotnetcore apps which I complied on Windows , but when I tried to build a helloworld app , an error occured:
"error MSB6006: "csc.dll" exited with code 139"

@xclud I will try to find out how to get a stacktrace from a crashed process on Linux.
Is there any chance you could try and repro on windows? (the troubleshooting experience is easier there)

@kxxt Would you be able to share a crash dump of this crash (since you said it was on Windows)? Here are some instructions for turning that one. Then you can share via any online drive. Thanks

@jcouv Actually this issue only occurs on Linux ARM64 system and currently I don't have the environment to repo it. You can try executing "dotnet build" on Linux ARM64, I think this issue will 100% repo.

Have the same issue. Just installed dotnet sdk 2.1.302 on a fresh Debian 9 arm64. And any try to build a project results in error from this topic

I have the same issue on my Jetson TX2 (arm64 - ubuntu 16.04).

@jcouv I do not face any issues on Windows. I compile for windows on windows and also cross-compile on windows for linux (x64 and arm64). No problem at all.

To me, the problem happens only when i compile on my raspberry pi.

This is likely an ARM64 runtime issue. Tagging @RussKeldorph for that.

I have the same issue on ROCK64 V2 4G RAM. I can build project, run dotnet restore. When I run dotnet run for console application I am getting: /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.

/opt/dotnet-sdk-2.1.402/sdk/2.1.402/Roslyn/Microsoft.CSharp.Core.targets(52,5): error MSB6006: "csc.dll" exited with code 139.

Build FAILED.

Ubuntu 16.04 AARCH64

@olgierdd and @Olivia-Blundell

Please provide logs for your issue at:
https://github.com/dotnet/coreclr/issues/19578

This is the coreclr repo of dotnet. The issue is still open. You may find a better response there.

I have the same problem ,my project run on androd Linux Deploy

Welcome to Ubuntu 16.04 LTS (GNU/Linux 4.9.65-perf+ armv8l)

build error:

Restore completed in 63.74 ms for /home/android/gitCodes/myGit/OrchardCore/test/OrchardCore.Tests.Pages/OrchardCore.Application.Pages/OrchardCore.Application.Pages.csproj.
/home/dotnet/sdk/2.1.403/Roslyn/Microsoft.CSharp.Core.targets(52,5): error MSB6006: "csc.dll" exited with code 139. [/home/android/gitCodes/myGit/OrchardCore/src/OrchardCore/OrchardCore.BackgroundTasks.Abstractions/OrchardCore.BackgroundTasks.Abstractions.csproj]
/home/dotnet/sdk/2.1.403/Roslyn/Microsoft.CSharp.Core.targets(52,5): error MSB6006: "csc.dll" exited with code 139. [/home/android/gitCodes/myGit/OrchardCore/src/OrchardCore/OrchardCore.Data.Abstractions/OrchardCore.Data.Abstractions.csproj]
/home/dotnet/sdk/2.1.403/Roslyn/Microsoft.CSharp.Core.targets(52,5): error MSB6006: "csc.dll" exited with code 139. [/home/android/gitCodes/myGit/OrchardCore/src/OrchardCore/OrchardCore.XmlRpc.Abstractions/OrchardCore.XmlRpc.Abstractions.csproj]
/home/dotnet/sdk/2.1.403/Roslyn/Microsoft.CSharp.Core.targets(52,5): error M

Was this page helpful?
0 / 5 - 0 ratings

Related issues

codingonHP picture codingonHP  路  3Comments

orthoxerox picture orthoxerox  路  3Comments

vbcodec picture vbcodec  路  3Comments

MadsTorgersen picture MadsTorgersen  路  3Comments

glennblock picture glennblock  路  3Comments