Jump to solution
Verify

The Fix

pip install celery==4.4.0rc5

Based on closed celery/celery issue #5496 · 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.

Jump to Verify Open PR/Commit
@@ -134,7 +134,9 @@ def iter_native(self, result, no_ack=True, **kwargs): bucket = deque() for node in results: - if node._cache: + if not hasattr(node, '_cache'): + bucket.append(node)
repro.py
from celery import Celery app = Celery( 'myapp', broker='amqp://guest@localhost//', backend='redis://localhost:6379/0' ) @app.task def t(): print('t-t-t') if __name__ == '__main__': app.start()
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
Option A — Upgrade to fixed release\npip install celery==4.4.0rc5\nWhen NOT to use: Do not apply this fix if the task structure does not involve nested groups and chains.\n\n

Why This Fix Works in Production

  • Trigger: result = async_result.get()
  • Mechanism: Nested group and chain in Celery leads to GroupResult lacking the _cache attribute
  • Why the fix works: Fixes the issue with nested group and chain in Celery, addressing the lack of _cache attribute in GroupResult. (first fixed release: 4.4.0rc5).
Production impact:
  • 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.7 in real deployments (not just unit tests).
  • Nested group and chain in Celery leads to GroupResult lacking the _cache attribute
  • Surfaces as: Traceback (most recent call last):

Proof / Evidence

  • GitHub issue: #5496
  • Fix PR: https://github.com/celery/celery/pull/5638
  • 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.50

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“@p-eli provide a test case that can be used. First, the task file: myapp.py then send tasks by:”
@tothegump · 2019-05-07 · source
“This can be reproduced on master and I used RabbitMQ as broker”
@tothegump · 2019-05-06 · source

Failure Signature (Search String)

  • result = async_result.get()

Error Message

Stack trace
error.txt
Error Message ------------- Traceback (most recent call last): File "/my_app.py", line 111, in add_to_queue result = async_result.get() File "/root/.cache/pypoetry/virtualenvs/my_app/lib/python3.7/site-packages/celery/result.py", line 697, in get on_interval=on_interval, File "/root/.cache/pypoetry/virtualenvs/my_app/lib/python3.7/site-packages/celery/result.py", line 815, in join_native on_message, on_interval): File "/root/.cache/pypoetry/virtualenvs/my_app/lib/python3.7/site-packages/celery/backends/asynchronous.py", line 137, in iter_native if node._cache: AttributeError: 'GroupResult' object has no attribute '_cache'

Minimal Reproduction

repro.py
from celery import Celery app = Celery( 'myapp', broker='amqp://guest@localhost//', backend='redis://localhost:6379/0' ) @app.task def t(): print('t-t-t') if __name__ == '__main__': app.start()

Environment

  • Python: 3.7

What Broke

Tasks fail to execute correctly, resulting in unexpected GroupResult structures.

Why It Broke

Nested group and chain in Celery leads to GroupResult lacking the _cache attribute

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

pip install celery==4.4.0rc5

When NOT to use: Do not apply this fix if the task structure does not involve nested groups and chains.

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/5638

First fixed release: 4.4.0rc5

Last verified: 2026-02-09. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • Do not apply this fix if the task structure does not involve nested groups and chains.

Verify Fix

verify
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

VersionStatus
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.