Issue 1:
Checklist

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

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Description

Prior to Celery 4.4.0, the celery.app.control.Inspect.scheduled() API used to return "args" and "kwargs" as strings which could be parsed using ast.literal_eval. Now, they seem to be a list and dict respectively:

{'id': 'd82058c7-12b0-4914-8381-2fef9ad874a9', 'name': '...', 'args': ['time', 'sleep', 5], 'kwargs': {}, 'type': '...', }

Suggestions

I assume this is a deliberate design change; it would have been helpful to add this breaking change to the release notes!

Issue 2:
Checklist

I have verified that the issue exists against the master branch of Celery.

This has already been asked to the discussion group first.

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

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.

Related Issues and Possible Duplicates

Related Issues

#3712

Possible Duplicates

None

Environment & Settings

Celery version: 4.2.1

celery report Output:

celery -A svc.tasks.tasks worker -Q try1 -l info --concurrency=1 -E --time-limit=10

celery_1 | Please specify a different user using the --uid option.

celery_1 |

celery_1 | User information: uid=0 euid=0 gid=0 egid=0

celery_1 |

celery_1 | uid=uid, euid=euid, gid=gid, egid=egid,

celery_1 | [2019-11-21 14:22:20,830: INFO/MainProcess]

celery_1 |

celery_1 | [2019-11-21 14:22:21,269: INFO/MainProcess] Connected to sqs://AKIASKQ2RR3ONPGUV6GP:**@sqs.us-east-1.amazonaws.com/160043208412/try1

celery_1 | [2019-11-21 14:22:21,276: INFO/MainProcess]

celery_1 | [2019-11-21 14:22:21,797: INFO/MainProcess] e9d5e94d2270 ready.

Steps to Reproduce

Required Dependencies

Minimal Python Version: 2.6

Minimal Celery Version: 4.2.1

Minimal Kombu Version: 4.6.6

Minimal Broker Version: N/A or Unknown

Minimal Result Backend Version: N/A or Unknown

Minimal OS and/or Kernel Version: N/A or Unknown

Minimal Broker Client Version: N/A or Unknown

Minimal Result Backend Client Version: N/A or Unknown

Python Packages

pip freeze Output:

amqp==2.5.2
billiard==3.6.1.0
boto3==1.10.23
botocore==1.13.23
celery==4.4.0rc4
Click==7.0
docutils==0.15.2
Flask==1.1.1
importlib-metadata==0.23
itsdangerous==1.1.0
Jinja2==2.10.3
jmespath==0.9.4
kombu===4.6.6
MarkupSafe==1.1.1
more-itertools==7.2.0
pycurl==7.43.0.3
python-dateutil==2.8.0
pytz==2019.3
redis==2.10.6
s3transfer==0.2.1
six==1.13.0
urllib3==1.25.7
vine==1.3.0
Werkzeug==0.16.0
zipp==0.6.0

Other Dependencies

Minimally Reproducible Test Case

from celery import Celery
app.conf.worker_prefetch_multiplier = 1

@app.task(base=BaseAsyncJobTask, acks_late=True, acks_on_failure_or_timeout=False)
def dead_letter_q_task():
return 1/0

dead_letter_q_task.delay()
dead_letter_q_task.delay()
dead_letter_q_task.delay()

Expected Behavior

I expect all the tasks to be executed, although the first task failed

Actual Behavior

The first task was executed, but the rest weren't.

The problem originates from the prefetch multiplier feature, with acks_late=True and acks_on_failure_or_timeout=False flags.

The problem is that the prefetched task is remaining in the local queue although it was failed (because it will not be acked on failure). This causes the mechanism not fetching any more tasks, and workers are not executing anything.

I.e the solution would be acking the message in the local queue, but not acking it in the remote queue.

I would like to fix the issue myself, but I can't figure out how can I remove from https://github.com/celery/kombu/blob/master/kombu/transport/virtual/base.py#L191

The failed task