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

No process with the specified id is currently running #2271

Closed
RoySalisbury opened this issue May 8, 2018 · 2 comments
Closed

No process with the specified id is currently running #2271

RoySalisbury opened this issue May 8, 2018 · 2 comments
Labels

Comments

@RoySalisbury
Copy link

Environment data

.NET Core SDK (reflecting any global.json):
Version: 2.1.300-rc1-008673
Commit: f5e3ddbe73

Runtime Environment:
OS Name: raspbian
OS Version: 9
OS Platform: Linux
RID: linux-arm
Base Path: /opt/dotnet/sdk/2.1.300-rc1-008673/

Host (useful for support):
Version: 2.1.0-rc1
Commit: eb9bc92051

.NET Core SDKs installed:
2.1.300-rc1-008673 [/opt/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0-rc1-final [/opt/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0-rc1-final [/opt/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.0-preview2-26406-04 [/opt/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0-rc1 [/opt/dotnet/shared/Microsoft.NETCore.App]

Steps to reproduce

Run app on target (raspberry pi) using
sudo dotnet app.dll

Attach the VS 2017 debugger to the process via built in SSH connection. Process list populates, but unable to attach to process with the following error:

ProtocolException: No process with the specified id is currently running.

Debug Adapter Host Log

1> DebugAdapterHost version: 15.7.20405.1 commit:f1fc901d14b6bd00a30d15119e71425213a91d71
1> Determining user folder on remote system...
1> Checking for existing installation of debugging tools...
1> Executing command '[ -x "/home/pi/.vs-debugger/GetVsDbg.sh" -a ! -d "/home/pi/.vs-debugger/GetVsDbg.sh" ]' with arguments ''
1> Command exited with code '0'
1> Launching remote debugger...
1> Starting '/home/pi/.vs-debugger/GetVsDbg.sh' with arguments '-v vs2017u5 -l "/home/pi/.vs-debugger/vs2017u5" -d vscode'
1> [DebugAdapter] --> C (initialize-1): {"command":"initialize","arguments":{"clientID":"visualstudio","clientName":"Visual Studio","adapterID":"coreclr","locale":"en-US","linesStartAt1":true,"columnsStartAt1":true,"pathFormat":"path","supportsVariableType":true,"supportsRunInTerminalRequest":true,"supportsHandshakeRequest":true},"seq":1,"type":"request"}
1> Debug adapter non-protocol standard output: Using arguments
Version : 'vs2017u5'
Location : '/home/pi/.vs-debugger/vs2017u5'
SkipDownloads : 'false'
LaunchVsDbgAfter : 'true'
VsDbgMode : 'vscode'
RemoveExistingOnUpgrade : 'false'
Info: Using vsdbg version '15.7.20425.2'
Info: Last installed version of vsdbg is '15.7.20425.2'
Info: VsDbg is upto date
Info: Skipping downloads
Info: Launching vsdbg
1> [DebugAdapter] <-- R (initialize-1): {"seq":0,"type":"response","request_seq":1,"success":true,"command":"initialize","message":"","body":{"supportsConfigurationDoneRequest":true,"supportsFunctionBreakpoints":false,"supportsConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"exceptionBreakpointFilters":[{"filter":"all","label":"All Exceptions","default":false},{"filter":"user-unhandled","label":"User-Unhandled Exceptions","default":true}],"supportsSetVariable":true,"supportsModulesRequest":true,"additionalModuleColumns":[{"attributeName":"vsLoadAddress","label":"Load Address","type":"string"},{"attributeName":"vsPreferredLoadAddress","label":"Preferred Load Address","type":"string"},{"attributeName":"vsModuleSize","label":"Module Size","type":"number"},{"attributeName":"vsLoadOrder","label":"Order","type":"number"},{"attributeName":"vsTimestampUTC","label":"Timestamp","type":"unixTimestampUTC"},{"attributeName":"vsIs64Bit","label":"64-bit","type":"boolean"},{"attributeName":"vsAppDomain","label":"AppDomain","type":"string"},{"attributeName":"vsAppDomainId","label":"AppDomainId","type":"number"}],"supportedChecksumAlgorithms":["MD5","SHA1","SHA256"],"supportsExceptionOptions":true,"supportsValueFormattingOptions":true,"supportsExceptionInfoRequest":true,"supportTerminateDebuggee":true,"supportsSetExpression":true,"supportsExceptionConditions":true,"supportsDebuggerProperties":true,"supportsSetSymbolOptions":true}}
1> [DebugAdapter] --> C (attach-2): {"command":"attach","arguments":{"name":".NET Core Attach","type":"coreclr","request":"attach","processId":"15777"},"seq":2,"type":"request"}
1> [DebugAdapter] <-- C (handshake-1): {"seq":1,"type":"request","command":"handshake","arguments":{"value":"YDPhIlMajZ5QYClwzcLdisvqE8lBLjcSR/d4Hf4GyGA="}}
1> [DebugAdapter] --> R (handshake-1): {"request_seq":1,"success":true,"command":"handshake","body":{"signature":"3819M8CycuaBxjxvYhZYOf7xTidqY7+no8CmsWx8rd3yoE="},"seq":3,"type":"response"}
1> [DebugAdapter] <-- E (output): {"seq":2,"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/vsdbg/AttachFailed","data":{"VS.Diagnostics.Debugger.vsdbg.AdapterId":"coreclr","VS.Diagnostics.Debugger.vsdbg.ErrorCode":2001,"VS.Diagnostics.Debugger.vsdbg.Distribution.Version":"9","VS.Diagnostics.Debugger.vsdbg.Distribution.Name":"b7159782","VS.Diagnostics.Debugger.vsdbg.OSFamily":"Linux","VS.Diagnostics.Debugger.vsdbg.Version":"15.7.20426.1 commit:91b285752d1135b8cdcdb3d74b44ca9faee48809"}}}
1> [DebugAdapter] <-- R (attach-2): {"seq":3,"type":"response","request_seq":2,"success":false,"command":"attach","message":"No process with the specified id is currently running."}
1> ERROR: Protocol error

ProtocolException: No process with the specified id is currently running.

Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.Protocol.DebugProtocol.SendRequestSyncCore[TArgs](IDebugRequest`1 request)
Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost.Engine.Implementation.DebuggedProcess.InitializeDebugAdapter(LaunchConfiguration launchJson)

1> ERROR: No process with the specified id is currently running.
1> WARNING: Debug adapter is still running after receiving DisconnectResponse, terminating.

@gregg-miskelly
Copy link
Contributor

gregg-miskelly commented May 8, 2018

@RoySalisbury The issue is that in order to attach to processes running as root, you need to also launch vsdbg as root (connect as 'root@machine' in the SSH dialog).

You are then running into our poor error message when trying to attach to a privileged process. That is tracked with #477

@RoySalisbury
Copy link
Author

RoySalisbury commented May 8, 2018

@gregg-miskelly

The problem I see with running as "root@machine" is that you now need a password for root, a login shell and a home directory.

Better to just add user to the correct groups (in this case dialup for serial access) so its not a special user. Though, some users that run services/daemons will not have a password or home directory. But for debug/development purposes, adding them is not too much to ask.

Elevating the permission for the requested user to launch vsdbg would be a better approach I think. though, that could have other issues (now your running your process with different access).

Roy

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

No branches or pull requests

2 participants