<!--

Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
Don't worry if they're not all applicable; just try to include what you can :-)

If you need to include code snippets or logs, please put them in fenced code
blocks.  If they're super-long, please use the details tag like
<details><summary>super-long log</summary> lots of stuff </details>

Please delete these comment blocks before submitting the issue.

-->

<!--

IMPORTANT!!!

PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!

PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!

Please complete the next sections or the issue will be closed.
These questions are the first thing we need to know to understand the context.

-->

**Apache Airflow version**: 2.1.0


**Kubernetes version (if you are using kubernetes)** (use `kubectl version`):

**Environment**:

- **Cloud provider or hardware configuration**:
- **OS** (e.g. from /etc/os-release): Ubuntu 18.04.5 LTS
- **Kernel** (e.g. `uname -a`): Linux 4.15.0-143-generic #147-Ubuntu SMP Wed Apr 14 16:10:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
- **Install tools**: pip
- **Others**:

**What happened**:
When a task get externally killed, it is marked as Failed even though it can be retried.

<!-- (please include exact error messages if you can) -->

**What you expected to happen**:
When a task get externally killed (kill -9 pid), it should put back to retry if it `retries` did not run out yet.

<!-- What do you think went wrong? -->

**How to reproduce it**:
I'm using Celery as executor and I have a cluster of ~250 machine.
I have a task that defined as next. When the task started to execute, and it get killed externally by sending SIGKILL to it (or to the executor process and it's children), it get marked as FAILED and doesn't put to retry (even though retries is set to 10 times)
```
import time

def _task1(ts_nodash, dag_run, ti, **context):
    time.sleep(300)

tasks = PythonOperator(
    task_id='task1',
    python_callable=_task1,
    retries=10,
    dag=dag1
)
```
<!---

As minimally and precisely as possible. Keep in mind we do not have access to your cluster or dags.

If you are using kubernetes, please attempt to recreate the issue using minikube or kind.

## Install minikube/kind

- Minikube https://minikube.sigs.k8s.io/docs/start/
- Kind https://kind.sigs.k8s.io/docs/user/quick-start/

If this is a UI bug, please provide a screenshot of the bug or a link to a youtube video of the bug in action

You can include images using the .md style of
![alt text](http://url/to/img.png)

To record a screencast, mac users can use QuickTime and then create an unlisted youtube video with the resulting .mov file.

--->


**Anything else we need to know**: This bug is introduced by [15537](https://github.com/apache/airflow/pull/15537/files#diff-d80fa918cc75c4d6aa582d5e29eeb812ba21371d6977fde45a4749668b79a515R159) as far as I know.

<img width="1069" alt="image" src="https://user-images.githubusercontent.com/2614168/120921545-7bedbe00-c6c4-11eb-8e7b-b4f5a7fc2292.png">

Next is the task log after sending SIGKILL to it.
```
[2021-06-06 18:50:07,897] {taskinstance.py:876} INFO - Dependencies all met for <TaskInstance: convert_manager.download_rtv_file 2021-06-06T11:26:37+00:00 [queued]>
[2021-06-06 18:50:07,916] {taskinstance.py:876} INFO - Dependencies all met for <TaskInstance: convert_manager.download_rtv_file 2021-06-06T11:26:37+00:00 [queued]>
[2021-06-06 18:50:07,918] {taskinstance.py:1067} INFO - 
--------------------------------------------------------------------------------
[2021-06-06 18:50:07,919] {taskinstance.py:1068} INFO - Starting attempt 6 of 16
[2021-06-06 18:50:07,921] {taskinstance.py:1069} INFO - 
--------------------------------------------------------------------------------
[2021-06-06 18:50:07,930] {taskinstance.py:1087} INFO - Executing <Task(PythonOperator): download_rtv_file> on 2021-06-06T11:26:37+00:00
[2021-06-06 18:50:07,937] {standard_task_runner.py:52} INFO - Started process 267 to run task
[2021-06-06 18:50:07,942] {standard_task_runner.py:76} INFO - Running: ['airflow', 'tasks', 'run', 'convert_manager', 'download_rtv_file', '2021-06-06T11:26:37+00:00', '--job-id', '75', '--pool', 'lane_xs', '--raw', '--subdir', 'DAGS_FOLDER/convert_manager.py', '--cfg-path', '/tmp/tmp35oxqliw', '--error-file', '/tmp/tmp3eme_cq7']
[2021-06-06 18:50:07,948] {standard_task_runner.py:77} INFO - Job 75: Subtask download_rtv_file
[2021-06-06 18:50:07,999] {logging_mixin.py:104} INFO - Running <TaskInstance: convert_manager.download_rtv_file 2021-06-06T11:26:37+00:00 [running]> on host 172.29.29.11
[2021-06-06 18:50:08,052] {taskinstance.py:1282} INFO - Exporting the following env vars:
AIRFLOW_CTX_DAG_OWNER=traffics
AIRFLOW_CTX_DAG_ID=convert_manager
AIRFLOW_CTX_TASK_ID=download_rtv_file
AIRFLOW_CTX_EXECUTION_DATE=2021-06-06T11:26:37+00:00
AIRFLOW_CTX_DAG_RUN_ID=dev_triggered_lane_31_itf-30_201208213_run_2021-06-06T13:26:37.135821+02:00
[2021-06-06 18:50:08,087] {convert_manager.py:377} INFO - downloading to /var/spool/central/airflow/data/ftp/***/ITF_RTV.xml.zip/rtv/ITF_RTV.xml.zip_20210606184921
[2021-06-06 18:50:08,094] {ftp.py:187} INFO - Retrieving file from FTP: /rtv/ITF_RTV.xml.zip
[2021-06-06 18:50:38,699] {local_task_job.py:151} INFO - Task exited with return code Negsignal.SIGKILL
```

<!--

How often does this problem occur? Once? Every time etc? Every time

Any relevant logs to include? Put them here in side a detail tag:
<details><summary>x.log</summary> lots of stuff </details>

-->

tests/models/test_taskinstance.py
run_date,
            expected_start_date,
            expected_end_date,
            expected_duration,
            expected_state,
            expected_try_number,
            expected_task_reschedule_count,
        ):
            with freeze_time(run_date):
                try:
                    ti.run()
                except AirflowException:
                    if not fail:
                        raise
            ti.refresh_from_db()
            assert ti.state == expected_state
            assert ti._try_number == expected_try_number
            assert ti.try_number == expected_try_number + 1
            assert ti.start_date == expected_start_date
            assert ti.end_date == expected_end_date
            assert ti.duration == expected_duration
            trs = TaskReschedule.find_for_task_instance(ti)
            assert len(trs) == expected_task_reschedule_count
        date1 = timezone.utcnow()
        done, fail = False, False