<h1 dir="auto">Checklist</h1>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://github.com/celery/celery/discussions">discussions forum</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown &amp; rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>

<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment &amp; Settings</h2>

<p dir="auto"><strong>Celery version</strong>: 5.2.0 (dawn-chorus)</p>

<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:5.2.0 (dawn-chorus) kombu:5.2.1 py:3.8.6
            billiard:3.6.4.0 py-amqp:5.0.6
platform -&gt; system:Darwin arch:64bit
            kernel version:18.7.0 imp:CPython
loader   -&gt; celery.loaders.default.Loader
settings -&gt; transport:amqp results:disabled

deprecated_settings: None
"><pre class="notranslate"><code class="notranslate">software -&gt; celery:5.2.0 (dawn-chorus) kombu:5.2.1 py:3.8.6
            billiard:3.6.4.0 py-amqp:5.0.6
platform -&gt; system:Darwin arch:64bit
            kernel version:18.7.0 imp:CPython
loader   -&gt; celery.loaders.default.Loader
settings -&gt; transport:amqp results:disabled

deprecated_settings: None

</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<ol dir="auto">
<li>create task.py with contents:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@app.task(autoretry_for=(Exception,), retry_backoff=True, name=&quot;task&quot;, acks_late=True)
def task():
    print(&quot;failing&quot;)
    raise Exception()

if __name__ == '__main__':
    task.apply_async(queue='task', expires=60)"><pre class="notranslate"><code class="notranslate">@app.task(autoretry_for=(Exception,), retry_backoff=True, name="task", acks_late=True)
def task():
    print("failing")
    raise Exception()

if __name__ == '__main__':
    task.apply_async(queue='task', expires=60)
</code></pre></div>
<ol dir="auto">
<li>run <code class="notranslate">celery -A task worker -n task -Q task</code></li>
<li>run <code class="notranslate">python task.py</code></li>
</ol>
<h2 dir="auto">Required Dependencies</h2>

<ul dir="auto">
<li><strong>Minimal Python Version</strong>: 3.8.6</li>
<li><strong>Minimal Celery Version</strong>: 5.2.0</li>
<li><strong>Minimal Kombu Version</strong>: 5.2.1</li>
<li><strong>Minimal Broker Version</strong>: RabbitMQ 3.8.16</li>
<li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li>
</ul>
<h3 dir="auto">Python Packages</h3>

<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="amqp==5.0.6
billiard==3.6.4.0
celery==5.2.0
click==8.0.3
click-didyoumean==0.3.0
click-plugins==1.1.1
click-repl==0.2.0
kombu==5.2.1
prompt-toolkit==3.0.22
pytz==2021.3
redis==3.5.3
six==1.16.0
vine==5.0.0
wcwidth==0.2.5
"><pre class="notranslate"><code class="notranslate">amqp==5.0.6
billiard==3.6.4.0
celery==5.2.0
click==8.0.3
click-didyoumean==0.3.0
click-plugins==1.1.1
click-repl==0.2.0
kombu==5.2.1
prompt-toolkit==3.0.22
pytz==2021.3
redis==3.5.3
six==1.16.0
vine==5.0.0
wcwidth==0.2.5

</code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>

<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>

<details>
<p dir="auto">
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@app.task(autoretry_for=(Exception,), retry_backoff=True, name=&quot;task&quot;, acks_late=True)
def task():
    print(&quot;failing&quot;)
    raise Exception()

if __name__ == '__main__':
    task.apply_async(queue='task', expires=60)"><pre class="notranslate"><span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">task</span>(<span class="pl-s1">autoretry_for</span><span class="pl-c1">=</span>(<span class="pl-v">Exception</span>,), <span class="pl-s1">retry_backoff</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"task"</span>, <span class="pl-s1">acks_late</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">task</span>():
    <span class="pl-en">print</span>(<span class="pl-s">"failing"</span>)
    <span class="pl-k">raise</span> <span class="pl-v">Exception</span>()

<span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">'__main__'</span>:
    <span class="pl-s1">task</span>.<span class="pl-en">apply_async</span>(<span class="pl-s1">queue</span><span class="pl-c1">=</span><span class="pl-s">'task'</span>, <span class="pl-s1">expires</span><span class="pl-c1">=</span><span class="pl-c1">60</span>)</pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">the task should run and fail 3 times</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">the task runs and fails once, then the following error</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2021-11-14 18:47:19,555: WARNING/ForkPoolWorker-2] Task task[01e23705-69eb-4021-82fa-7653611cd15f] reject requeue=False: '&lt;' not supported between instances of 'str' and 'int'
Traceback (most recent call last):
  File &quot;/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/app/autoretry.py&quot;, line 34, in run
    return task._orig_run(*args, **kwargs)
  File &quot;/Users/pelegvia/workspace/task-manager/task.py&quot;, line 25, in task
    raise Exception()
Exception

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/app/task.py&quot;, line 734, in retry
    S.apply_async()
  File &quot;/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/canvas.py&quot;, line 219, in apply_async
    return _apply(args, kwargs, **options)
  File &quot;/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/app/task.py&quot;, line 575, in apply_async
    return app.send_task(
  File &quot;/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/app/base.py&quot;, line 741, in send_task
    if expires_s &lt; 0:
TypeError: '&lt;' not supported between instances of 'str' and 'int'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/app/trace.py&quot;, line 451, in trace_task
    R = retval = fun(*args, **kwargs)
  File &quot;/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/app/trace.py&quot;, line 734, in __protected_call__
    return self.run(*args, **kwargs)
  File &quot;/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/app/autoretry.py&quot;, line 54, in run
    ret = task.retry(exc=exc, **retry_kwargs)
  File &quot;/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/app/task.py&quot;, line 736, in retry
    raise Reject(exc, requeue=False)
celery.exceptions.Reject: (TypeError(&quot;'&lt;' not supported between instances of 'str' and 'int'&quot;), False)"><pre class="notranslate"><code class="notranslate">[2021-11-14 18:47:19,555: WARNING/ForkPoolWorker-2] Task task[01e23705-69eb-4021-82fa-7653611cd15f] reject requeue=False: '&lt;' not supported between instances of 'str' and 'int'
Traceback (most recent call last):
  File "/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/app/autoretry.py", line 34, in run
    return task._orig_run(*args, **kwargs)
  File "/Users/pelegvia/workspace/task-manager/task.py", line 25, in task
    raise Exception()
Exception

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/app/task.py", line 734, in retry
    S.apply_async()
  File "/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/canvas.py", line 219, in apply_async
    return _apply(args, kwargs, **options)
  File "/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/app/task.py", line 575, in apply_async
    return app.send_task(
  File "/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/app/base.py", line 741, in send_task
    if expires_s &lt; 0:
TypeError: '&lt;' not supported between instances of 'str' and 'int'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/app/trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/app/trace.py", line 734, in __protected_call__
    return self.run(*args, **kwargs)
  File "/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/app/autoretry.py", line 54, in run
    ret = task.retry(exc=exc, **retry_kwargs)
  File "/Users/pelegvia/.pyenv/versions/via-algo-maps3.8.6/lib/python3.8/site-packages/celery/app/task.py", line 736, in retry
    raise Reject(exc, requeue=False)
celery.exceptions.Reject: (TypeError("'&lt;' not supported between instances of 'str' and 'int'"), False)
</code></pre></div>
<h1 dir="auto">Notes</h1>
<p dir="auto">This does not happen on 5.1.2 only on 5.2.0</p>
<h1 dir="auto">Checklist</h1>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown &amp; rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.<br>
Confirmed to exist on at least celery 4.3.0 as well.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>

<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="196811344" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/3709" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/3709/hovercard" href="https://github.com/celery/celery/issues/3709">#3709</a>  is related to error handling for chords, though this is more of an edge case in which the behavior is problematic, rather than just misalignment of docs and actual behavior.</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>There are several other issues that deal with chains-in-chords, e.g. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="389429074" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5229" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/5229/hovercard" href="https://github.com/celery/celery/issues/5229">#5229</a> seems similar, but nothing that addresses this exact problem. I don't think this duplicates them, but I haven't dug into the celery code enough to be sure that they aren't caused the the same underlying misbehavior in the redis backend.</li>
</ul>
<h2 dir="auto">Environment &amp; Settings</h2>

<p dir="auto"><strong>Celery version</strong>: 4.4.6 (cliffs)</p>

<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:4.4.6 (cliffs) kombu:4.6.11 py:3.6.9
            billiard:3.6.3.0 redis:3.5.3
platform -&gt; system:Linux arch:64bit, ELF
            kernel version:4.4.0-17763-Microsoft imp:CPython
loader   -&gt; celery.loaders.app.AppLoader
settings -&gt; transport:redis results:redis://localhost:6379/

broker_url: 'redis://localhost:6379//'
result_backend: 'redis://localhost:6379/'"><pre class="notranslate"><code class="notranslate">software -&gt; celery:4.4.6 (cliffs) kombu:4.6.11 py:3.6.9
            billiard:3.6.3.0 redis:3.5.3
platform -&gt; system:Linux arch:64bit, ELF
            kernel version:4.4.0-17763-Microsoft imp:CPython
loader   -&gt; celery.loaders.app.AppLoader
settings -&gt; transport:redis results:redis://localhost:6379/

broker_url: 'redis://localhost:6379//'
result_backend: 'redis://localhost:6379/'
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>

<p dir="auto">Not sure that any of these are minimal, but I'll include what I can test locally:</p>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: 3.6</li>
<li><strong>Minimal Celery Version</strong>: 4.3</li>
<li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Version</strong>: 6.0.4</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li>
</ul>
<h3 dir="auto">Python Packages</h3>

<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="amqp==2.6.0
billiard==3.6.3.0
celery==4.4.6
future==0.18.2
importlib-metadata==1.7.0
kombu==4.6.11
pkg-resources==0.0.0
pytz==2020.1
redis==3.5.3
vine==1.3.0
zipp==3.1.0"><pre class="notranslate"><code class="notranslate">amqp==2.6.0
billiard==3.6.3.0
celery==4.4.6
future==0.18.2
importlib-metadata==1.7.0
kombu==4.6.11
pkg-resources==0.0.0
pytz==2020.1
redis==3.5.3
vine==1.3.0
zipp==3.1.0
</code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>

<details>
<p dir="auto">
</p><p dir="auto">Output of <code class="notranslate">redis-server --version</code>, in case it's useful:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Redis server v=6.0.4 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=d5d470262d47f1a0"><pre class="notranslate"><code class="notranslate">Redis server v=6.0.4 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=d5d470262d47f1a0
</code></pre></div>
<p dir="auto"></p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>

<details>
<p dir="auto">
Basic test case below. I'm still working on converting this to an integration test for your test suite.
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from celery import Celery

app = Celery('task_fail', backend='redis://localhost:6379', broker='redis://localhost:6379')

@app.task
def simple_pass():
    print(&quot;Passing&quot;)
    pass

@app.task
def simple_fail():
    print(&quot;Failing!&quot;)
    raise Exception('Fail!')

@app.task
def record_failure(*args, **kwargs):
    print(f'Fail with args={args}, kwargs={kwargs}')

if __name__ == &quot;__main__&quot;:
    from celery import chord

    # Test 1: Passes - When the chain fails at the end, the failure logic on
    # the chord is executed.
    try:
        chain = simple_pass.si() | simple_fail.si()
        ~chord([simple_pass.si(), chain],
                simple_pass.si().on_error(record_failure.s(test=&quot;test_1&quot;)))
    except Exception:
        print(&quot;Test 1 worked&quot;)

    # Test 2: Fails - When the chain has an intermediate exception, the failure
    # logic on the chord is not executed &amp; the client simply hangs.
    try:
        chain = simple_pass.si() | simple_fail.si() | simple_pass.si()
        ~chord([simple_pass.si(), chain],
                simple_pass.si().on_error(record_failure.s(test=&quot;test_2&quot;)))
    except Exception:
        print(&quot;Test 2 worked&quot;)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">celery</span> <span class="pl-k">import</span> <span class="pl-v">Celery</span>

<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Celery</span>(<span class="pl-s">'task_fail'</span>, <span class="pl-s1">backend</span><span class="pl-c1">=</span><span class="pl-s">'redis://localhost:6379'</span>, <span class="pl-s1">broker</span><span class="pl-c1">=</span><span class="pl-s">'redis://localhost:6379'</span>)

<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-s1">task</span></span>
<span class="pl-k">def</span> <span class="pl-en">simple_pass</span>():
    <span class="pl-en">print</span>(<span class="pl-s">"Passing"</span>)
    <span class="pl-k">pass</span>

<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-s1">task</span></span>
<span class="pl-k">def</span> <span class="pl-en">simple_fail</span>():
    <span class="pl-en">print</span>(<span class="pl-s">"Failing!"</span>)
    <span class="pl-k">raise</span> <span class="pl-v">Exception</span>(<span class="pl-s">'Fail!'</span>)

<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-s1">task</span></span>
<span class="pl-k">def</span> <span class="pl-en">record_failure</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>):
    <span class="pl-en">print</span>(<span class="pl-s">f'Fail with args=<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">args</span><span class="pl-kos">}</span></span>, kwargs=<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">kwargs</span><span class="pl-kos">}</span></span>'</span>)

<span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">"__main__"</span>:
    <span class="pl-k">from</span> <span class="pl-s1">celery</span> <span class="pl-k">import</span> <span class="pl-s1">chord</span>

    <span class="pl-c"># Test 1: Passes - When the chain fails at the end, the failure logic on</span>
    <span class="pl-c"># the chord is executed.</span>
    <span class="pl-k">try</span>:
        <span class="pl-s1">chain</span> <span class="pl-c1">=</span> <span class="pl-s1">simple_pass</span>.<span class="pl-en">si</span>() <span class="pl-c1">|</span> <span class="pl-s1">simple_fail</span>.<span class="pl-en">si</span>()
        <span class="pl-c1">~</span><span class="pl-en">chord</span>([<span class="pl-s1">simple_pass</span>.<span class="pl-en">si</span>(), <span class="pl-s1">chain</span>],
                <span class="pl-s1">simple_pass</span>.<span class="pl-en">si</span>().<span class="pl-en">on_error</span>(<span class="pl-s1">record_failure</span>.<span class="pl-en">s</span>(<span class="pl-s1">test</span><span class="pl-c1">=</span><span class="pl-s">"test_1"</span>)))
    <span class="pl-k">except</span> <span class="pl-v">Exception</span>:
        <span class="pl-en">print</span>(<span class="pl-s">"Test 1 worked"</span>)

    <span class="pl-c"># Test 2: Fails - When the chain has an intermediate exception, the failure</span>
    <span class="pl-c"># logic on the chord is not executed &amp; the client simply hangs.</span>
    <span class="pl-k">try</span>:
        <span class="pl-s1">chain</span> <span class="pl-c1">=</span> <span class="pl-s1">simple_pass</span>.<span class="pl-en">si</span>() <span class="pl-c1">|</span> <span class="pl-s1">simple_fail</span>.<span class="pl-en">si</span>() <span class="pl-c1">|</span> <span class="pl-s1">simple_pass</span>.<span class="pl-en">si</span>()
        <span class="pl-c1">~</span><span class="pl-en">chord</span>([<span class="pl-s1">simple_pass</span>.<span class="pl-en">si</span>(), <span class="pl-s1">chain</span>],
                <span class="pl-s1">simple_pass</span>.<span class="pl-en">si</span>().<span class="pl-en">on_error</span>(<span class="pl-s1">record_failure</span>.<span class="pl-en">s</span>(<span class="pl-s1">test</span><span class="pl-c1">=</span><span class="pl-s">"test_2"</span>)))
    <span class="pl-k">except</span> <span class="pl-v">Exception</span>:
        <span class="pl-en">print</span>(<span class="pl-s">"Test 2 worked"</span>)</pre></div>
<p dir="auto">Note that the only difference between test 1 and test 2 is that test 2 add the <code class="notranslate">simple_pass.si()</code> call to the end of the chain. That seems to be enough to trigger this error.</p>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">Test 2 should behave the same way that Test 1 does. Output of Test 1, with some simplification:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2020-07-10 15:28:52,940: INFO/MainProcess] Received task: task_fail.simple_pass[65241973-d598-4bbe-a0c8-1f86694c9f33]
[2020-07-10 15:28:52,945: WARNING/ForkPoolWorker-8] Passing
[2020-07-10 15:28:52,954: INFO/ForkPoolWorker-8] Task task_fail.simple_pass[65241973-d598-4bbe-a0c8-1f86694c9f33] succeeded in 0.008173699956387281s: None
[2020-07-10 15:28:52,967: INFO/MainProcess] Received task: task_fail.simple_pass[fc15c163-0616-4b87-94c3-2c1b225f2e0e]
[2020-07-10 15:28:52,972: WARNING/ForkPoolWorker-8] Passing
[2020-07-10 15:28:52,985: INFO/ForkPoolWorker-8] Task task_fail.simple_pass[fc15c163-0616-4b87-94c3-2c1b225f2e0e] succeeded in 0.013192899990826845s: None
[2020-07-10 15:28:52,985: INFO/MainProcess] Received task: task_fail.simple_fail[0b0a3925-7ea8-4423-8e87-3a9f00d5c967]
[2020-07-10 15:28:52,992: WARNING/ForkPoolWorker-8] Failing!
[2020-07-10 15:28:53,010: ERROR/ForkPoolWorker-8] Chord callback for '76840678-80a3-4915-96b8-04c135ecb237' raised: ChordError(&quot;Dependency 0b0a3925-7ea8-4423-8e87-3a9f00d5c967 raised Exception('Fail!',)&quot;,)
Traceback (most recent call last):
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/celery/app/trace.py&quot;, line 412, in trace_task
    R = retval = fun(*args, **kwargs)
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/celery/app/trace.py&quot;, line 704, in __protected_call__
    return self.run(*args, **kwargs)
  File &quot;~/celery/task_fail.py&quot;, line 13, in simple_fail
    raise Exception('Fail!')
Exception: Fail!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/celery/backends/redis.py&quot;, line 449, in on_chord_part_return
    callback.delay([unpack(tup, decode) for tup in resl])
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/celery/backends/redis.py&quot;, line 449, in &lt;listcomp&gt;
    callback.delay([unpack(tup, decode) for tup in resl])
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/celery/backends/redis.py&quot;, line 402, in _unpack_chord_result
    raise ChordError('Dependency {0} raised {1!r}'.format(tid, retval))
celery.exceptions.ChordError: Dependency 0b0a3925-7ea8-4423-8e87-3a9f00d5c967 raised Exception('Fail!',)
[2020-07-10 15:28:53,022: INFO/MainProcess] Received task: task_fail.record_failure[5f264f5d-a330-4f01-9274-662474d31a8f]
[2020-07-10 15:28:53,026: ERROR/ForkPoolWorker-8] Task task_fail.simple_fail[0b0a3925-7ea8-4423-8e87-3a9f00d5c967] raised unexpected: Exception('Fail!',)
Traceback (most recent call last):
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/celery/app/trace.py&quot;, line 412, in trace_task
    R = retval = fun(*args, **kwargs)
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/celery/app/trace.py&quot;, line 704, in __protected_call__
    return self.run(*args, **kwargs)
  File &quot;~/celery/task_fail.py&quot;, line 13, in simple_fail
    raise Exception('Fail!')
Exception: Fail![2020-07-10 15:28:53,028: WARNING/ForkPoolWorker-1] Fail with args=('bc3aeb74-68c1-40e9-9c55-be9fb7860786',), kwargs={'test': 'test_1'}
[2020-07-10 15:28:53,036: INFO/ForkPoolWorker-1] Task task_fail.record_failure[5f264f5d-a330-4f01-9274-662474d31a8f] succeeded in 0.007674199994653463s: None"><pre class="notranslate"><code class="notranslate">[2020-07-10 15:28:52,940: INFO/MainProcess] Received task: task_fail.simple_pass[65241973-d598-4bbe-a0c8-1f86694c9f33]
[2020-07-10 15:28:52,945: WARNING/ForkPoolWorker-8] Passing
[2020-07-10 15:28:52,954: INFO/ForkPoolWorker-8] Task task_fail.simple_pass[65241973-d598-4bbe-a0c8-1f86694c9f33] succeeded in 0.008173699956387281s: None
[2020-07-10 15:28:52,967: INFO/MainProcess] Received task: task_fail.simple_pass[fc15c163-0616-4b87-94c3-2c1b225f2e0e]
[2020-07-10 15:28:52,972: WARNING/ForkPoolWorker-8] Passing
[2020-07-10 15:28:52,985: INFO/ForkPoolWorker-8] Task task_fail.simple_pass[fc15c163-0616-4b87-94c3-2c1b225f2e0e] succeeded in 0.013192899990826845s: None
[2020-07-10 15:28:52,985: INFO/MainProcess] Received task: task_fail.simple_fail[0b0a3925-7ea8-4423-8e87-3a9f00d5c967]
[2020-07-10 15:28:52,992: WARNING/ForkPoolWorker-8] Failing!
[2020-07-10 15:28:53,010: ERROR/ForkPoolWorker-8] Chord callback for '76840678-80a3-4915-96b8-04c135ecb237' raised: ChordError("Dependency 0b0a3925-7ea8-4423-8e87-3a9f00d5c967 raised Exception('Fail!',)",)
Traceback (most recent call last):
  File "~/celery/celery.venv/lib/python3.6/site-packages/celery/app/trace.py", line 412, in trace_task
    R = retval = fun(*args, **kwargs)
  File "~/celery/celery.venv/lib/python3.6/site-packages/celery/app/trace.py", line 704, in __protected_call__
    return self.run(*args, **kwargs)
  File "~/celery/task_fail.py", line 13, in simple_fail
    raise Exception('Fail!')
Exception: Fail!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "~/celery/celery.venv/lib/python3.6/site-packages/celery/backends/redis.py", line 449, in on_chord_part_return
    callback.delay([unpack(tup, decode) for tup in resl])
  File "~/celery/celery.venv/lib/python3.6/site-packages/celery/backends/redis.py", line 449, in &lt;listcomp&gt;
    callback.delay([unpack(tup, decode) for tup in resl])
  File "~/celery/celery.venv/lib/python3.6/site-packages/celery/backends/redis.py", line 402, in _unpack_chord_result
    raise ChordError('Dependency {0} raised {1!r}'.format(tid, retval))
celery.exceptions.ChordError: Dependency 0b0a3925-7ea8-4423-8e87-3a9f00d5c967 raised Exception('Fail!',)
[2020-07-10 15:28:53,022: INFO/MainProcess] Received task: task_fail.record_failure[5f264f5d-a330-4f01-9274-662474d31a8f]
[2020-07-10 15:28:53,026: ERROR/ForkPoolWorker-8] Task task_fail.simple_fail[0b0a3925-7ea8-4423-8e87-3a9f00d5c967] raised unexpected: Exception('Fail!',)
Traceback (most recent call last):
  File "~/celery/celery.venv/lib/python3.6/site-packages/celery/app/trace.py", line 412, in trace_task
    R = retval = fun(*args, **kwargs)
  File "~/celery/celery.venv/lib/python3.6/site-packages/celery/app/trace.py", line 704, in __protected_call__
    return self.run(*args, **kwargs)
  File "~/celery/task_fail.py", line 13, in simple_fail
    raise Exception('Fail!')
Exception: Fail![2020-07-10 15:28:53,028: WARNING/ForkPoolWorker-1] Fail with args=('bc3aeb74-68c1-40e9-9c55-be9fb7860786',), kwargs={'test': 'test_1'}
[2020-07-10 15:28:53,036: INFO/ForkPoolWorker-1] Task task_fail.record_failure[5f264f5d-a330-4f01-9274-662474d31a8f] succeeded in 0.007674199994653463s: None
</code></pre></div>
<p dir="auto">The most important thing to notice here is that the <code class="notranslate">record_failure</code> task is called &amp; logs the failure, including the ID of the failing task. I expect this behavior to occur in both cases.</p>
<h1 dir="auto">Actual Behavior</h1>

<p dir="auto">The output of the worker on Test 2 is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2020-07-10 15:28:55,039: INFO/MainProcess] Received task: task_fail.simple_pass[5779ce6a-64af-40ea-9b26-8ff3bdad348d]
[2020-07-10 15:28:55,050: INFO/MainProcess] Received task: task_fail.simple_pass[39469dfa-401c-45f0-9314-5849f6e7ca5f]
[2020-07-10 15:28:55,051: WARNING/ForkPoolWorker-8] Passing
[2020-07-10 15:28:55,051: WARNING/ForkPoolWorker-1] Passing
[2020-07-10 15:28:55,058: INFO/ForkPoolWorker-8] Task task_fail.simple_pass[5779ce6a-64af-40ea-9b26-8ff3bdad348d] succeeded in 0.007474799989722669s: None
[2020-07-10 15:28:55,062: INFO/ForkPoolWorker-1] Task task_fail.simple_pass[39469dfa-401c-45f0-9314-5849f6e7ca5f] succeeded in 0.010612400015816092s: None
[2020-07-10 15:28:55,069: INFO/MainProcess] Received task: task_fail.simple_fail[2fead196-cfe2-4ce5-896f-303c2f9970e2]
[2020-07-10 15:28:55,073: WARNING/ForkPoolWorker-8] Failing!
[2020-07-10 15:28:55,081: ERROR/ForkPoolWorker-8] Task task_fail.simple_fail[2fead196-cfe2-4ce5-896f-303c2f9970e2] raised unexpected: Exception('Fail!',)
Traceback (most recent call last):
  File &quot;/home/crawjor/test/celery/celery.venv/lib/python3.6/site-packages/celery/app/trace.py&quot;, line 412, in trace_task
    R = retval = fun(*args, **kwargs)
  File &quot;/home/crawjor/test/celery/celery.venv/lib/python3.6/site-packages/celery/app/trace.py&quot;, line 704, in __protected_call__
    return self.run(*args, **kwargs)
  File &quot;/home/crawjor/test/celery/task_fail.py&quot;, line 13, in simple_fail
    raise Exception('Fail!')
