From 451fe87299fac6845a597baf968879a60ab6c517 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Fri, 13 Sep 2019 15:10:21 +0200 Subject: [PATCH] Updated Debugging (markdown) --- Debugging.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Debugging.md b/Debugging.md index 880cd13..601dfd4 100644 --- a/Debugging.md +++ b/Debugging.md @@ -1,8 +1,12 @@ ## Memory Leaks & Goroutine Leaks -A good example for a goroutine & memory leak caused by not draining a channel is -[3bfe0c16d0233cac66a01a6f89959c34ef01c663](https://github.com/zrepl/zrepl/commit/3bfe0c16d0233cac66a01a6f89959c34ef01c663d) ("rpc/dataconn/stream: fix goroutine leaks & transitive buffer leaks") +Good exapmles for situations where the following instructions helped with debugging: +* goroutine & memory leak caused by not draining a channel is +[3bfe0c16d0233cac66a01a6f89959c34ef01c663](https://github.com/zrepl/zrepl/commit/3bfe0c16d0233cac66a01a6f89959c34ef01c663d) ("rpc/dataconn/stream: fix goroutine leaks & transitive buffer leaks") +* follow up [ffea0241622e885617d8536c9c2e60c7b2248c28](https://github.com/zrepl/zrepl/commit/ffea0241622e885617d8536c9c2e60c7b2248c28) + +### Instructions 1. Run zrepl with autostarted pprof server on port `:12345` and prometheus endpoint on `:22345` * configure prometheus endpoint in [config]( https://zrepl.github.io/configuration/monitoring.html?highlight=prometheus#prometheus-grafana) * `zrepl pprof on :12345` if the daemon is already running (for example when we want to capture a rare deadlock which would be resolved by restarting the daemon)