The Fix
pip install celery==4.4.0rc5
Based on closed celery/celery issue #4938 · PR/commit linked
@@ -241,6 +241,7 @@ Simon Schmidt, 2017/05/19
Samuel Dion-Girardeau, 2017/05/29
Aydin Sen, 2017/06/14
+Vinod Chandru, 2017/07/11
Preston Moore, 2017/06/18
Nicolas Mota, 2017/08/10
# tasks.py
from celery import Celery
from celery import group
app = Celery('tasks',
backend='redis://',
broker='pyamqp://guest@localhost//')
@app.task()
def A():
result = group(pow2.s(i) for i in range(3)).apply_async()
result.save()
restore.apply_async(kwargs={"result_id": result.id})
@app.task(bind=True)
def restore(self, result_id):
group_result = app.GroupResult.restore(result_id)
if group_result.waiting():
self.retry()
@app.task()
def pow2(i):
return i ** 2
if __name__ == '__main__':
A.apply_async()
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 your application relies on synchronous task execution.\n\n
Why This Fix Works in Production
- Trigger: ready_task = parent.ready()
- Mechanism: The weak reference to the bound method in promises prevents proper callback execution
- Why the fix works: Fixes a RuntimeError in group_result.waiting() when launched within a task in Celery 4.2. (first fixed release: 4.4.0rc5).
Why This Breaks in Prod
- Triggered by an upgrade/regression window: 16.138043 breaks; 4.4.0rc5 is the first fixed release.
- Shows up under Python 3.6 in real deployments (not just unit tests).
- The weak reference to the bound method in promises prevents proper callback execution
- Surfaces as: ready_task = parent.ready()
Proof / Evidence
- GitHub issue: #4938
- Fix PR: https://github.com/celery/celery/pull/4131
- First fixed release: 4.4.0rc5
- Affected versions: 16.138043
- 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.24
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“I think it could have been written as a chord **except** for the fact that if any of the tasks of the group fail, we…”
“@ewjoachim thanks for the detailed description, but can you please describe your use case?”
“Is there any update on this? We seem to have a similar failure, but for us it comes from calling result.ready() inside a task”
“BUMP Any update? I have the same error on celery 4.3.0 or master branch when using .join() on group”
Failure Signature (Search String)
- ready_task = parent.ready()
Error Message
Stack trace
Error Message
-------------
ready_task = parent.ready()
File "/usr/local/lib/python3.6/site-packages/celery/result.py", line 311, in ready
return self.state in self.backend.READY_STATES
File "/usr/local/lib/python3.6/site-packages/celery/result.py", line 471, in state
return self._get_task_meta()['status']
File "/usr/local/lib/python3.6/site-packages/celery/result.py", line 410, in _get_task_meta
return self._maybe_set_cache(self.backend.get_task_meta(self.id))
File "/usr/local/lib/python3.6/site-packages/celery/result.py", line 404, in _maybe_set_cache
self.on_ready(self)
File "/usr/local/lib/python3.6/site-packages/vine/promises.py", line 150, in __call__
svpending(*ca, **ck)
File "/usr/local/lib/python3.6/site-packages/vine/synchronization.py", line 67, in __call__
self.p(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/vine/promises.py", line 150, in __call__
svpending(*ca, **ck)
File "/usr/local/lib/python3.6/site-packages/vine/promises.py", line 143, in __call__
return self.throw()
File "/usr/local/lib/python3.6/site-packages/vine/promises.py", line 140, in __call__
retval = fun(*final_args, **final_kwargs)
File "/usr/local/lib/python3.6/site-packages/celery/result.py", line 877, in _on_ready
ResultSet._on_ready(self)
File "/usr/local/lib/python3.6/site-packages/celery/result.py", line 519, in _on_ready
self._ca
... (truncated) ...
Stack trace
Error Message
-------------
[2019-06-19 03:04:27,712: ERROR/ForkPoolWorker-8] Task process_run_task[fe246ffd-3a55-4bbd-88d8-c17862a80de8] raised unexpected: RuntimeError('Never call result.get() within a task!\nSee http://docs.celeryq.org/en/latest/userguide/tasks.html#task-synchronous-subtasks\n')
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/celery/app/trace.py", line 385, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/celery/app/trace.py", line 648, in __protected_call__
return self.run(*args, **kwargs)
File "/code/myapp/apps/core/tasks.py", line 65, in process_run_task
result.join()
File "/usr/local/lib/python3.7/site-packages/celery/result.py", line 748, in join
assert_will_not_block()
File "/usr/local/lib/python3.7/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
# tasks.py
from celery import Celery
from celery import group
app = Celery('tasks',
backend='redis://',
broker='pyamqp://guest@localhost//')
@app.task()
def A():
result = group(pow2.s(i) for i in range(3)).apply_async()
result.save()
restore.apply_async(kwargs={"result_id": result.id})
@app.task(bind=True)
def restore(self, result_id):
group_result = app.GroupResult.restore(result_id)
if group_result.waiting():
self.retry()
@app.task()
def pow2(i):
return i ** 2
if __name__ == '__main__':
A.apply_async()
Environment
- Python: 3.6
Why It Broke
The weak reference to the bound method in promises prevents proper callback execution
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/4131
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 your application relies on synchronous task execution.
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
- Capture the exact failing error string in logs and tests so you can reproduce via a minimal script.
- Pin production dependencies and upgrade only with a reproducible test that hits the failing path.
Version Compatibility Table
| Version | Status |
|---|---|
| 16.138043 | Broken |
| 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.