Exception: Fail!"><pre class="notranslate"><code class="notranslate">[2020-07-10 15:28:55,039: INFO/MainProcess] Received task: task_fail.simple_pass[5779ce6a-64af-40ea-9b26-8ff3bdad348d]
[2020-07-10 15:28:55,050: INFO/MainProcess] Received task: task_fail.simple_pass[39469dfa-401c-45f0-9314-5849f6e7ca5f]
[2020-07-10 15:28:55,051: WARNING/ForkPoolWorker-8] Passing
[2020-07-10 15:28:55,051: WARNING/ForkPoolWorker-1] Passing
[2020-07-10 15:28:55,058: INFO/ForkPoolWorker-8] Task task_fail.simple_pass[5779ce6a-64af-40ea-9b26-8ff3bdad348d] succeeded in 0.007474799989722669s: None
[2020-07-10 15:28:55,062: INFO/ForkPoolWorker-1] Task task_fail.simple_pass[39469dfa-401c-45f0-9314-5849f6e7ca5f] succeeded in 0.010612400015816092s: None
[2020-07-10 15:28:55,069: INFO/MainProcess] Received task: task_fail.simple_fail[2fead196-cfe2-4ce5-896f-303c2f9970e2]
[2020-07-10 15:28:55,073: WARNING/ForkPoolWorker-8] Failing!
[2020-07-10 15:28:55,081: ERROR/ForkPoolWorker-8] Task task_fail.simple_fail[2fead196-cfe2-4ce5-896f-303c2f9970e2] raised unexpected: Exception('Fail!',)
Traceback (most recent call last):
  File "/home/crawjor/test/celery/celery.venv/lib/python3.6/site-packages/celery/app/trace.py", line 412, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/crawjor/test/celery/celery.venv/lib/python3.6/site-packages/celery/app/trace.py", line 704, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/crawjor/test/celery/task_fail.py", line 13, in simple_fail
    raise Exception('Fail!')
