Check for deadlocks in telemetry buffers (logs)
Les mainteneurs répondent en général sous 2 jours
@sl0thentr0py y travaille déjà.
Depuis le 17/3/2026.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
Context
The Python SDK hit a deadlock in the logs telemetry buffer (Slack thread). The Ruby SDK has a very similar buffer implementation, so we should audit it for the same class of issue.
Problem (from Python)
- The logs buffer acquires a lock when adding a log and when flushing/clearing the buffer
- During a flush (lock held), GC ran and emitted a log → the logging integration tried to add it to the buffer → attempted to acquire the already-held lock → deadlock
- Re-entrant locks didn't help since the GC callback runs on a different thread
What to check in Ruby
- Audit the telemetry buffer lock usage — ensure no code path can trigger a re-entrant lock acquisition (e.g. via callbacks, GC, instrumentation side-effects during flush)
- Minimize critical sections — the lock should only protect fetch/pop/clear/add operations on the buffer data structure. Envelope construction and other side-effects should happen outside the lock
- Consider the .NET approach — their implementation is mostly lock-free (atomic increments/decrements), only locking briefly during flush to extract a copy of the buffer array before releasing
Related
- Python fix by Ivana: moved side-effect-producing work outside the locked section
- Java was checked and looks fine (Alexander)
- .NET uses lock-free atomics, had a separate recursion issue with
Debug=true
- Langage dominant
- Ruby
- Étoiles
- 990
- Forks
- 552
- Merge moyen
- 2 j 16 h
- PR mergées (30 j)
- 29
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de getsentry/sentry-ruby
-
Bug Ruby
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
getsentry/sentry-ruby#3211 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
Events dropped client-side for size are only logged at debug level and not recorded as lostPeut-être pris @sentry-junior l’a pris aujourd’hui. OuverteBug Junior: repro Ruby
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
getsentry/sentry-ruby#3209 · 2 commentaires · 1 réaction ·
Les mainteneurs répondent en général sous 2 jours
-
with_child_span drops spans when blocks exit via break, return, or throwPeut-être pris @itsrayeedscodespace l’a pris il y a 1 jour. OuverteBug Ruby Traces Waiting for: Product Owner
Difficulté 2/5 1-3 heures Accessibilité débutants 38/100
getsentry/sentry-ruby#3206 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
Let apps choose how the client IP on events is determinedPeut-être pris @sl0thentr0py l’a pris il y a 11 jours. OuverteImprovement Ruby
getsentry/sentry-ruby#3180 · 2 commentaires · 1 réaction · 1 personne assignée ·
Les mainteneurs répondent en général sous 2 jours
-
Remove `sentry-ruby-core` gemOuvertebreaking change Next Major
Difficulté 2/5 1-3 heures Accessibilité débutants 58/100
getsentry/sentry-ruby#3176 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de getsentry/sentry-ruby
Issues similaires
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
internetee/registry#2984 ·
Les mainteneurs répondent en général sous 6 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
ecosyste-ms/issues#862 ·
Les mainteneurs répondent en général sous 1 jour
-
Redis Lua error `@user_script:52: ERR value is not an integer or out of range` when `window_size` is configuredPeut-être pris @mimosa l’a pris aujourd’hui. Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
riscv/riscv-unified-db#2829 ·
Les mainteneurs répondent en général sous 1 jour
-
⛓️ Security Difficulty: Easy Good First Issue Help Wanted ruby Type: Bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
rubyforgood/casa#7404 ·
Les mainteneurs répondent en général sous 1 jour