-
Notifications
You must be signed in to change notification settings - Fork 650
Could not attach to pid:#### this could be caused by a kernel security setting, try writing "0" to /proc/sys/kernel/yama/ptrace_scope #3098
Comments
This is because Yama blocks ptrace attach. https://www.kernel.org/doc/Documentation/security/Yama.txt Please try to do what the error message says
E.g. |
@Anjana-Prabhakar did you manage to solve the problem? @stamblerre @ramya-rao-a can you mark this as needs more info? Thanks! |
I could not try it out as i was travelling when the lockdown owing to corona spread was announced and am stuck at a place with no access to my laptop. I shall revert once I get access. Thanks for the help.
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: Hyang-Ah Hana Kim <notifications@github.com>
Sent: Friday, April 3, 2020 8:15:06 PM
To: microsoft/vscode-go <vscode-go@noreply.github.com>
Cc: PH2015014 Anjana Prabhakar <anjana.prabhakar@iiitb.org>; Mention <mention@noreply.github.com>
Subject: Re: [microsoft/vscode-go] Could not attach to pid:#### this could be caused by a kernel security setting, try writing "0" to /proc/sys/kernel/yama/ptrace_scope (#3098)
@Anjana-Prabhakar<https://github.com/Anjana-Prabhakar> did you manage to solve the problem?
@stamblerre<https://github.com/stamblerre> @ramya-rao-a<https://github.com/ramya-rao-a> can you mark this as needs more info? Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#3098 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHFXQLYM7ZCN6GIWJYQ24KLRKXY7FANCNFSM4LG4W6QA>.
|
I have this same issue. tried config: {
"version": "0.2.0",
"configurations": [
{
"name": "Attach",
"type": "go",
"request": "attach",
"mode": "local",
"processId":74570,
}
]
}
|
@festum As the error message indicates, that is a different issue. Is your binary compiled with optimization disabled? |
This issue has been closed automatically because it needs more information and has not had recent activity. Thank you for your contributions. |
Please direct general questions to:
Please review the Wiki before filing an issue.
Helpful pages include:
Please answer these questions before submitting your issue. Thanks!
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Gocode -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders78a4c91400152c0f27ba4d363eb56d2835f9903a
x64
go env GOOS GOARCH
to get the operating system and processor arhcitecture detailsamd64
Share the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
prefixes.The command output was:
bash: syntax error near unexpected token
('the output to
Preferences: Open Settingswas
command not found`On opening settings,json file,
Describe the bug
A clear and concise description of what the bug.
A clear and concise description of what you expected to happen.
I have a go application tendermint running which creates blocks of a blockchain. On running debug using the attach option as shown below:
i get an error
Could not attach to pid:30834 this could be caused by a kernel security setting, try writing "0" to /proc/sys/kernel/yama/ptrace_scope
Steps to reproduce the behavior:
Screenshots or recordings
If applicable, add screenshots or recordings to help explain your problem.
The text was updated successfully, but these errors were encountered: