Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocalTaskJob heartbeat race condition with finishing task causing SIGTERM #16227

Closed
Prasnal opened this issue Jun 2, 2021 · 32 comments · Fixed by #16289
Closed

LocalTaskJob heartbeat race condition with finishing task causing SIGTERM #16227

Prasnal opened this issue Jun 2, 2021 · 32 comments · Fixed by #16289
Assignees
Labels
affected_version:2.0 Issues Reported for 2.0 kind:bug This is a clearly a bug priority:medium Bug that should be fixed before next release but would not block a release

Comments

@Prasnal
Copy link

Prasnal commented Jun 2, 2021

Apache Airflow version: 2.0.2

Environment:

  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release): Ubuntu 18.04.2 LTS
  • Kernel (e.g. uname -a): Linux datadumpprod2 4.15.0-54-generic Disabling backfill functionality? #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools: Docker

What happened:

After task execution is done but process isn't finished yet, heartbeat callback kills the process because falsely detects external change of state.

[2021-06-02 20:40:55,273] {{taskinstance.py:1532}} INFO - Marking task as FAILED. dag_id=<dag_id>, task_id=<task_id>, execution_date=20210602T104000, start_date=20210602T184050, end_date=20210602T184055
[2021-06-02 20:40:55,768] {{local_task_job.py:188}} WARNING - State of this instance has been externally set to failed. Terminating instance.
[2021-06-02 20:40:55,770] {{process_utils.py:100}} INFO - Sending Signals.SIGTERM to GPID 2055
[2021-06-02 20:40:55,770] {{taskinstance.py:1265}} ERROR - Received SIGTERM. Terminating subprocesses.
[2021-06-02 20:40:56,104] {{process_utils.py:66}} INFO - Process psutil.Process(pid=2055, status='terminated', exitcode=1, started='20:40:49') (2055) terminated with exit code 1

This happens more often when mini scheduler is enabled because in such case the window for race condition is bigger (time of execution mini scheduler).

What you expected to happen:

Heartbeat should allow task to finish and shouldn't kill it.

How to reproduce it:

As it's a race condition it happens randomly but to make it more often, you should have mini scheduler enabled and big enough database that execution of mini scheduler takes as long as possible. You can also reduce heartbeat interval to minimum.

@Prasnal Prasnal added the kind:bug This is a clearly a bug label Jun 2, 2021
@ephraimbuddy ephraimbuddy added the affected_version:2.0 Issues Reported for 2.0 label Jun 2, 2021
@millin
Copy link
Contributor

millin commented Jun 3, 2021

Hi everyone!

Looks like we are faced with a related issue.
After upgrading Airflow to 2.1.0 our sensors in reshedule mode started getting SIGTERM from previous poke, thats should be already finished, but really not finished yet.

Here my shortened debug logs of this:

[2021-05-31 15:00:57,133] {taskinstance.py:876} INFO - Dependencies all met for <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [queued]>
[2021-05-31 15:00:57,214] {taskinstance.py:876} INFO - Dependencies all met for <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [queued]>
[2021-05-31 15:00:57,214] {taskinstance.py:1067} INFO -
--------------------------------------------------------------------------------
[2021-05-31 15:00:57,214] {taskinstance.py:1068} INFO - Starting attempt 1 of 1
[2021-05-31 15:00:57,215] {taskinstance.py:1069} INFO -
--------------------------------------------------------------------------------
[2021-05-31 15:00:57,239] {taskinstance.py:1087} INFO - Executing <Task(ExternalTaskSensor): sensor__stg.orders> on 2021-05-31T11:45:00+00:00
[2021-05-31 15:00:57,245] {standard_task_runner.py:52} INFO - Started process 468 to run task
[2021-05-31 15:00:57,258] {standard_task_runner.py:76} INFO - Running: ['airflow', 'tasks', 'run', 'dds-15', 'sensor__stg.orders', '2021-05-31T11:45:00+00:00', '--job-id', '1252746', '--pool', 'stg_sensors_pool', '--raw', '--subdir', 'DAGS_FOLDER/stg-dds/dds.py', '--cfg-path', '/tmp/tmpob2wq8qo', '--error-file', '/tmp/tmpnk04mw7o']
[2021-05-31 15:00:57,261] {standard_task_runner.py:77} INFO - Job 1252746: Subtask sensor__stg.orders
[2021-05-31 15:00:57,267] {cli_action_loggers.py:66} DEBUG - Calling callbacks: [<function default_action_log at 0x7f25ac02a160>]
[2021-05-31 15:00:57,307] {settings.py:210} DEBUG - Setting up DB connection pool (PID 468)
[2021-05-31 15:00:57,308] {settings.py:246} DEBUG - settings.prepare_engine_args(): Using NullPool
[2021-05-31 15:00:57,318] {taskinstance.py:594} DEBUG - Refreshing TaskInstance <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [None]> from DB
[2021-05-31 15:00:57,418] {taskinstance.py:629} DEBUG - Refreshed TaskInstance <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [running]>
[2021-05-31 15:00:57,425] {logging_mixin.py:104} INFO - Running <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [running]> on host airflow-dwh-01
[2021-05-31 15:00:57,441] {taskinstance.py:594} DEBUG - Refreshing TaskInstance <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [running]> from DB
[2021-05-31 15:00:57,467] {taskinstance.py:629} DEBUG - Refreshed TaskInstance <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [running]>
[2021-05-31 15:00:57,580] {external_task.py:151} INFO - Poking for dwh-stg-15.marker_dds__orders on 2021-05-31T11:45:00+00:00 ...
[2021-05-31 15:00:57,809] {taskinstance.py:594} DEBUG - Refreshing TaskInstance <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [running]> from DB
[2021-05-31 15:00:57,830] {taskinstance.py:629} DEBUG - Refreshed TaskInstance <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [running]>
[2021-05-31 15:00:57,833] {taskinstance.py:1888} DEBUG - Task Duration set to 0.699986
[2021-05-31 15:00:57,860] {cli_action_loggers.py:84} DEBUG - Calling callbacks: []
[2021-05-31 15:00:57,860] {taskinstance.py:1464} INFO - Rescheduling task, marking task as UP_FOR_RESCHEDULE
[2021-05-31 15:00:57,877] {taskinstance.py:594} DEBUG - Refreshing TaskInstance <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [running]> from DB
[2021-05-31 15:00:57,877] {local_task_job.py:151} INFO - Task exited with return code 0

At this moment the process (PID 468) should have been finished, but as we see in below logs it continued to make heartbeats and kills next poke process:

[2021-05-31 15:01:21,365] {taskinstance.py:876} INFO - Dependencies all met for <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [queued]>
[2021-05-31 15:01:21,414] {taskinstance.py:876} INFO - Dependencies all met for <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [queued]>
[2021-05-31 15:01:21,414] {taskinstance.py:1067} INFO -
--------------------------------------------------------------------------------
[2021-05-31 15:01:21,415] {taskinstance.py:1068} INFO - Starting attempt 1 of 1
[2021-05-31 15:01:21,416] {taskinstance.py:1069} INFO -
--------------------------------------------------------------------------------
[2021-05-31 15:01:21,434] {taskinstance.py:1087} INFO - Executing <Task(ExternalTaskSensor): sensor__stg.orders> on 2021-05-31T11:45:00+00:00
[2021-05-31 15:01:21,455] {standard_task_runner.py:52} INFO - Started process 542 to run task
[2021-05-31 15:01:21,472] {standard_task_runner.py:76} INFO - Running: ['airflow', 'tasks', 'run', 'dds-15', 'sensor__stg.orders', '2021-05-31T11:45:00+00:00', '--job-id', '1252826', '--pool', 'stg_sensors_pool', '--raw', '--subdir', 'DAGS_FOLDER/stg-dds/dds.py', '--cfg-path', '/tmp/tmptax87gf8', '--error-file', '/tmp/tmpr0631j5m']
[2021-05-31 15:01:21,482] {standard_task_runner.py:77} INFO - Job 1252826: Subtask sensor__stg.orders
[2021-05-31 15:01:21,484] {cli_action_loggers.py:66} DEBUG - Calling callbacks: [<function default_action_log at 0x7f4751597160>]
[2021-05-31 15:01:26,521] {settings.py:210} DEBUG - Setting up DB connection pool (PID 542)
[2021-05-31 15:01:26,522] {settings.py:246} DEBUG - settings.prepare_engine_args(): Using NullPool
[2021-05-31 15:01:26,529] {taskinstance.py:594} DEBUG - Refreshing TaskInstance <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [None]> from DB
[2021-05-31 15:01:26,547] {taskinstance.py:594} DEBUG - Refreshing TaskInstance <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [running]> from DB
[2021-05-31 15:01:26,562] {taskinstance.py:629} DEBUG - Refreshed TaskInstance <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [running]>
[2021-05-31 15:01:26,568] {logging_mixin.py:104} INFO - Running <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [running]> on host airflow-dwh-02
[2021-05-31 15:01:26,572] {taskinstance.py:594} DEBUG - Refreshing TaskInstance <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [running]> from DB
[2021-05-31 15:01:26,573] {taskinstance.py:629} DEBUG - Refreshed TaskInstance <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [running]>
[2021-05-31 15:01:26,587] {local_task_job.py:193} WARNING - Recorded pid 468 does not match the current pid 542
[2021-05-31 15:01:26,592] {taskinstance.py:629} DEBUG - Refreshed TaskInstance <TaskInstance: dds-15.sensor__stg.orders 2021-05-31T11:45:00+00:00 [running]>
[2021-05-31 15:01:26,596] {process_utils.py:100} INFO - Sending Signals.SIGTERM to GPID 542
[2021-05-31 15:01:26,613] {process_utils.py:66} INFO - Process psutil.Process(pid=542, status='terminated', exitcode=<Negsignal.SIGTERM: -15>, started='15:01:20') (542) terminated with exit code Negsignal.SIGTERM

I found that this bug began to affect our sensors after fixing incorrect validation of recorded pid by commit 817b599.

@millin
Copy link
Contributor

millin commented Jun 3, 2021

Additionally I found that the first process successfully recorded Refreshing TaskInstance message from TaskInstance.refresh_from_db, but not recorded Refreshed TaskInstance message.
It looks like hangs on some DB lock

@jedcunningham
Copy link
Member

Another report of the same issue:
#14672 (comment)

@Prasnal
Copy link
Author

Prasnal commented Jun 3, 2021

For me, it happens also when status is failed and with mini scheduler turned off (but less often)

@ephraimbuddy
Copy link
Contributor

ephraimbuddy commented Jun 3, 2021

I'm able to replicate this consistently with this dag:

import time

from airflow import models
from airflow.operators.python import PythonOperator
from datetime import datetime, timedelta

default_args = {
    "owner": "airflow",
    "start_date": datetime(2021, 1, 31),
}

dag_name = "dag_timeout_test"


def mycallable():
    time.sleep(62)


with models.DAG(
    dag_name,
    default_args=default_args,
    schedule_interval=None,
    dagrun_timeout=timedelta(minutes=1)
) as dag:

    test2 = PythonOperator(
        task_id="timeout",
        python_callable=mycallable,
    )

The reason is that task instance and task runner runs on the same process. I'm taking a look

@ephraimbuddy ephraimbuddy self-assigned this Jun 4, 2021
@ephraimbuddy
Copy link
Contributor

ephraimbuddy commented Jun 4, 2021

