René's URL Explorer Experiment


Title: fix(batcher): Reset lock and flusher in child after fork by ericapisani · Pull Request #6163 · getsentry/sentry-python · GitHub

Open Graph Title: fix(batcher): Reset lock and flusher in child after fork by ericapisani · Pull Request #6163 · getsentry/sentry-python

X Title: fix(batcher): Reset lock and flusher in child after fork by ericapisani · Pull Request #6163 · getsentry/sentry-python

Description: The official Python SDK for Sentry.io. Contribute to getsentry/sentry-python development by creating an account on GitHub.

Open Graph Description: Apply the same fork-safety fix introduced in #6148 (for the monitor) to all batchers (log, metrics, span). If os.fork() runs while another thread holds Batcher._lock, the child inherits the lock lo...

X Description: Apply the same fork-safety fix introduced in #6148 (for the monitor) to all batchers (log, metrics, span). If os.fork() runs while another thread holds Batcher._lock, the child inherits the lock lo...

Opengraph URL: https://github.com/getsentry/sentry-python/pull/6163

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:af2112db-f3d7-5fc4-e962-1c8d6356f2e6
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9098:2279A:6D8A9D:918774:6B00ACAF
html-safe-nonce381d453bf8027e1ad5d62f6349e26157806ba8e2c4cd3e8e6cb3cad31f59df68
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDk4OjIyNzlBOjZEOEE5RDo5MTg3NzQ6NkIwMEFDQUYiLCJ2aXNpdG9yX2lkIjoiNzgyMzU1MjMwMzIxODA3Njg0NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace953f1866b2959776a15e3a8b28f50f2fb1de4503f55431bf7095a68d709e13e
hovercard-subject-tagpull_request:3597054521
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/getsentry/sentry-python/6163/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/67a04ceda1294ab63f5c752f8bf8b9e825c9cb2db8728db09aa7a85f402939ae/getsentry/sentry-python/pull/6163
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/67a04ceda1294ab63f5c752f8bf8b9e825c9cb2db8728db09aa7a85f402939ae/getsentry/sentry-python/pull/6163
og:image:altApply the same fork-safety fix introduced in #6148 (for the monitor) to all batchers (log, metrics, span). If os.fork() runs while another thread holds Batcher._lock, the child inherits the lock lo...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameericapisani
hostnamegithub.com
expected-hostnamegithub.com
Nonec0dd5f5d6f515a591019ecd66df2c4eab3379c2d3b0777568a90d8c7ae10b79e
turbo-cache-controlno-cache
go-importgithub.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id137814779
octolytics-dimension-repository_nwogetsentry/sentry-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id137814779
octolytics-dimension-repository_network_root_nwogetsentry/sentry-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release729d8cda69b3d267995675dfbf89ff27ccf61bf6
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/getsentry/sentry-python/pull/6163#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F6163
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F6163
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=getsentry%2Fsentry-python
Reloadhttps://github.com/getsentry/sentry-python/pull/6163
Reloadhttps://github.com/getsentry/sentry-python/pull/6163
Reloadhttps://github.com/getsentry/sentry-python/pull/6163
getsentryhttps://github.com/getsentry
sentry-pythonhttps://github.com/getsentry/sentry-python
Codehttps://github.com/getsentry/sentry-python
Issues345 (345)https://github.com/getsentry/sentry-python/issues
Pull requests42 (42)https://github.com/getsentry/sentry-python/pulls
Discussionshttps://github.com/getsentry/sentry-python/discussions
Actionshttps://github.com/getsentry/sentry-python/actions
Security and quality2 (2)https://github.com/getsentry/sentry-python/security
Insightshttps://github.com/getsentry/sentry-python/insights
https://github.com/getsentry/sentry-python
ericapisanihttps://github.com/ericapisani
masterhttps://github.com/getsentry/sentry-python/tree/master
py-2391-fix-deadlock-in-batcher-k4wvshttps://github.com/getsentry/sentry-python/tree/py-2391-fix-deadlock-in-batcher-k4wvs
Conversationhttps://github.com/getsentry/sentry-python/pull/6163
Commits7 (7)https://github.com/getsentry/sentry-python/pull/6163/commits
Checkshttps://github.com/getsentry/sentry-python/pull/6163/checks
Files changedhttps://github.com/getsentry/sentry-python/pull/6163/files
fix(batcher): Reset lock and flusher in child after forkhttps://github.com/getsentry/sentry-python/pull/6163#top
ericapisanihttps://github.com/ericapisani
masterhttps://github.com/getsentry/sentry-python/tree/master
py-2391-fix-deadlock-in-batcher-k4wvshttps://github.com/getsentry/sentry-python/tree/py-2391-fix-deadlock-in-batcher-k4wvs
https://github.com/ericapisani
ericapisanihttps://github.com/ericapisani
Apr 28, 2026https://github.com/getsentry/sentry-python/pull/6163#issue-4344493141
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6163
#6148https://github.com/getsentry/sentry-python/issues/6148
#6149https://github.com/getsentry/sentry-python/issues/6149
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6163
https://github.com/ericapisani
fix(batcher): Reset lock and flusher in child after forkhttps://github.com/getsentry/sentry-python/pull/6163/commits/4bf5dac8e7b0981d436cadfd1c75b5242d77bbbc
4bf5dachttps://github.com/getsentry/sentry-python/pull/6163/commits/4bf5dac8e7b0981d436cadfd1c75b5242d77bbbc
#6148https://github.com/getsentry/sentry-python/issues/6148
#6149https://github.com/getsentry/sentry-python/issues/6149
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
Apr 28, 2026https://github.com/getsentry/sentry-python/pull/6163#issuecomment-4336920401
PY-2391 Possible deadlock when using Batcher and `os.fork()`https://linear.app/getsentry/issue/PY-2391/possible-deadlock-when-using-batcher-and-osfork
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6163
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Apr 28, 2026https://github.com/getsentry/sentry-python/pull/6163#issuecomment-4336932810
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6163
Codecov Actionhttps://github.com/getsentry/codecov-action
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6163
ericapisanihttps://github.com/ericapisani
April 29, 2026 08:57https://github.com/getsentry/sentry-python/pull/6163#commits-pushed-78b0f09
https://github.com/ericapisani
Merge branch 'master' into py-2391-fix-deadlock-in-batcher-k4wvshttps://github.com/getsentry/sentry-python/pull/6163/commits/78b0f09f2e4bfa26f4154c1b9062d3ead0fe2fb4
78b0f09https://github.com/getsentry/sentry-python/pull/6163/commits/78b0f09f2e4bfa26f4154c1b9062d3ead0fe2fb4
https://github.com/ericapisani
Revert the changes to the span batcher - this needs to be a separate …https://github.com/getsentry/sentry-python/pull/6163/commits/b5073b221833a96ddbf9034698ef9c4e86bd2b40
b5073b2https://github.com/getsentry/sentry-python/pull/6163/commits/b5073b221833a96ddbf9034698ef9c4e86bd2b40
https://github.com/ericapisani
ericapisanihttps://github.com/ericapisani
Apr 29, 2026https://github.com/getsentry/sentry-python/pull/6163#issuecomment-4344059468
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6163
https://github.com/ericapisani
Small cleanuphttps://github.com/getsentry/sentry-python/pull/6163/commits/5c66f82df5ff99d629db2a4423513027bed67930
5c66f82https://github.com/getsentry/sentry-python/pull/6163/commits/5c66f82df5ff99d629db2a4423513027bed67930
https://github.com/apps/cursor
cursorhttps://github.com/apps/cursor
Apr 29, 2026 https://github.com/getsentry/sentry-python/pull/6163#pullrequestreview-4197388123
View reviewed changes https://github.com/getsentry/sentry-python/pull/6163/files/b5073b221833a96ddbf9034698ef9c4e86bd2b40
cursorhttps://github.com/apps/cursor
https://github.com/getsentry/sentry-python/pull/6163#pullrequestreview-4197388123
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MiJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9BTExfSU5fQ1VSU09SIiwiZGF0YSI6eyJyZWRpc0tleSI6ImJ1Z2JvdC1tdWx0aTplNzA2ZDRhMC1jZmM1LTRiZDctYjBhNS1hMjE3YTMzYWFiMzEiLCJlbmNyeXB0aW9uS2V5IjoidTFKWEM3UjBiLTItc3YyZEthX2pNNzBFNEZ3UDFDVlEzUGQ4WnRGLWEtbyIsImJyYW5jaCI6InB5LTIzOTEtZml4LWRlYWRsb2NrLWluLWJhdGNoZXItazR3dnMiLCJyZXBvT3duZXIiOiJnZXRzZW50cnkiLCJyZXBvTmFtZSI6InNlbnRyeS1weXRob24ifSwiaWF0IjoxNzc3NDY5NDcwLCJleHAiOjE3ODAwNjE0NzB9.XKelleWsIwaK4RWF-K-bfooPktM8021B3CFdFVUfxQfMLWWggjUa5Jm5aJkIk0lDrDhoKZ3c5Jum9oD86Cr8ucSJWeNKEYXnMmaO5f1J9eyR5-h2kJQu4DPFZ-qsSQqluQ08Ui9s2AfoqPeJZXuW_FMYn2IoAWuQ75afNi328EuAm_B7_bAfZPhOYLwsGKCgBANJL00uiie3A8VCvLhKknzsMNqqN3QfrJcZPi7uimqc3FKTaZCUtrEWSnXGJ0DACZX0iAkIQN1KCzqrgpo6E4XIxXamV7OLrCUyaf8e5N1P0ifzr4WgQmYS2fmCBuz_mNYKZfJIR6PAgLzMLszstA
Cursor dashboardhttps://www.cursor.com/dashboard/bugbot
Cursor Bugbothttps://cursor.com/bugbot
b5073b2https://github.com/getsentry/sentry-python/commit/b5073b221833a96ddbf9034698ef9c4e86bd2b40
herehttps://www.cursor.com/dashboard/bugbot
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6163
sentry_sdk/_span_batcher.pyhttps://github.com/getsentry/sentry-python/pull/6163/files/b5073b221833a96ddbf9034698ef9c4e86bd2b40#diff-f400f2b5275be953a87e1a2fa25659221ab46d1f696f7d1104694c55ea621189
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6163
https://github.com/ericapisani
cleanupshttps://github.com/getsentry/sentry-python/pull/6163/commits/ba1ef0f9ad0b4b423439ba7d780f2558f95a2015
ba1ef0fhttps://github.com/getsentry/sentry-python/pull/6163/commits/ba1ef0f9ad0b4b423439ba7d780f2558f95a2015
https://github.com/ericapisani
ericapisanihttps://github.com/ericapisani
April 29, 2026 14:31https://github.com/getsentry/sentry-python/pull/6163#event-24994818420
https://github.com/ericapisani
ericapisanihttps://github.com/ericapisani
code ownerhttps://github.com/getsentry/sentry-python/blob/d58ac65c28e095560b1db60acc7cfc8b57301e32/.github/CODEOWNERS#L1
April 29, 2026 14:31https://github.com/getsentry/sentry-python/pull/6163#event-24994818901
https://github.com/apps/sentry
sentryhttps://github.com/apps/sentry
Apr 29, 2026 https://github.com/getsentry/sentry-python/pull/6163#pullrequestreview-4197950547
View reviewed changes https://github.com/getsentry/sentry-python/pull/6163/files/ba1ef0f9ad0b4b423439ba7d780f2558f95a2015
sentry_sdk/_span_batcher.pyhttps://github.com/getsentry/sentry-python/pull/6163/files/ba1ef0f9ad0b4b423439ba7d780f2558f95a2015#diff-f400f2b5275be953a87e1a2fa25659221ab46d1f696f7d1104694c55ea621189
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6163
https://github.com/alexander-alderman-webb
alexander-alderman-webbhttps://github.com/alexander-alderman-webb
Apr 29, 2026 https://github.com/getsentry/sentry-python/pull/6163#pullrequestreview-4198267012
View reviewed changes https://github.com/getsentry/sentry-python/pull/6163/files/ba1ef0f9ad0b4b423439ba7d780f2558f95a2015
sentry_sdk/_batcher.pyhttps://github.com/getsentry/sentry-python/pull/6163/files/ba1ef0f9ad0b4b423439ba7d780f2558f95a2015#diff-7dbecac92865baa900639d0a3286da7b5efc6403923ebc49ab7ed8815fc1fe03
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6163
https://github.com/ericapisani
Address code review commentshttps://github.com/getsentry/sentry-python/pull/6163/commits/17b3e0a6840d72f20fd32eb6a78da86fa7e56efd
17b3e0ahttps://github.com/getsentry/sentry-python/pull/6163/commits/17b3e0a6840d72f20fd32eb6a78da86fa7e56efd
https://github.com/apps/sentry
sentryhttps://github.com/apps/sentry
Apr 29, 2026 https://github.com/getsentry/sentry-python/pull/6163#pullrequestreview-4199254699
View reviewed changes https://github.com/getsentry/sentry-python/pull/6163/files/17b3e0a6840d72f20fd32eb6a78da86fa7e56efd
sentry_sdk/_batcher.pyhttps://github.com/getsentry/sentry-python/pull/6163/files/17b3e0a6840d72f20fd32eb6a78da86fa7e56efd#diff-7dbecac92865baa900639d0a3286da7b5efc6403923ebc49ab7ed8815fc1fe03
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6163
https://github.com/ericapisani
Add reset of the running flaghttps://github.com/getsentry/sentry-python/pull/6163/commits/dc1d5017f4cabfdf99a9f55ddbda024fa8cdf0fb
dc1d501https://github.com/getsentry/sentry-python/pull/6163/commits/dc1d5017f4cabfdf99a9f55ddbda024fa8cdf0fb
https://github.com/alexander-alderman-webb
alexander-alderman-webbhttps://github.com/alexander-alderman-webb
Apr 30, 2026 https://github.com/getsentry/sentry-python/pull/6163#pullrequestreview-4204483801
View reviewed changes https://github.com/getsentry/sentry-python/pull/6163/files/dc1d5017f4cabfdf99a9f55ddbda024fa8cdf0fb
https://github.com/ericapisani
ericapisanihttps://github.com/ericapisani
b5735abhttps://github.com/getsentry/sentry-python/commit/b5735abb51b21dba8cee1f35a918dbe51babf038
Apr 30, 2026https://github.com/getsentry/sentry-python/pull/6163#event-25031497957
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6163
https://github.com/ericapisani
ericapisanihttps://github.com/ericapisani
April 30, 2026 11:29https://github.com/getsentry/sentry-python/pull/6163#event-25031499077
publish: getsentry/sentry-python@2.59.0 getsentry/publish#8047 https://github.com/getsentry/publish/issues/8047
publish: getsentry/sentry-python@2.59.0a1 getsentry/publish#8063 https://github.com/getsentry/publish/issues/8063
https://github.com/VenkateswarluNagineni
VenkateswarluNaginenihttps://github.com/VenkateswarluNagineni
Jul 31, 2026 https://github.com/getsentry/sentry-python/pull/6163#ref-issue-4344995315
Introduce fork-safety fix to SessionFlusher and BackgroundWorker #6164 https://github.com/getsentry/sentry-python/issues/6164
mgalignianahttps://github.com/mgaligniana
Aug 9, 2026 https://github.com/getsentry/sentry-python/pull/6163#ref-commit-6963338
https://github.com/ericapisani
https://github.com/mgaligniana
fix(batcher): Reset lock and flusher in child after fork (https://github.com/mgaligniana/sentry-python/commit/69633389ec4311d0a309ef45a2f1d4d25883f421
getsentry#6163https://github.com/getsentry/sentry-python/pull/6163
6963338https://github.com/mgaligniana/sentry-python/commit/69633389ec4311d0a309ef45a2f1d4d25883f421
https://github.com/getsentry/sentry-python/pull/6163
getsentry#6148https://github.com/getsentry/sentry-python/issues/6148
getsentry#6149https://github.com/getsentry/sentry-python/issues/6149
https://github.co/hiddenchars
https://github.com/getsentry/sentry-python/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F6163
https://github.com/apps/sentry
sentry[bot] https://github.com/apps/sentry
https://github.com/getsentry/sentry-python/pull/6163/files/17b3e0a6840d72f20fd32eb6a78da86fa7e56efd
https://github.com/apps/cursor
cursor[bot] https://github.com/apps/cursor
https://github.com/getsentry/sentry-python/pull/6163/files/b5073b221833a96ddbf9034698ef9c4e86bd2b40
https://github.com/alexander-alderman-webb
alexander-alderman-webb https://github.com/alexander-alderman-webb
https://github.com/getsentry/sentry-python/pull/6163/files/dc1d5017f4cabfdf99a9f55ddbda024fa8cdf0fb
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6163
Possible deadlock when using Batcher and os.fork() https://github.com/getsentry/sentry-python/issues/6149
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6163
https://github.com/ericapisani
https://github.com/alexander-alderman-webb
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.