[Triage] gthread worker deadlocks on fork due to control socket thread (Python 3.12) #3528
Closed
cabilash0
started this conversation in
Issue Triage
Replies: 1 comment
-
|
Opened erronesouly |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Type
Bug Report
Description
After upgrading to gunicorn 25.1.0, gthread workers intermittently deadlock during fork() on Python 3.12. The master process starts successfully and listens on the configured port, but the forked worker hangs permanently during initialization, the "Booting worker with pid" message never appears. This causes the application to become completely unresponsive (nginx returns 499/504)
The issue is triggered by the new control socket feature introduced in 25.1.0 (I think?). The control socket listener thread running in the master process holds a lock at the moment of fork(), and the forked child inherits that lock in a permanently locked state, resulting in a futex deadlock.
Steps to Reproduce (for bugs)
Configuration
Logs / Error Output
No response
Gunicorn Version
gunicorn (version 25.1.0)
Python Version
Python 3.12.12 (main, Feb 5 2026, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-5)] on linux
Worker Class
gthread
Operating System
AL2023
Additional Context
No response
Checklist
Beta Was this translation helpful? Give feedback.
All reactions