Created
April 10, 2022 09:52
-
-
Save pcolazurdo/bb26dfe3f5e8a186dd4367401f94bb85 to your computer and use it in GitHub Desktop.
How to analyse GOLANG Panic results
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Assumes you are capturing the output of your golang app panic into /tmp/crash | |
# Reason of the panic | |
head -3 /tmp/crash | |
# Register status (22 may change in different architectures) | |
tail -22 /tmp/crash | |
# Number of goroutines | |
cat /tmp/crash | grep goroutine | wc -l | |
# Will count the goroutines states | |
cat /tmp/crash | grep goroutine | awk '{print $3,$4}' | sort | uniq -c | sort -n | |
# will count goroutines modules freq | |
bat /tmp/crash | grep -a1 goroutine | grep -v goroutine | cut -d. -f1 | sort | uniq -c | sort -n | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment