Skip to content

maximum recursion depth exceeded for a canvas in Celery 4.4.0 (cliffs) #5973

@anilaratna2

Description

@anilaratna2

Checklist

  • I have verified that the issue exists against the master branch of Celery.
  • This has already been asked to the discussion group first. (No option to post for me)
  • I have read the relevant section in the
    contribution guide
    on reporting bugs.
  • I have checked the issues list
    for similar or identical bug reports.
  • I have checked the pull requests list
    for existing proposed fixes.
  • I have checked the commit log
    to find out if the bug was already fixed in the master branch.
  • I have included all related issues and possible duplicate issues
    in this issue (If there are none, check this box anyway).

Mandatory Debugging Information

  • I have included the output of celery -A proj report in the issue.
    (if you are not able to do this, then at least specify the Celery
    version affected). - Celery 4.4.0 (cliffs)
  • I have verified that the issue exists against the master branch of Celery.
  • I have included the contents of pip freeze in the issue.
  • I have included all the versions of all the external dependencies required
    to reproduce this bug.

Optional Debugging Information

  • I have tried reproducing the issue on more than one Python version
    and/or implementation.
  • I have tried reproducing the issue on more than one message broker and/or
    result backend.
  • I have tried reproducing the issue on more than one version of the message
    broker and/or result backend.
  • I have tried reproducing the issue on more than one operating system.
  • I have tried reproducing the issue on more than one workers pool.
  • I have tried reproducing the issue with autoscaling, retries,
    ETA/Countdown & rate limits disabled.
  • I have tried reproducing the issue after downgrading
    and/or upgrading Celery and its dependencies. Works in Celery 4.1

Related Issues and Possible Duplicates

Related Issues

  • None

Possible Duplicates

  • None

Environment & Settings

Celery version 4.4.0 (cliffs):

celery report Output:

Steps to Reproduce

sig = signature('any_taskname', queue='any_q')
chain( [ chain( sig ) ] ).apply_async()

Required Dependencies

  • Minimal Python Version: 2.7
  • Minimal Celery Version: 4.4
  • Minimal Kombu Version: 4.6.7
  • Minimal Broker Version: N/A
  • Minimal Result Backend Version: N/A
  • Minimal OS and/or Kernel Version: N/A
  • Minimal Broker Client Version: N/A
  • Minimal Result Backend Client Version: N/A

Python Packages

pip freeze Output:

Other Dependencies

Details

N/A

Minimally Reproducible Test Case

Details

sig = signature('any_taskname', queue='any_q')
chain( [ chain( sig ) ] ).apply_async()

Expected Behavior

It should publish task 'any_taskname' to queue 'any_q'

Actual Behavior

Max recursion depth exceeded

Traceback (most recent call last):
  File "test.py", line 30, in <module>
    chain([chain(s2)]).apply_async() # issue
  File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 642, in apply_async
    dict(self.options, **options) if options else self.options))
  File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 660, in run
    task_id, group_id, chord,
  File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 721, in prepare_steps
    task = task.clone(args, kwargs)
  File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 620, in clone
    for sig in signature.kwargs['tasks']
  File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 1513, in maybe_signature
    d = d.clone()
  File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 620, in clone
    for sig in signature.kwargs['tasks']
  File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 1513, in maybe_signature
    d = d.clone()
...
..
  File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 620, in clone
    for sig in signature.kwargs['tasks']
  File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 1513, in maybe_signature
    d = d.clone()
keeps repeating
..
..
  File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 617, in clone
    signature = Signature.clone(self, *args, **kwargs)
  File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 272, in clone
    app=self._app)
  File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 153, in from_dict
    return target_cls.from_dict(d, app=app)
  File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 599, in from_dict
    return _upgrade(d, _chain(tasks, app=app, **d['options']))
  File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 602, in __init__
    tasks = (regen(tasks[0]) if len(tasks) == 1 and is_list(tasks[0])
  File "/bb/bin/dl/celery/4.4/kombu/utils/functional.py", line 256, in is_list
    return isinstance(l, iters) and not isinstance(l, scalars or ())
  File "/opt/bb/lib/python2.7/abc.py", line 132, in __instancecheck__
    if subclass is not None and subclass in cls._abc_cache:
  File "/opt/bb/lib/python2.7/_weakrefset.py", line 72, in __contains__
    wr = ref(item)
RuntimeError: maximum recursion depth exceeded

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions