Check for deadlocks in telemetry buffers (logs)
Maintainer thường phản hồi trong vòng 2 ngày
@sl0thentr0py đang làm issue này rồi.
Từ ngày 17/3/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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
- Ngôn ngữ chính
- Ruby
- Star
- 990
- Fork
- 552
- Merge trung bình
- 2 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 29
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của getsentry/sentry-ruby
-
Bug Ruby
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
getsentry/sentry-ruby#3211 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Events dropped client-side for size are only logged at debug level and not recorded as lostCó thể đã có người làm @sentry-junior đã nhận hôm nay. Đang mởBug Junior: repro Ruby
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
getsentry/sentry-ruby#3209 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
with_child_span drops spans when blocks exit via break, return, or throwCó thể đã có người làm @itsrayeedscodespace đã nhận 1 ngày trước. Đang mởBug Ruby Traces Waiting for: Product Owner
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 38/100
getsentry/sentry-ruby#3206 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Let apps choose how the client IP on events is determinedCó thể đã có người làm @sl0thentr0py đã nhận 11 ngày trước. Đang mởImprovement Ruby
getsentry/sentry-ruby#3180 · 2 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Remove `sentry-ruby-core` gemĐang mởbreaking change Next Major
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 58/100
getsentry/sentry-ruby#3176 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của getsentry/sentry-ruby
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
internetee/registry#2984 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ecosyste-ms/issues#862 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Redis Lua error `@user_script:52: ERR value is not an integer or out of range` when `window_size` is configuredCó thể đã có người làm @mimosa đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
riscv/riscv-unified-db#2829 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
⛓️ Security Difficulty: Easy Good First Issue Help Wanted ruby Type: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
rubyforgood/casa#7404 ·
Maintainer thường phản hồi trong vòng 1 ngày