Repository navigation
Conversation
A hung daemon is diagnosed from a goroutine dump. Ours was unattributable: eighty goroutines, a dozen of them agents, every agent stack byte-identical (actor.Queue.Recv <- Inbox.Recv <- act <- actProtected <- runWithRecovery), and no way to tell which one belonged to the aria that was not answering. Diagnosing a real stall meant guessing from goroutine ages and correlating against timestamps in another file. pprof.Do costs a map on one goroutine, and the label is INHERITED by every goroutine that one spawns: the turn loop, the tool dispatcher, the provider's stream reader. So the entire subtree of a stuck turn names itself, which is the case that matters - the interesting frame is never the agent loop, it is whatever the agent is blocked inside three levels down. Labels render in /debug/pprof/goroutine?debug=1 and in `go tool pprof -tagfocus=figaro.aria`. They do NOT render in the debug=2 full stack dump, which is the one people reach for first; the comment says so.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Independent of the rest of the stack; branches off
main.Why
A hung daemon is diagnosed from a goroutine dump. Ours was unattributable — eighty goroutines, a dozen of them agents, every agent stack byte-identical:
…and no way to tell which one belonged to the aria that was not answering. Diagnosing a real stall meant guessing from goroutine ages and correlating against timestamps in another file.
What
pprof.Docosts a map on one goroutine, and the label is inherited by every goroutine that one spawns: the turn loop, the tool dispatcher, the provider's stream reader. So the entire subtree of a stuck turn names itself — which is the case that matters, since the interesting frame is never the agent loop but whatever it is blocked inside three levels down.Gotcha, documented in the comment
Labels render in
debug=1. They do not render in thedebug=2full stack dump, which is the one people reach for first.