How to work with core dumps of Go programs
If you want to check what is going on in your service during load (on production or during stress testing process), you can take a core dump of your app and load it into Goland for further debugging.
1 2 3 4 5 6 |
# first you need to get your app's PID ps aux|grep <your-app-bin-name> gcore <PID> # download dump file and binary file to a local machine with kubectl cp <some-namespace>/<some-pod>:/core.<PID> ~/Downloads kubectl cp <some-namespace>/<some-pod>:<your-app-bin-path> ~/Downloads |
Then open it your Goland:
Navigate to Run | Open Core Dump.
In the Executable field, specify a path to the binary file (for example, ~/Downloads/
In the Core Dump field, specify a path to the core file (for example, ~/Downloads/core.
Click OK. In the Debug tool window, select a frame that you want to inspect.
https://rakyll.org/coredumps/
https://www.jetbrains.com/help/go/exploring-go-core-dumps.html
(in Russian) https://habr.com/ru/company/domclick/blog/495450/
Similar Posts
LEAVE A COMMENT
Для отправки комментария вам необходимо авторизоваться.