# sasha-s/go-deadlock

Online deadlock detection in go (golang)

Repository: https://github.com/sasha-s/go-deadlock
Canonical: https://ross.abutalabs.com/products/go-deadlock
Language: Go
License: Apache-2.0
License Family: permissive
Topics: deadlock, golang, mutex, online-deadlock-detection
Last push: 2026-08-01T19:57:32+00:00

## Health v2 (maintenance only)
Score: 89/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 75, longevity 100
- inputs: {"age_days": 3695, "days_push": 32, "days_rel": 168, "gap_med": 10, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1191, forks 80 (observed 2026-08-28T04:03:56.226376+00:00)

## What it is
A Go library providing drop-in replacements for sync.Mutex and sync.RWMutex that detect deadlocks at runtime. It records lock ordering per goroutine and reports violations or long lock waits with stack traces.

## Use cases
- detect deadlocks in go programs
- find inconsistent mutex lock ordering
- debug goroutines stuck waiting on a lock
- replace sync.Mutex with a deadlock-aware mutex
- catch duplicate locking in the same goroutine

## When to avoid
- your synchronization relies on channels rather than mutexes
- you cannot tolerate the runtime overhead in production
- locks are passed across goroutine boundaries, which defeats detection

## Facets
- artifact type: library
- maturity: active
- function: concurrency, testing, monitoring, developer-tools
- domain: developer-tools, programming-languages, testing
- platform: go, cross-platform
- tags: deadlock-detection, mutex, golang, lock-ordering, runtime-debugging

## Member repositories
- sasha-s/go-deadlock (main) score 89

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:56.226376+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:22:43.525829+00:00, confidence not recorded.
  - readme: https://github.com/sasha-s/go-deadlock (fetched 2026-08-28T04:03:56.226376+00:00, sha 2f74e3656097)
- Data as of 2026-08-30T08:39:29.467469+00:00.
