Skip to content

events: Fix capture_logs thread-safety - #26827

Closed
Tyagiquamar wants to merge 2 commits into
goauthentik:mainfrom
Tyagiquamar:fix/capture-logs-thread-safety
Closed

Tyagiquamar wants to merge 2 commits into
goauthentik:mainfrom
Tyagiquamar:fix/capture-logs-thread-safety

Conversation

@Tyagiquamar

Copy link
Copy Markdown
Contributor

Fixes #26821. Serializes capture_logs with RLock and restores processors in finally.

@Tyagiquamar
Tyagiquamar requested a review from a team as a code owner October 12, 2026 08:08
@netlify

netlify Bot commented Oct 12, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit c69f22a
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6acc956be8e60b3b001ccb54
😎 Deploy Preview https://deploy-preview-26827--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 46.34146% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.13%. Comparing base (6ec9c95) to head (0a8e470).

Files with missing lines Patch % Lines
authentik/events/tests/test_capture_logs.py 26.66% 22 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (6ec9c95) and HEAD (0a8e470). Click for more details.

HEAD has 4 uploads less than BASE
Flag BASE (6ec9c95) HEAD (0a8e470)
unit 20 18
unit-migrate 20 18
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #26827      +/-   ##
==========================================
- Coverage   92.27%   87.13%   -5.15%     
==========================================
  Files        1183     1184       +1     
  Lines       79376    79411      +35     
  Branches     4351     4351              
==========================================
- Hits        73247    69192    -4055     
- Misses       6063    10153    +4090     
  Partials       66       66              
Flag Coverage Δ
conformance 32.47% <26.82%> (-0.01%) ⬇️
e2e 37.19% <26.82%> (-0.01%) ⬇️
integration 28.82% <26.82%> (-0.51%) ⬇️
rust 44.42% <ø> (ø)
unit 88.20% <46.34%> (-5.74%) ⬇️
unit-migrate 88.23% <46.34%> (-5.71%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@Tyagiquamar
Tyagiquamar force-pushed the fix/capture-logs-thread-safety branch from c69f22a to ce44528 Compare October 12, 2026 12:45
@BeryJu BeryJu changed the title Fix capture_logs() thread-safety events: Fix capture_logs thread-safety Oct 15, 2026
@BeryJu

BeryJu commented Nov 2, 2026

Copy link
Copy Markdown
Member

replaced by #27355 which also fixes the deadlock

@BeryJu BeryJu closed this Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

capture_logs() is not thread-safe: worker permanently stops logging and leaks memory

2 participants