mirror of
https://github.com/livekit/protocol.git
synced 2026-08-13 02:45:04 +02:00
LiveKit protocol. Protobuf definitions for LiveKit's signaling protocol
https://docs.livekit.io
- Go 99.7%
- Shell 0.2%
- JavaScript 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
* Resolve current stack of stuck lock holders The lock tracker records where a stuck lock was first acquired, but not what its holder is doing now — during an incident the waiters are easy to find in a goroutine dump while the blocked holder is anonymous. Record the holder's goroutine id on acquisition (~0.3ns via goid) and add PopulateHolderStacks to resolve holders' current stacks from a single runtime.Stack snapshot at scan time. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * avoid empty critical section in test (SA2001) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * track all holder goroutines of stuck locks Track every holder gid (up to 8 concurrent RWMutex readers) in atomic slots instead of only the first, so PopulateHolderStacks resolves all holders' current stacks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * harden holder-slot accounting for cross-goroutine unlock and overflow Every unlock now removes exactly one holder entry: its own gid if present, else an overflow credit, else an arbitrary slot (same policy go-deadlock uses for cross-goroutine unlocks). Replaces the racy wipe-all-slots-at-zero, making occupied slots + overflow == holders an exact invariant. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * split single-holder tracking from the RW reader extension Mutex has exactly one holder and trackLock/trackUnlock run while it is held, so its bookkeeping needs no atomics — a plain gid store replaces the slot claim, and cross-goroutine unlock just clears it. The slot array, overflow accounting, and eviction heuristics now exist only for RWMutex readers in lock_tracker_rw.go, where holders are genuinely concurrent. Wrapped Mutex Lock/Unlock: 8.7ns -> 6.1ns (pre-tracking baseline 6.2ns, native 4.0ns). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * hoist tracker nil checks to call sites and report holder strength Lock paths guard tracking behind one nil check with the post-acquire bookkeeping deferred; unlock paths use a bare atomic load (loadTracker) instead of the full lazy-init, since a lock being unlocked was locked first. StuckLock gains HolderStrength (exclusive vs shared readers). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * extract window helper for incremental scans Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * single tracker registry with side-effect-free construction lazyInitTracker now CASes the constructed tracker directly: construct is pure allocation, the CAS winner registers, losers are left to the GC. This removes the mid-init sentinel state, the runtime spin linknames, and the per-type registration/finalizer duplication. Both tracker types live in one registry — rwLockTracker extends lockTracker, so the scan reads the base through every ref and toStuckLock gathers reader slots when the rw flag is set. window is a weakRefList method with the cursor as a field. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * review hardening: typed atomics, sized STW buffer, gid dedupe Typed atomics on the reader fields guarantee 64-bit alignment on 32-bit platforms regardless of struct layout. PopulateHolderStacks sizes its buffer from the live goroutine count so the stop-the-world snapshot is one pass on goroutine-heavy processes. toStuckLock dedupes reader gids so a recursive RLock doesn't resolve the same holder stack twice. Drop stale comment reference. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * generated protobuf --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> |
||
| .changeset | ||
| .github/workflows | ||
| .idea | ||
| agent | ||
| auth | ||
| codecs | ||
| connector | ||
| egress | ||
| infra | ||
| ingress | ||
| livekit | ||
| logger | ||
| mimetype | ||
| observability | ||
| packages/javascript | ||
| pprof | ||
| protobufs | ||
| psrpc | ||
| redis | ||
| rpc | ||
| sdp | ||
| signalling | ||
| sip | ||
| tools | ||
| tracer | ||
| utils | ||
| webhook | ||
| xtls | ||
| .gitattributes | ||
| .gitignore | ||
| .golangci.yml | ||
| bootstrap.sh | ||
| CHANGELOG.md | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| magefile.go | ||
| NOTICE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| renovate.json | ||