Skip to content

Commit 6fc5765

Browse files
authored
DOCS-3886: Add advanced Go module debugging (#4239)
1 parent 99fce69 commit 6fc5765

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/manage/troubleshoot/troubleshoot.md

+15
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,21 @@ To disable this behavior, see [Disable log deduplication](/operate/reference/via
162162

163163
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/).
164164

165+
### Advanced debugging for Go modules
166+
167+
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.
168+
Run the following command, replacing `<PID>` with your module's process identifier:
169+
170+
```sh {class="command-line" data-prompt="$"}
171+
kill -3 <PID>
172+
```
173+
174+
The process will dump a stack trace, visible in the `viam-server` logs, that shows:
175+
176+
- All currently running goroutines and their states
177+
- Where execution is blocked or deadlocked
178+
- Internal state information that might not appear in regular logs
179+
165180
## Remote shell on the machine
166181

167182
To remotely access your machine from your terminal:

0 commit comments

Comments
 (0)