Why not paste it into an AI chatbot?
A goroutine dump from production is a map of your code: every package path, file name and function on every stack, and how your services are put together. A chatbot sends all of it to another company's servers, where it may be kept. Many companies' rules forbid pasting production data or internal code into one.
This page reads the dump in your browser and sends it nowhere. Check it yourself: open your browser's developer tools, go to the Network tab, and paste a dump. No request goes out. When you leave the page, it sends one small note for our own statistics: how many goroutines the dump had, which kinds of problem it found, and, if you have been here before, how many days ago. Never a function name, a file, or any line of the dump.
It is also repeatable: the same dump always gives the same answer, from rules tested against real dumps. Use both: find the stuck group here, then ask about the one function in your own code, not the whole dump.
What it finds
- Goroutine leaks: many goroutines stuck sending on the same line, and, with two dumps, a group that grows.
wg.Wait()before reading: a WaitGroup waiting for workers that wait for it.- Lock queues on a
sync.Mutex, and readers stuck behind a waiting writer on anRWMutex. - Goroutines blocked forever on a nil channel or an empty
select. - Idle worker pools, and network reads in
IO wait, which are normal. - Crashes: all goroutines are asleep, concurrent map writes and send on closed channel.
How to take a goroutine dump
- With
import _ "net/http/pprof":curl http://localhost:6060/debug/pprof/goroutine?debug=2. - Without it:
kill -QUIT <pid>prints every goroutine to standard error, then the program exits. - From code:
pprof.Lookup("goroutine").WriteTo(w, 2), orruntime.Stack(buf, true). - To tell a leak from a busy moment, take two dumps a minute apart and paste them one after the other.
How we know it reads dumps right
A Go program puts itself into known situations (a leak, a contended mutex, a writer waiting on anRWMutex, wg.Wait() before reading, nil channels, idle workers, network reads, three crashes) and dumps itself, through pprof, debug=1 and SIGQUIT. Tests check this page's reading of those real dumps from Go 1.26 and 1.27, and CI captures them again on every Go release it tests.
Reading Java instead? Try the Java thread dump analyzer.
Common questions
How do I get a goroutine dump?
If the program imports net/http/pprof, open /debug/pprof/goroutine?debug=2. Otherwise send it SIGQUIT (kill -QUIT <pid>, or Ctrl-\ in a terminal): it prints every goroutine and exits. A panic or a fatal error prints the goroutine that crashed. This page reads all three.
How do I find a goroutine leak?
Look for many goroutines stuck on the same line, usually in chan send or select. This page groups goroutines by state and stack, so 30 leaked workers show up as one line with a count. Paste a second dump from a little later: if the same group grew, it is a leak, and the page says so.
Which goroutine holds the mutex?
A Go dump does not say. It shows the goroutines waiting in sync.Mutex.Lock but not the owner, so this page groups the waiters and leaves finding the holder to you: look for a goroutine running or sleeping inside a function that takes the same lock.
What is the difference between debug=1 and debug=2?
debug=2 lists every goroutine with its state (chan send, IO wait, ...). debug=1 gives one entry per stack with a count and no states. This page reads both, but only debug=2 says what goroutines are waiting for.
Is it safe to paste a goroutine dump into an AI chatbot?
Think twice with one from production. Its package paths, file names and function names describe your code, and a chatbot sends them to another company's servers. This page reads the dump in your browser instead: nothing is uploaded.