MCPcopy Create free account
hub / github.com/maruel/panicparse / Signature

Struct Signature

stack/stack.go:644–690  ·  view source on GitHub ↗

Signature represents the signature of one or multiple goroutines. It is effectively the stack trace plus the goroutine internal bits, like it's state, if it is thread locked, which call site created this goroutine, etc.

Source from the content-addressed store, hash-verified

642// it's state, if it is thread locked, which call site created this goroutine,
643// etc.
644type Signature struct {
645 // State is the goroutine state at the time of the snapshot.
646 //
647 // Use git grep 'gopark(|unlock)\(' to find them all plus everything listed
648 // in runtime/traceback.go. Valid values includes:
649 // - chan send, chan receive, select
650 // - finalizer wait, mark wait (idle),
651 // - Concurrent GC wait, GC sweep wait, force gc (idle)
652 // - IO wait, panicwait
653 // - semacquire, semarelease
654 // - sleep, timer goroutine (idle)
655 // - trace reader (blocked)
656 // Stuck cases:
657 // - chan send (nil chan), chan receive (nil chan), select (no cases)
658 // Runnable states:
659 // - idle, runnable, running, syscall, waiting, dead, enqueue, copystack,
660 // Scan states:
661 // - scan, scanrunnable, scanrunning, scansyscall, scanwaiting, scandead,
662 // scanenqueue
663 //
664 // When running under the race detector, the values are 'running' or
665 // 'finished'.
666 State string
667 // CreatedBy is the call stack that created this goroutine, if applicable.
668 //
669 // Normally, the stack is a single Call.
670 //
671 // When the race detector is enabled, a full stack snapshot is available.
672 CreatedBy Stack
673 // SleepMin is the wait time in minutes, if applicable.
674 //
675 // Not set when running under the race detector.
676 SleepMin int
677 // SleepMax is the wait time in minutes, if applicable.
678 //
679 // Not set when running under the race detector.
680 SleepMax int
681 // Stack is the call stack.
682 Stack Stack
683 // Locked is set if the goroutine was locked to an OS thread.
684 //
685 // Not set when running under the race detector.
686 Locked bool
687
688 // Disallow initialization with unnamed parameters.
689 _ struct{}
690}
691
692// equal returns true only if both signatures are exactly equal.
693func (s *Signature) equal(r *Signature) bool {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected