// CurrentSuspected returns the number of currently unresolved suspected deadlocks.
return dd.current.Load()
}
func NewDeadlockDetector(params params) *deadlockDetector {
Frontier kind: Joint frontier
unlabeled · c_b141f86b7b77
1 test · 1793 LOC · 70 files · introduces 1 test · 34 LOC · 1 file
The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.
Introduced files, introduced tests, and structurally relevant concept specialization
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
Every exact file and test below is linked only from the concept that introduces it.
go.temporal.io/server/common/circuitbreaker/TestTSCBWithDynamicSettingsgo.temporal.io/server/common/dynamicconfig/TestDeepCopy_OtherReferenceTypes_Nilgo.temporal.io/server/service/matching/configs/TestQuotasSuite/TestAPIPrioritiesOrderedgo.temporal.io/server/service/matching/configs/TestQuotasSuite/TestAPIToPriorityMappingEvery collected test enters the hierarchy at exactly one concept.
1 test introduced at this concept.
Every collected source range enters the hierarchy at exactly one concept.
1 file ranked by introduced lines: 34 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
// CurrentSuspected returns the number of currently unresolved suspected deadlocks.
return dd.current.Load()
}
func NewDeadlockDetector(params params) *deadlockDetector {
}
dd.logger.Error("potential deadlock detected", tag.Name(name))
metrics.DDSuspectedDeadlocks.With(dd.metricsHandler).Record(1)
if dd.config.DumpGoroutines() {
dd.dumpGoroutines()
}
dd.logger.Info("marking grpc services unhealthy")
dd.healthServer.Shutdown()
}
dd.logger.Fatal("deadlock detected", tag.Name(name))
}
}
profile := pprof.Lookup("goroutine")
if profile == nil {
dd.logger.Error("could not find goroutine profile")
return
}
err := profile.WriteTo(&b, 1) // 1 is magic value that means "text format"
if err != nil {
dd.logger.Error("failed to get goroutine profile", tag.Error(err))
return
// write it as a single log line with embedded newlines.
// the value starts with "goroutine profile: total ...\n" so it should be clear
dd.logger.Info(b.String())
}
dd.current.Add(delta)
metrics.DDCurrentSuspectedDeadlocks.With(dd.metricsHandler).Record(float64(dd.current.Load()))
}
func (lc *loopContext) run(ctx context.Context) error {
// create a goroutine, that's a bigger problem than we can handle.
t := time.AfterFunc(check.Timeout, func() {
// deadlock detector was stopped
return
}
lc.dd.detected(check.Name)
// Wait and see if Ping() returns past the timeout. If it's a true deadlock, it'll
// block here forever.
<-resolved
lc.dd.adjustCurrent(-1)
})
newPingables := check.Ping()