@Prasnal @millin I have been able to reproduce this only when I have dagrun_timeout set and the dag_run times out.

Let me know if you also set dagrun_timeout in your dags.

My case is caused by these lines:

unfinished_task_instances = (
session.query(TI)
.filter(TI.dag_id == dag_run.dag_id)
.filter(TI.execution_date == dag_run.execution_date)
.filter(TI.state.in_(State.unfinished))
)
for task_instance in unfinished_task_instances:
task_instance.state = State.SKIPPED
session.merge(task_instance)
session.flush()

When the skipped state is set, the local task job sees this as being externally set and terminates the task runner.

@millin
Copy link
Contributor

millin commented Jun 4, 2021

@ephraimbuddy I have no dagrun_timeout

@Prasnal
Copy link
Author

Prasnal commented Jun 4, 2021

I don't have it as well

@kaxil kaxil added the priority:medium Bug that should be fixed before next release but would not block a release label Jun 4, 2021
@kaxil
Copy link
Member

kaxil commented Jun 4, 2021

Workaround for now would be to set AIRFLOW__SCHEDULER__SCHEDULE_AFTER_TASK_EXECUTION to False

https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#schedule-after-task-execution

@millin
Copy link
Contributor

millin commented Jun 4, 2021

@kaxil AIRFLOW__SCHEDULER__SCHEDULE_AFTER_TASK_EXECUTION didn't help in my case

@Prasnal
Copy link
Author

Prasnal commented Jun 4, 2021

In my case - it just reduced amount of errors

@kaxil
Copy link
Member

kaxil commented Jun 4, 2021

Whoops, in that case it needs more investigation, I thought I read somewhere in this issue that it was caused by mini-scheduling

@mwaaas
Copy link

mwaaas commented Aug 3, 2021

I see the issue has been closed, but am still experiencing the issue

@uranusjr
Copy link
Member

uranusjr commented Aug 3, 2021

The fix that resolved this issue has not been released yet.

@mwaaas
Copy link

mwaaas commented Aug 3, 2021

ahh, Okay I have seen it has been merged to be deployed in 2.1.3
let me try this work rount
AIRFLOW__SCHEDULER__SCHEDULE_AFTER_TASK_EXECUTION

@mwaaas
Copy link

mwaaas commented Aug 3, 2021

the workround is not working for me, I will just wait for the fix

@ephraimbuddy
Copy link
Contributor

the workround is not working for me, I will just wait for the fix

Yeah. The fix for this is not really the setting, as it turned out. It is fixed in #16301 along with other issues and would be released in 2.1.3.
If you can't wait for 2..1.3 then you will have to modify your deployed code and add self.terminating=True in handle_task_exit method of LocalTaskJob: airflow/jobs/local_task_job.py. It should be top level in handle_task_exit see #16301

@mwaaas
Copy link

mwaaas commented Aug 3, 2021

I have changed to use the latest image that has those changes
ghcr.io/apache/airflow-main-python3.9-v2:ff75cbcac9ec0b1992b4fddd6c160901f23e0c2a

but am still seeing the error

[2021-08-03 09:45:44,395] {local_task_job.py:187} WARNING - State of this instance has been externally set to removed. Terminating instance.
[2021-08-03 09:45:44,396] {process_utils.py:100} INFO - Sending Signals.SIGTERM to GPID 1694
[2021-08-03 09:45:44,397] {taskinstance.py:1239} ERROR - Received SIGTERM. Terminating subprocesses.

@ephraimbuddy
Copy link
Contributor

Can I see your dag?

@mwaaas
Copy link

mwaaas commented Aug 3, 2021

It's a private code, the gist of the logic
there is a table that contains information that I need to publish.

My dag gets records that have not been published and creates a dynamic task to publish.

the publish task ( this task takes time to run up to 30min)

that task is the one that keeps on failing.

@ephraimbuddy
Copy link
Contributor

