Issue 1:
Checklist

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

None

Possible Duplicates

None

Environment & Settings

Celery version:

celery report Output:

Steps to Reproduce

Required Dependencies

Minimal Python Version: N/A or Unknown

Minimal Celery Version: N/A or Unknown

Minimal Kombu Version: N/A or Unknown

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:

Other Dependencies

N/A

Minimally Reproducible Test Case

Expected Behavior

Actual Behavior

After the cancel operation, the task continues to run without stopping

Issue 2:
Dispatch the same task many times from multiple processes and have 1 celery worker. The messages to ack upon completion are tracked using the delivery_tag attribute in the properties section of a celery message. Per the API section of the docs the delivery tag is an integer and is described as:

Note the delivery tag listed in the structure above; Within a connection channel,
every received message has a unique delivery tag, This tag is used to acknowledge
the message. Also note that delivery tags are not unique across connections, so
in another client the delivery tag 1 might point to a different message than in
this channel.

The 1 celery worker will read in many messages and if it receives two of the same values for delivery_tag before the first one has acked, the first one will not be acked by celery. Even if celery did ack it, many transports likely store the original message so it can be acked and likely track that by delivery_tag also.

The easiest thing to do is to have the message acking be tracked by uuid (I think). That change should be safe for all transports right?

@ask What do you recommend?