Exception: Fail!
</code></pre></div>
<p dir="auto">Then no more progress is made. Note that neither the error handler nor the callback is ever invoked, despite the chain failing (which should trigger failure handlers in the chord).</p>
<p dir="auto">The client side also hangs waiting on redis:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="File &quot;task_fail.py&quot;, line 40, in &lt;module&gt;
    simple_pass.si().on_error(record_failure.s(test=&quot;test_2&quot;)))
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/celery/canvas.py&quot;, line 475, in __invert__
    return self.apply_async().get()
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/celery/result.py&quot;, line 237, in get
    on_message=on_message,
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/celery/backends/asynchronous.py&quot;, line 200, in wait_for_pending
    for _ in self._wait_for_pending(result, **kwargs):
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/celery/backends/asynchronous.py&quot;, line 268, in _wait_for_pending
    on_interval=on_interval):
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/celery/backends/asynchronous.py&quot;, line 55, in drain_events_until
    yield self.wait_for(p, wait, timeout=interval)
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/celery/backends/asynchronous.py&quot;, line 64, in wait_for
    wait(timeout=timeout)
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/celery/backends/redis.py&quot;, line 161, in drain_events
    message = self._pubsub.get_message(timeout=timeout)
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/redis/client.py&quot;, line 3617, in get_message
    response = self.parse_response(block=False, timeout=timeout)
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/redis/client.py&quot;, line 3503, in parse_response
    if not block and not conn.can_read(timeout=timeout):
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/redis/connection.py&quot;, line 734, in can_read
    return self._parser.can_read(timeout)
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/redis/connection.py&quot;, line 321, in can_read
    return self._buffer and self._buffer.can_read(timeout)
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/redis/connection.py&quot;, line 231, in can_read
    raise_on_timeout=False)
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/redis/connection.py&quot;, line 198, in _read_from_socket
    data = recv(self._sock, socket_read_size)
  File &quot;~/celery/celery.venv/lib/python3.6/site-packages/redis/_compat.py&quot;, line 72, in recv"><pre class="notranslate"><code class="notranslate">File "task_fail.py", line 40, in &lt;module&gt;
    simple_pass.si().on_error(record_failure.s(test="test_2")))
  File "~/celery/celery.venv/lib/python3.6/site-packages/celery/canvas.py", line 475, in __invert__
    return self.apply_async().get()
  File "~/celery/celery.venv/lib/python3.6/site-packages/celery/result.py", line 237, in get
    on_message=on_message,
  File "~/celery/celery.venv/lib/python3.6/site-packages/celery/backends/asynchronous.py", line 200, in wait_for_pending
    for _ in self._wait_for_pending(result, **kwargs):
  File "~/celery/celery.venv/lib/python3.6/site-packages/celery/backends/asynchronous.py", line 268, in _wait_for_pending
    on_interval=on_interval):
  File "~/celery/celery.venv/lib/python3.6/site-packages/celery/backends/asynchronous.py", line 55, in drain_events_until
    yield self.wait_for(p, wait, timeout=interval)
  File "~/celery/celery.venv/lib/python3.6/site-packages/celery/backends/asynchronous.py", line 64, in wait_for
    wait(timeout=timeout)
  File "~/celery/celery.venv/lib/python3.6/site-packages/celery/backends/redis.py", line 161, in drain_events
    message = self._pubsub.get_message(timeout=timeout)
  File "~/celery/celery.venv/lib/python3.6/site-packages/redis/client.py", line 3617, in get_message
    response = self.parse_response(block=False, timeout=timeout)
  File "~/celery/celery.venv/lib/python3.6/site-packages/redis/client.py", line 3503, in parse_response
    if not block and not conn.can_read(timeout=timeout):
  File "~/celery/celery.venv/lib/python3.6/site-packages/redis/connection.py", line 734, in can_read
    return self._parser.can_read(timeout)
  File "~/celery/celery.venv/lib/python3.6/site-packages/redis/connection.py", line 321, in can_read
    return self._buffer and self._buffer.can_read(timeout)
  File "~/celery/celery.venv/lib/python3.6/site-packages/redis/connection.py", line 231, in can_read
    raise_on_timeout=False)
  File "~/celery/celery.venv/lib/python3.6/site-packages/redis/connection.py", line 198, in _read_from_socket
    data = recv(self._sock, socket_read_size)
  File "~/celery/celery.venv/lib/python3.6/site-packages/redis/_compat.py", line 72, in recv
</code></pre></div>
<p dir="auto">There are no active, revoked, scheduled, or reserved tasks, and the queue is empty:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="~/celery$ celery -A task_fail inspect active
-&gt; celery: OK
    - empty -
~/celery$ celery -A task_fail inspect scheduled
-&gt; celery: OK
    - empty -
~/celery$ celery -A task_fail inspect revoked
-&gt; celery: OK
    - empty -
~/celery$ celery -A task_fail inspect reserved
-&gt; celery: OK
    - empty -"><pre class="notranslate"><code class="notranslate">~/celery$ celery -A task_fail inspect active
-&gt; celery: OK
    - empty -
~/celery$ celery -A task_fail inspect scheduled
-&gt; celery: OK
    - empty -
~/celery$ celery -A task_fail inspect revoked
-&gt; celery: OK
    - empty -
~/celery$ celery -A task_fail inspect reserved
-&gt; celery: OK
    - empty -
</code></pre></div>