@mwaaas Why is the log showing {local_task_job.py:187} instead of line 203 if it contains this change #16301?

@mwaaas
Copy link

mwaaas commented Aug 3, 2021

was using this image ghcr.io/apache/airflow-main-python3.9-v2:ff75cbcac9ec0b1992b4fddd6c160901f23e0c2a
which I saw its being build from main branch

@ephraimbuddy
Copy link
Contributor

Yeah, checking the image it has the change. In your dag, how does the task state change to removed?

@ephraimbuddy
Copy link
Contributor

I will also simulate this: the publish task ( this task takes time to run up to 30min)

@mwaaas
Copy link

mwaaas commented Aug 3, 2021

Yeah, checking the image it has the change. In your dag, how does the task state change to removed?

Not sure how the task change to removed.

I have added this config AIRFLOW__CORE__KILLED_TASK_CLEANUP_TIME: 3600 so that the task will wait until its finished before being terminated.

@ephraimbuddy
Copy link
Contributor

You can check the scheduler log when this happens, probably the task went missing and was removed somewhere. That happened externally and I think it might not be related to this heartbeat issue

@mwaaas
Copy link

mwaaas commented Aug 3, 2021

Yes from the scheduler logs, I was seeing logs saying cannot find the task.

Why would the task go missing but its still processing.

@ephraimbuddy
Copy link
Contributor

You can create an issue with a simple dag to reproduce the issue. That way we will figure it out

@ghost
Copy link

ghost commented Jan 20, 2022

Hey @ephraimbuddy we are facing this issue with airflow version 2.2.3 for every single DAG.

Error screenshot as below

Screenshot 2022-01-20 at 9 22 35 PM

@ephraimbuddy
Copy link
Contributor

@vinit-tribes You should have pasted the whole logs.
Yours seem related to a different issue. "Recorded pid does not match current pid".
If you are using run_as_user in your dag, you need to set it up properly following documentation.

@ghost
Copy link

ghost commented Jan 21, 2022

