Skip to content
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

Debugger crashes on Linux when debugging stops #2439

Closed
jchand99 opened this issue Jul 26, 2018 · 4 comments
Closed

Debugger crashes on Linux when debugging stops #2439

jchand99 opened this issue Jul 26, 2018 · 4 comments

Comments

@jchand99
Copy link

Environment data

dotnet --info output:
NET Core SDK (reflecting any global.json):
Version: 2.1.302
Commit: 9048955601

Runtime Environment:
OS Name: arch
OS Version:
OS Platform: Linux
RID: arch-x64
Base Path: /opt/dotnet/sdk/2.1.302/

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

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

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.2 [/opt/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.2 [/opt/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.2 [/opt/dotnet/shared/Microsoft.NETCore.App]

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

VS Code version: 1.25.1
C# Extension version: 1.15.2

Steps to reproduce

In launch.json, set "console": to either "integratedTerminal" or "externalTerminal" and run a program like hello world.

Expected behavior

Close the program successfully.

Actual behavior

When the program finishes, it prints out this message in the terminal:

free(): invalid pointer
/usr/bin/bash: line 1: 28260 Aborted (core dumped) ''/home/kas/.vscode/extensions/ms-vscode.csharp-1.15.2/.debugger/vsdbg --interpreter=vscode --connection=/tmp/CoreFxPipe_vsdbg-ui-08464cdc40724bc882a7322eac8fca87

and the program does not stop running, you have to click the red square to get the program to exit.

@gregg-miskelly
Copy link
Contributor

Thanks for the report. We actually knew about the issue, but we hadn't thought about the fact that using integratedTerminal/externalTerminal would show the problem (it happens even in internalConsole mode, but the crash gets ignored).

This is a bug caused by a bad interaction between our code, and CoreCLR that we are working with the CoreCLR team on.

@jchand99
Copy link
Author

Gotcha, I noticed it a while back, just never got to actually reporting it. I just started using the internalConsole to get my programs to exit correctly after running; glad to know you guys are on top of it.

@gregg-miskelly gregg-miskelly changed the title free(): invalid pointer error on program finish Debugger crashes on Linux when debugging stops Sep 4, 2018
@jchand99
Copy link
Author

jchand99 commented Oct 8, 2018

I noticed there was an update for the C# extension, I went ahead and updated it which allowed the omnisharp server to enable and run correctly. Although the server is now running fine, (it was failing before the update today), the debugger still crashes:

Output from running a basic HelloWorld console app using integratedTerminal as the console:

/home/kas/.vscode/extensions/ms-vscode.csharp-1.16.2/.debugger/vsdbg --interpreter=vscode --connection=/tmp/CoreFxPipe_vsdbg-ui-aa37939c4da44967998d6c2c5d8474d0
Hello World!
Process is terminating due to StackOverflowException.
Aborted (core dumped)

I apologize if this is not where to post this/if I did something incorrectly.

@Xorcist77
Copy link

Xorcist77 commented Oct 10, 2018

The debugger (version 1.16.2) is crashing for me as well on shutdown of any app with the following exception:

bash: line 1: 10836 Segmentation fault (core dumped) ''/home/maxeta/.vscode/extensions/ms-vscode.csharp-1.16.2/.debugger/vsdbg --interpreter=vscode --connection=/tmp/CoreFxPipe_vsdbg-ui-fbdba0b1cb564b9bac0c6dc9b15e23a3

here is my dotnet --info:

.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-x64
 Base Path:   /usr/share/dotnet/sdk/2.1.403/

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

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

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

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

I am using an external terminal, not the integrated one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants