Jump to solution
Verify

The Fix

pip install celery==4.4.1

Based on closed celery/celery issue #5947 · 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
@@ -1366,6 +1366,8 @@ def _traverse_tasks(self, tasks, value=None): if isinstance(task, group): stack.extend(task.tasks) + elif isinstance(task, _chain) and isinstance(task.tasks[-1], group): + stack.extend(task.tasks[-1].tasks) else:
repro.py
from time import sleep from celery import chord, group from app.celery_app import app @app.task def task(): chord([ a.s(1) | group([b.si(), b.si()]), a.s(3) | group([b.si(), b.si()]), ])(c.si()) @app.task def task_correct(): chord([ a.s(1) | group([b.si(), b.si()]) | dummy.si(), a.s(3) | group([b.si(), b.si()]) | dummy.si(), ])(c.si()) @app.task def dummy(): pass @app.task def a(delay): sleep(delay) @app.task def b(): pass @app.task def c(): pass
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.1\nWhen NOT to use: Do not apply this fix if the task structure does not involve chords and groups.\n\n

Why This Fix Works in Production

  • Trigger: - [x] I have included all related issues and possible duplicate issues
  • Mechanism: The chord callback is triggered multiple times due to incorrect handling of task results in the redis list
  • Why the fix works: Fixes the issue with chords and chained groups by modifying the _traverse_tasks method. (first fixed release: 4.4.1).
Production impact:
  • If left unfixed, this can cause silent data inconsistencies that propagate (bad cache entries, incorrect downstream decisions).

Why This Breaks in Prod

  • The chord callback is triggered multiple times due to incorrect handling of task results in the redis list
  • Production symptom (often without a traceback): - [x] I have included all related issues and possible duplicate issues

Proof / Evidence

  • GitHub issue: #5947
  • Fix PR: https://github.com/celery/celery/pull/5984
  • First fixed release: 4.4.1
  • 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.52

Discussion

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

“feel free to come with a PR :) and sorry for so late response as I was on vacation :+1:”
@auvipy · 2020-02-26 · source
“I've figured out what exactly is happening”
@the-owl · 2020-02-05 · source

Failure Signature (Search String)

  • - [x] I have included all related issues and possible duplicate issues
  • 2. Call a broken task via `celery -A app.celery_app call app.tasks.bug.task`
Copy-friendly signature
signature.txt
Failure Signature ----------------- - [x] I have included all related issues and possible duplicate issues 2. Call a broken task via `celery -A app.celery_app call app.tasks.bug.task`

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- - [x] I have included all related issues and possible duplicate issues 2. Call a broken task via `celery -A app.celery_app call app.tasks.bug.task`

Minimal Reproduction

repro.py
from time import sleep from celery import chord, group from app.celery_app import app @app.task def task(): chord([ a.s(1) | group([b.si(), b.si()]), a.s(3) | group([b.si(), b.si()]), ])(c.si()) @app.task def task_correct(): chord([ a.s(1) | group([b.si(), b.si()]) | dummy.si(), a.s(3) | group([b.si(), b.si()]) | dummy.si(), ])(c.si()) @app.task def dummy(): pass @app.task def a(delay): sleep(delay) @app.task def b(): pass @app.task def c(): pass

What Broke

Chords with chained groups lead to duplicate task execution and incorrect order of results.

Why It Broke

The chord callback is triggered multiple times due to incorrect handling of task results in the redis list

Fix Options (Details)

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

pip install celery==4.4.1

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

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

First fixed release: 4.4.1

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 chords and groups.

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

  • Make timeouts explicit and test them (unit + integration) to avoid silent behavior changes.
  • Instrument retries (attempt count + reason) and alert on spikes to catch dependency slowdowns.

Version Compatibility Table

VersionStatus
4.4.1 Fixed

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.