[Triage] potential breakage in v25 when using gevent worker_class
#3481
Closed
markjm
started this conversation in
Issue Triage
Replies: 1 comment
-
|
I created #3482 for it. Please test the PR #3483 associated. |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Thanks for maintaining that great project! Below is my first bug report here so please let me know if anything is unclear!
Type
Bug Report
Description
It seems that v25 has changed some import ordering which can break gevent-patch-using projects. Specifically,
concurrent.futuresnow seems to be imported before any use-defined code runs. This is relevant for gevent-based projects, becauseconcurrent.futuresholds references to certainthreadingthreads, which can not be patched after import time.In our project, we have identified that this missed patching causes issues with other packages which use
concurrent.futures. Specificallyboto3s3 operations can start hanging. We fortunately have a hard startup fail to catch this otherwise-difficult-to-notice patching issue, which is why we caught thisSteps to Reproduce (for bugs)
I have created a single-file repro with steps in:
https://gist.github.com/markjm/9f724364619c519892e8111fe6520ca6
This demonstrated that some non-patched threads linger in concurrent.futures. I am not 100% sure that the example one i used (
_global_shutdown_lock) is the one which causes issues at runtime, but i think it demonstrated the problemConfiguration
Logs / Error Output
v25 output:
Gunicorn Version
gunicorn (version 25.0.0)
Python Version
Python 3.12.10
Worker Class
gevent
Operating System
Ubuntu 24.04
Additional Context
No response
Checklist
Beta Was this translation helpful? Give feedback.
All reactions