The Fix
pip install celery==4.4.0rc5
Based on closed celery/celery issue #5736 · PR/commit linked
Production note: This usually shows up under retries/timeouts. Treat it as a side-effect risk until you can verify behavior with a canary + real traffic.
@@ -769,6 +769,7 @@ def join(self, timeout=None, propagate=True, interval=0.5,
timeout=remaining, propagate=propagate,
interval=interval, no_ack=no_ack, on_interval=on_interval,
+ disable_sync_subtasks=disable_sync_subtasks,
)
if callback:
software -> celery:4.3.0 (rhubarb) kombu:4.6.4 py:3.5.6
billiard:3.6.1.0 py-amqp:2.5.1
platform -> system:Linux arch:64bit, ELF
kernel version:4.19.71-1-lts imp:CPython
loader -> celery.loaders.default.Loader
settings -> transport:amqp results:disabled
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Option A — Upgrade to fixed release\npip install celery==4.4.0rc5\nWhen NOT to use: Do not use this fix if you require synchronous execution of subtasks.\n\n
Why This Fix Works in Production
- Trigger: R = retval = fun(*args, **kwargs)
- Mechanism: The disable_sync_subtasks setting was not being applied correctly in the ResultSet implementation
- Why the fix works: Fixes the issue where the disable_sync_subtasks setting was not respected in ResultSet. (first fixed release: 4.4.0rc5).
- If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.
Why This Breaks in Prod
- Shows up under Python 3.5 in real deployments (not just unit tests).
- The disable_sync_subtasks setting was not being applied correctly in the ResultSet implementation
- Surfaces as: Traceback (most recent call last):
Proof / Evidence
- GitHub issue: #5736
- Fix PR: https://github.com/celery/celery/pull/5737
- First fixed release: 4.4.0rc5
- Reproduced locally: No (not executed)
- Last verified: 2026-02-09
- Confidence: 0.85
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.36
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“<!-- Please fill this template entirely and do not erase parts of it. We reserve the right to close without a response bug reports which are incomplete. --> # Checklist <!-- To check an item on the list replace [ ] with [x]. --> - [x] I hav”
Failure Signature (Search String)
- R = retval = fun(*args, **kwargs)
Error Message
Stack trace
Error Message
-------------
Traceback (most recent call last):
File "/home/gsfish/.pyenv/versions/scan_detect/lib/python3.5/site-packages/celery/app/trace.py", line 385, in trace_task
R = retval = fun(*args, **kwargs)
File "/home/gsfish/.pyenv/versions/scan_detect/lib/python3.5/site-packages/celery/app/trace.py", line 648, in __protected_call__
return self.run(*args, **kwargs)
File "/home/gsfish/work/netease/project/scan_detect/tasks.py", line 106, in test
return result_set.get(disable_sync_subtasks=False)
File "/home/gsfish/.pyenv/versions/scan_detect/lib/python3.5/site-packages/celery/result.py", line 697, in get
on_interval=on_interval,
File "/home/gsfish/.pyenv/versions/scan_detect/lib/python3.5/site-packages/celery/result.py", line 765, in join
interval=interval, no_ack=no_ack, on_interval=on_interval,
File "/home/gsfish/.pyenv/versions/scan_detect/lib/python3.5/site-packages/celery/result.py", line 205, in get
assert_will_not_block()
File "/home/gsfish/.pyenv/versions/scan_detect/lib/python3.5/site-packages/celery/result.py", line 41, in assert_will_not_block
raise RuntimeError(E_WOULDBLOCK)
RuntimeError: Never call result.get() within a task!
See http://docs.celeryq.org/en/latest/userguide/tasks.html#task-synchronous-subtasks
Minimal Reproduction
software -> celery:4.3.0 (rhubarb) kombu:4.6.4 py:3.5.6
billiard:3.6.1.0 py-amqp:2.5.1
platform -> system:Linux arch:64bit, ELF
kernel version:4.19.71-1-lts imp:CPython
loader -> celery.loaders.default.Loader
settings -> transport:amqp results:disabled
Environment
- Python: 3.5
What Broke
Subtasks were executed synchronously despite the disable_sync_subtasks setting being enabled.
Why It Broke
The disable_sync_subtasks setting was not being applied correctly in the ResultSet implementation
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install celery==4.4.0rc5
Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.
Fix reference: https://github.com/celery/celery/pull/5737
First fixed release: 4.4.0rc5
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- Do not use this fix if you require synchronous execution of subtasks.
Verify Fix
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Did This Fix Work in Your Case?
Quick signal helps us prioritize which fixes to verify and improve.
Prevention
- Add a stress test that runs high-concurrency workloads and fails on thread dumps / blocked locks.
- Enable watchdog dumps in prod (faulthandler, thread dump endpoint) to capture deadlocks quickly.
Version Compatibility Table
| Version | Status |
|---|---|
| 4.4.0rc5 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.