Open Kwofie-mex opened 2 years ago
@danroth27 can you assist with this?
Hmm...not sure. @pranavkm ?
139 usually means access violation. Is this error consistent? Do you get this running other dotnet
commands?
Yes! This is a little bit worrying. This happens when I want to run a small project in .NET 6 or .NET 5. This message is:
watch : Started
watch : Exited with error code 139
watch : Waiting for a file to change before restarting dotnet...
And that appears when I use the command dotnet watch run
or dotnet run
. Also when I try to run from the folder bin/Debug/My-project
, another message appears: Violación de segmento ('core' generado)
, which translates to English (if I am not mistaken) as Core Dump (Segmentation fault)
. I don't know why this happens and I cannot use .NET in my machine.
Some info:
5.13.0-28-generic
.dotnet
version 6.0.101 and the last from .NET 5 (I think it is 5.0.404).Unhandled exception. System.OperationCanceledException: The operation was canceled. at System.Threading.CancellationToken.ThrowOperationCanceledException() at System.Threading.CancellationToken.ThrowIfCancellationRequested() at Microsoft.CodeAnalysis.EditAndContinue.CommittedSolution.<>c__DisplayClass15_0.<<GetMatchingDocumentsAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.CodeAnalysis.EditAndContinue.CommittedSolution.GetMatchingDocumentsAsync(IEnumerable`1 documentsByProject, Func`2 compilationOutputsProvider, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.EditAndContinue.EditAndContinueWorkspaceService.StartDebuggingSessionAsync(Solution solution, IManagedHotReloadService debuggerService, ImmutableArray`1 captureMatchingDocuments, Boolean captureAllMatchingDocuments, Boolean reportDiagnostics, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.ExternalAccess.Watch.Api.WatchHotReloadService.StartSessionAsync(Solution solution, CancellationToken cancellationToken) at Microsoft.DotNet.Watcher.Tools.CompilationWorkspaceProvider.CreateProject(TaskCompletionSource`1 taskCompletionSource, Task`1 hotReloadCapabilitiesTask, String projectPath, IReporter reporter, CancellationToken cancellationToken) at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state) at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() at System.Threading.Thread.StartCallback()
Same problem with dotnet
version 6.0.102.
Is it possible you're building from/to a protected directory?
The solution is weird, I don't know why. I have installed dotnet
through snap
and it was working fine, no problem there. Suddenly on February when I tried to run some projects, it didn't work, it showed watch : Exited with error code 139
. I tried two possible solutions: the first one, I downloaded the binaries from here and I used the executable (for the versions 5 and 6). Same error. The second solution was to install from apt (I am using Ubuntu) using this guide. It worked!. Again, I don't know why, but I can run any project using dotnet run
or dotnet watch run
. Although this does not answer the question: why did that kind of error show up?
We were debugging an issue where our .NET containers (linux) sometimes exit with 139 errors and I later found that if the .NET app (which runs as the entrypoint to the container) throws an unhandled exception (same as in @rosgori's comment), then the container consistently has an exit code of 139. What is even more confusing is that if you shell into the same container and run the "dotnet my-app.dll" manually you get an exit code of 134 (Abort) when an unhandled exception is thrown. You can simulate this with any .NET app (from 3.1 to 6.0) where you simply throw an exception in the Main method.
https://github.com/dotnet/core/issues/7112#issuecomment-1033292899 thanks your solutions works
We are trying to fix our docs to warn people about snap being mostly broken for dotnet tools: https://github.com/dotnet/docs/pull/31045
The solution is weird, I don't know why. I have installed
dotnet
throughsnap
and it was working fine, no problem there. Suddenly on February when I tried to run some projects, it didn't work, it showedwatch : Exited with error code 139
. I tried two possible solutions: the first one, I downloaded the binaries from here and I used the executable (for the versions 5 and 6). Same error. The second solution was to install from apt (I am using Ubuntu) using this guide. It worked!. Again, I don't know why, but I can run any project usingdotnet run
ordotnet watch run
. Although this does not answer the question: why did that kind of error show up?
Thank you so much! The 2nd solution did helped me.
I'm getting the same issue on archlinux, I'm using dotnet 6.0 I had no clue why this happen, I already try install manually, by script dotnet-install.sh and also from aur package dotnet-sdk-6.0
dotnet watch ❌ Exited with error code 139
dotnet watch ⏳ Waiting for a file to change before restarting dotnet...```
@nandafirmans I don't do much on Linux, but it doesn't look like archlinux is currently on the supported distro list for .NET 8: https://github.com/dotnet/core/blob/main/release-notes/8.0/supported-os.md.
@richlander Do you know if there are known issues running .NET on archlinux?
Does anyone have updates regarding this issue? We are currently using .NET Core SDK 7 (mcr.microsoft.com/dotnet/sdk:7.0) on Amazon Elastic Container Service (ECS). For several weeks now, we have been encountering these errors where the container is abruptly terminated with exit code 139. Unfortunately, there is no additional information provided to help us comprehend the root cause of the error.
Facing the same issue as @diegodfsd above. Tried Ubuntu amd64 and Alpine amd64 docker image. Same issue. Host OS is Ubuntu. Nothing in logs. Seems more easily triggered on Ubuntu vs Alpine, which takes longer. Tried debugging it for weeks now.
@arhue / @diegodfsd Do you have fix to this issue yet? It's being a bottle neck for one of my service with similar setup on ECS
Hi @huzaynbolt we solved our problem. In our case, the cause behind the abruptly terminated ECS Tasks was the usage of the IronPdf library that uses chromium, but after we made the library upgrade the issue was fixed.
How do your debug on ECS then? That's my struggle at the moment. Since ECS terminated the task upon the error and I can't retrieve the logs after it stopped
@huzaynbolt Sorry about the delay, missed the notification. Yes, for us it was because application was running out of memory
Problem encountered on https://dotnet.microsoft.com/en-us/learn/aspnet/blazor-tutorial/run Operating System: linux
Provide details about the problem you're experiencing. Include your operating system version, exact error message, code sample, and anything else that is relevant.