Deadlog: A Go Library for Debugging Mutex Deadlocks with Logged Wrappers
By
dirteater_
The kind of bagel that ruins lesser bagels for you.
Summary
Deadlog is a Go library for debugging mutex deadlocks that provides logged wrappers around sync.Mutex and sync.RWMutex. It offers features like tracking unreleased locks with correlation IDs, named callsites for labeling lock operations, and JSON event logging to help developers identify and resolve deadlock issues in Go code. The library maintains API compatibility with standard Go mutexes while adding debugging capabilities.
Key quotes
· 4 pulledA Go library for debugging mutex deadlocks with logged wrappers and analysis tools.
Replace sync.Mutex or sync.RWMutex with deadlog.Mutex: The API is compatible with both sync.Mutex and sync.RWMutex.
Use LockFunc() or RLockFunc() to get correlated RELEASED events: This logs START, ACQUIRED, and RELEASED events with the same correlation ID, making it easy to identify which lock was never released.
Use WithLockName() to label individual lock operations on the same mutex: Combined with WithTrace(1), the JSON events pinpoint ex
You might also wanna read
Exploring Modern Debugger Capabilities for Memory Tracing and Analysis
The article discusses the need for a modern equivalent to the DDD debugger, exploring how contemporary debuggers could improve memory debugg
Durin Library: Reading and Writing DWARF Debugging Format
Durin is a software library for reading and writing the Dwarf debugging format, which is used in software development for debugging informat
Why Average LLM Use Is Likely Destroying Value in Software Development
The author argues that, contrary to prevailing hype, the average use of Large Language Models (LLMs) is likely destroying value rather than
How AI Accelerated Prototyping: From Idea to Tangible in Record Time
The author reflects on how AI has transformed their prototyping workflow. Previously, the biggest bottleneck was the time needed to scaffold
GitLab 19.0 launches with Secrets Manager, agentic workflows, and self-hosted AI models
GitLab 19.0 has been released, positioning itself as an intelligent orchestration platform for DevSecOps. The release includes expanded secr
bit.ly·23h agoCentralizing Error Handling in Rust with Custom AppError Enums
This article discusses the importance of centralizing error handling in Rust applications using a custom AppError enum combined with map_err
