From e2a67f53647a986861a5173f0dc6ec948e7a7a7e Mon Sep 17 00:00:00 2001 From: Nikolay Martyanov Date: Fri, 8 Nov 2024 21:03:25 +0100 Subject: [PATCH] debug/collect-info: Include dump by goroutine leak detector. Add a step to copy the goroutine leak detector stack dump (sigusr1) from /persist/agentdebug/watcher/ to the collected output directory as `goroutin-leak-detector-stacks-dump`, if present. Signed-off-by: Nikolay Martyanov --- pkg/debug/scripts/collect-info.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/debug/scripts/collect-info.sh b/pkg/debug/scripts/collect-info.sh index bdf92b5855..5c3056c6a2 100755 --- a/pkg/debug/scripts/collect-info.sh +++ b/pkg/debug/scripts/collect-info.sh @@ -6,7 +6,7 @@ # Script version, don't forget to bump up once something is changed -VERSION=30 +VERSION=31 # Add required packages here, it will be passed to "apk add". # Once something added here don't forget to add the same package # to the Dockerfile ('ENV PKGS' line) of the debug container, @@ -457,6 +457,7 @@ ln -s /persist/log "$DIR/persist-log" ln -s /persist/netdump "$DIR/persist-netdump" ln -s /persist/kcrashes "$DIR/persist-kcrashes" [ -d /persist/memory-monitor/output ] && ln -s /persist/memory-monitor/output "$DIR/persist-memory-monitor-output" +[ -f /persist/agentdebug/watcher/sigusr1 ] && cp /persist/agentdebug/watcher/sigusr1 "$DIR/goroutin-leak-detector-stacks-dump" ln -s /run "$DIR/root-run" cp -r /sys/fs/cgroup/memory "$DIR/sys-fs-cgroup-memory" >/dev/null 2>&1 [ -f /persist/SMART_details.json ] && ln -s /persist/SMART_details* "$DIR/"