Thanks @ephraimbuddy for the response, now no we aren't using run_as_user and we already tested with what's suggested in above documentation after seeing your previous comment on this comment i.e. adding airflow ALL=(ALL) NOPASSWD: ALL to sudoers file but without any luck :(

Pasting full error log below

*** Reading remote log from gs://dev_etl_airflow_logs/Test_indexes_and_constraints/wait_for_a_minute/2022-01-20T15:56:40.994067+00:00/2.log.
*** Previous log discarded: 404 GET https://storage.googleapis.com/download/storage/v1/b/dev_etl_airflow_logs/o/Test_indexes_and_constraints%2Fwait_for_a_minute%2F2022-01-20T15%3A56%3A40.994067%2B00%3A00%2F2.log?alt=media: No such object: dev_etl_airflow_logs/Test_indexes_and_constraints/wait_for_a_minute/2022-01-20T15:56:40.994067+00:00/2.log: ('Request failed with status code', 404, 'Expected one of', <HTTPStatus.OK: 200>, <HTTPStatus.PARTIAL_CONTENT: 206>)

[2022-01-20, 15:57:15 UTC] {taskinstance.py:1032} INFO - Dependencies all met for <TaskInstance: Test_indexes_and_constraints.wait_for_a_minute manual__2022-01-20T15:56:40.994067+00:00 [queued]>
[2022-01-20, 15:57:15 UTC] {taskinstance.py:1032} INFO - Dependencies all met for <TaskInstance: Test_indexes_and_constraints.wait_for_a_minute manual__2022-01-20T15:56:40.994067+00:00 [queued]>
[2022-01-20, 15:57:15 UTC] {taskinstance.py:1238} INFO - 
--------------------------------------------------------------------------------
[2022-01-20, 15:57:15 UTC] {taskinstance.py:1239} INFO - Starting attempt 2 of 2
[2022-01-20, 15:57:15 UTC] {taskinstance.py:1240} INFO - 
--------------------------------------------------------------------------------
[2022-01-20, 15:57:15 UTC] {taskinstance.py:1259} INFO - Executing <Task(PythonOperator): wait_for_a_minute> on 2022-01-20 15:56:40.994067+00:00
[2022-01-20, 15:57:15 UTC] {base_task_runner.py:136} INFO - Running on host: dev-airflow
[2022-01-20, 15:57:15 UTC] {base_task_runner.py:137} INFO - Running: ['airflow', 'tasks', 'run', 'Test_indexes_and_constraints', 'wait_for_a_minute', 'manual__2022-01-20T15:56:40.994067+00:00', '--job-id', '129997', '--raw', '--subdir', 'DAGS_FOLDER/test_ind_const.py', '--cfg-path', '/tmp/tmpon04h4a3', '--error-file', '/tmp/tmp13o8vd12']
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361: DeprecationWarning: The logging_level option in [core] has been moved to the logging_level option in [logging] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   option = self._get_option_from_config_file(deprecated_key, deprecated_section, key, kwargs, section)
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361: DeprecationWarning: The fab_logging_level option in [core] has been moved to the fab_logging_level option in [logging] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   option = self._get_option_from_config_file(deprecated_key, deprecated_section, key, kwargs, section)
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:303: FutureWarning: The hostname_callable setting in [core] has the old default value of 'socket:getfqdn'. This value has been changed to 'socket.getfqdn' in the running config, but please update your config before Apache Airflow 2.1.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   FutureWarning,
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:303: FutureWarning: The navbar_color setting in [webserver] has the old default value of '#007A87'. This value has been changed to '#fff' in the running config, but please update your config before Apache Airflow 2.1.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   FutureWarning,
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361: DeprecationWarning: The log_format option in [core] has been moved to the log_format option in [logging] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   option = self._get_option_from_config_file(deprecated_key, deprecated_section, key, kwargs, section)
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361: DeprecationWarning: The simple_log_format option in [core] has been moved to the simple_log_format option in [logging] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   option = self._get_option_from_config_file(deprecated_key, deprecated_section, key, kwargs, section)
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361 DeprecationWarning: The hide_sensitive_variable_fields option in [admin] has been moved to the hide_sensitive_var_conn_fields option in [core] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361 DeprecationWarning: The logging_config_class option in [core] has been moved to the logging_config_class option in [logging] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361 DeprecationWarning: The colored_log_format option in [core] has been moved to the colored_log_format option in [logging] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361 DeprecationWarning: The colored_console_log option in [core] has been moved to the colored_console_log option in [logging] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361 DeprecationWarning: The colored_formatter_class option in [core] has been moved to the colored_formatter_class option in [logging] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361 DeprecationWarning: The base_log_folder option in [core] has been moved to the base_log_folder option in [logging] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361 DeprecationWarning: The dag_processor_manager_log_location option in [core] has been moved to the dag_processor_manager_log_location option in [logging] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361 DeprecationWarning: The log_filename_template option in [core] has been moved to the log_filename_template option in [logging] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361 DeprecationWarning: The log_processor_filename_template option in [core] has been moved to the log_processor_filename_template option in [logging] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361 DeprecationWarning: The remote_logging option in [core] has been moved to the remote_logging option in [logging] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361 DeprecationWarning: The remote_base_log_folder option in [core] has been moved to the remote_base_log_folder option in [logging] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361 DeprecationWarning: The task_log_reader option in [core] has been moved to the task_log_reader option in [logging] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:16 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361 DeprecationWarning: The default_queue option in [celery] has been moved to the default_queue option in [operators] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:17 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361 DeprecationWarning: The statsd_on option in [scheduler] has been moved to the statsd_on option in [metrics] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:17 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361 DeprecationWarning: The default_queue option in [celery] has been moved to the default_queue option in [operators] - the old setting has been used, but please update your config.
[2022-01-20, 15:57:17 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361 DeprecationWarning: The dag_concurrency option in [core] has been renamed to max_active_tasks_per_dag - the old setting has been used, but please update your config.
[2022-01-20, 15:57:17 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute /srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/configuration.py:361 DeprecationWarning: The processor_poll_interval option in [scheduler] has been renamed to scheduler_idle_sleep_time - the old setting has been used, but please update your config.
[2022-01-20, 15:57:17 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute [�[34m2022-01-20, 15:57:17 UTC�[0m] {�[34mdagbag.py:�[0m500} INFO�[0m - Filling up the DagBag from /home/airflow/airflow-dags-compiled/dags/test_ind_const.py�[0m
[2022-01-20, 15:57:20 UTC] {local_task_job.py:207} WARNING - Recorded pid 3944469 does not match the current pid 3944473
[2022-01-20, 15:57:20 UTC] {process_utils.py:124} INFO - Sending Signals.SIGTERM to group 3944473. PIDs of all processes in the group: [3944473]
[2022-01-20, 15:57:20 UTC] {process_utils.py:75} INFO - Sending the signal Signals.SIGTERM to group 3944473
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute Running <TaskInstance: Test_indexes_and_constraints.wait_for_a_minute manual__2022-01-20T15:56:40.994067+00:00 [running]> on host dev-airflow
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute Traceback (most recent call last):
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   File "/srv/airflow_venv2.2.3/bin/airflow", line 8, in <module>
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute     sys.exit(main())
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   File "/srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/__main__.py", line 48, in main
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute     args.func(args)
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   File "/srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/cli/cli_parser.py", line 48, in command
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute     return func(*args, **kwargs)
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   File "/srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/utils/cli.py", line 92, in wrapper
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute     return f(*args, **kwargs)
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   File "/srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/cli/commands/task_command.py", line 298, in task_run
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute     _run_task_by_selected_method(args, dag, ti)
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   File "/srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/cli/commands/task_command.py", line 107, in _run_task_by_selected_method
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute     _run_raw_task(args, ti)
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   File "/srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/cli/commands/task_command.py", line 184, in _run_raw_task
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute     error_file=args.error_file,
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   File "/srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/utils/session.py", line 70, in wrapper
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute     return func(*args, session=session, **kwargs)
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   File "/srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 1329, in _run_raw_task
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute     self._execute_task_with_callbacks(context)
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   File "/srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 1455, in _execute_task_with_callbacks
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute     result = self._execute_task(context, self.task)
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   File "/srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 1511, in _execute_task
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute     result = execute_callable(context=context)
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   File "/srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/operators/python.py", line 174, in execute
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute     return_value = self.execute_callable()
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   File "/srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/operators/python.py", line 185, in execute_callable
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute     return self.python_callable(*self.op_args, **self.op_kwargs)
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   File "/home/airflow/airflow-dags-compiled/dags/python_callables/neo4j_extraction_helper.py", line 105, in short_break
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute     sleep(60) 
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute   File "/srv/airflow_venv2.2.3/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 1410, in signal_handler
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute     raise AirflowException("Task received SIGTERM signal")
[2022-01-20, 15:57:20 UTC] {base_task_runner.py:121} INFO - Job 129997: Subtask wait_for_a_minute airflow.exceptions.AirflowException: Task received SIGTERM signal
[2022-01-20, 15:57:21 UTC] {process_utils.py:70} INFO - Process psutil.Process(pid=3944473, status='terminated', exitcode=1, started='15:57:15') (3944473) terminated with exit code 1

@ghost
Copy link

ghost commented Jan 21, 2022

Also @ephraimbuddy have created a new bug as well at #20992

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected_version:2.0 Issues Reported for 2.0 kind:bug This is a clearly a bug priority:medium Bug that should be fixed before next release but would not block a release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants