Skip to content

error resizing pty: bad file descriptor AND Debuggee is not running. Setting breakpoints without halting. #257

Open
@lz006

Description

Hi Thanks for your very interesting approach but we still can't get it to debug a golang app from within our cluster.

If we run it in CLI mode we always get:

Attaching debugger
? Select a debugger dlv
? Select a namespace to debug topolvm-system
? Select a pod node-5dtxx
? Select a container topolvm-node
? Going to attach dlv to pod node-5dtxx. continue? Yes
Squash will create a debugger pod in your target pod's namespace.
Creating service account squash-plank in namespace squash-debugger

Creating cluster role squash-plank-cr 

Creating cluster role binding squash-plank-crb 

All squashctl permission resources created.

Pod creating
Forwarding from 127.0.0.1:45495 -> 34565
Forwarding from [::1]:45495 -> 34565
INFO[0023] error resizing pty: bad file descriptor 

and if we were run squash by VS Code we get:

Verbose logs are written to:
/tmp/vscode-go-debug.txt
2020-10-27, 09:08:28.415 UTC
From client: initialize({"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"go","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us","supportsProgressReporting":true})
InitializeRequest
To client: {"seq":0,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsSetVariable":true}}
InitializeResponse
From client: launch({"name":"Remote","type":"go","request":"launch","mode":"remote","port":40721,"host":"127.0.0.1","program":"/root/projects/topolvm","remotePath":null,"env":{"XDG_SESSION_ID":"1934","HOSTNAME":"node1","SELINUX_ROLE_REQUESTED":"","SHELL":"/bin/bash","HISTSIZE":"1000","SSH_CLIENT":"10.0.0.2 40280 22","SELINUX_USE_CURRENT_RANGE":"","USER":"root","VSCODE_AGENT_FOLDER":"/root/.vscode-server","MAIL":"/var/spool/mail/root","PATH":"/root/.vscode-server/bin/58bb7b2331731bf72587010e943852e13e6fd3cf/bin:/root/.vscode-server/bin/58bb7b2331731bf72587010e943852e13e6fd3cf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin","PWD":"/root","LANG":"en_US.UTF-8","SELINUX_LEVEL_REQUESTED":"","HISTCONTROL":"ignoredups","SHLVL":"4","HOME":"/root","LOGNAME":"root","SSH_CONNECTION":"10.0.0.2 40280 10.0.0.66 22","LESSOPEN":"||/usr/bin/lesspipe.sh %s","XDG_RUNTIME_DIR":"/run/user/0","_":"/root/.vscode-server/bin/58bb7b2331731bf72587010e943852e13e6fd3cf/node","VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH":"/root/.vscode-server/bin/58bb7b2331731bf72587010e943852e13e6fd3cf/remote/node_modules","VSCODE_LOGS":"/root/.vscode-server/data/logs/20201027T094814","AMD_ENTRYPOINT":"vs/server/remoteExtensionHostProcess","PIPE_LOGGING":"true","VERBOSE_LOGGING":"true","VSCODE_EXTHOST_WILL_SEND_SOCKET":"true","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","VSCODE_LOG_STACK":"false","VSCODE_NLS_CONFIG":"{\"locale\":\"en\",\"availableLanguages\":{}}","VSCODE_IPC_HOOK_CLI":"/tmp/vscode-ipc-7855[...]
LaunchRequest
Start remote debugging: connecting 127.0.0.1:40721
To client: {"seq":0,"type":"event","event":"initialized"}
InitializeEvent
To client: {"seq":0,"type":"response","request_seq":2,"command":"launch","success":true}
From client: setBreakpoints({"source":{"name":"node.go","path":"/root/projects/topolvm/driver/node.go"},"lines":[61],"breakpoints":[{"line":61}],"sourceModified":false})
SetBreakPointsRequest
Debuggee is not running. Setting breakpoints without halting.

squashctl version 0.5.18
k8s version 1.18.6

Please could someone help us out? Or are we facing a bug?

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions