Robust Lock-Free Ring-Buffer Protocol over Shared Memory
2025-09-02 , Bonjour 50

This presentation outlines an augmented lock‑free transaction protocol for LTTng-UST shared‑memory ring buffers that resolves long‑standing robustness problems when a producer stalls during a transaction (e.g., at breakpoints or when receiving a termination signal). By extending the transaction protocol with a sub-buffer ownership semantic and allowing the consumer daemon to safely abort or recover from incomplete transactions, the updated protocol prevents loss of events and eliminates situations where a destroyed session becomes stuck, waiting indefinitely for a stalled producer to finish its transaction, while preserving the high‑performance lock‑free nature of the original design. Extensive reproducible testing confirms the correctness of the protocol. The upcoming LTTng 2.15 release will integrate these improvements, delivering a more reliable and adaptable LTTng ecosystem.

See also:

Olivier Dion is a software developer at EfficiOS. He works on various projects at EfficiOS such as the Userspace RCU library, LTTng-UST and Libside. He has an expertise in dynamic instrumentation that culminated into the Libpatch library.