Skip to content

DOCS-3886: Add advanced Go module debugging #4239

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/manage/troubleshoot/troubleshoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,21 @@ To disable this behavior, see [Disable log deduplication](/operate/reference/via

To access logs from the commandline, use [`viam machines logs`](/dev/tools/cli/#machines-alias-robots) on the command line or the [Machines API](/dev/reference/apis/robot/).

### Advanced debugging for Go modules

If you have a Go module that doesn't shut down properly or hangs during operation, you can get more information by sending a SIGQUIT signal to the process.
Run the following command, replacing `<PID>` with your module's process identifier:

```sh {class="command-line" data-prompt="$"}
kill -3 <PID>
```

The process will dump a stack trace, visible in the `viam-server` logs, that shows:

- All currently running goroutines and their states
- Where execution is blocked or deadlocked
- Internal state information that might not appear in regular logs

## Remote shell on the machine

To remotely access your machine from your terminal:
Expand Down
Loading