ephraimbuddy commented on issue #16023:
URL: https://github.com/apache/airflow/issues/16023#issuecomment-902998077


   I ran the above provided DAG in LocalExecutor. Before I ran it, I did 
`airflow db reset`.
   The first 16 tasks were successful but the next 17 tasks failed. 
   In scheduler log, I found the following:
   ```
   [2021-08-20 21:31:41,056] {dagrun.py:431} ERROR - 
Marking run <DagRun long_running_pyoperator @ 2021-06-04 
00:00:00+00:00: scheduled__2021-06-04T00:00:00+00:00, externally triggered: 
False> failed
   [2021-08-20 21:31:41,144] {scheduler_job.py:1143} INFO 
- Resetting orphaned tasks for active dag runs
   [2021-08-20 21:31:41,152] {scheduler_job.py:1165} INFO 
- Marked 17 SchedulerJob instances as failed
   [2021-08-20 21:31:41,177] {scheduler_job.py:1209} INFO 
- Reset the following 10 orphaned TaskInstances:
        <TaskInstance: long_running_pyoperator.sleep_well 2021-05-27 
00:00:00+00:00 [running]>
        <TaskInstance: long_running_pyoperator.sleep_well 2021-05-28 
00:00:00+00:00 [running]>
        <TaskInstance: long_running_pyoperator.sleep_well 2021-06-02 
00:00:00+00:00 [running]>
        <TaskInstance: long_running_pyoperator.sleep_well 2021-06-03 
00:00:00+00:00 [running]>
        <TaskInstance: long_running_pyoperator.sleep_well 2021-06-06 
00:00:00+00:00 [running]>
        <TaskInstance: long_running_pyoperator.sleep_well 2021-06-07 
00:00:00+00:00 [running]>
        <TaskInstance: long_running_pyoperator.sleep_well 2021-06-08 
00:00:00+00:00 [running]>
        <TaskInstance: long_running_pyoperator.sleep_well 2021-06-09 
00:00:00+00:00 [running]>
        <TaskInstance: long_running_pyoperator.sleep_well 2021-06-10 
00:00:00+00:00 [running]>
        <TaskInstance: long_running_pyoperator.sleep_well 2021-06-11 
00:00:00+00:00 [running]>
   [2021-08-20 21:31:42,225] {dag.py:2691} INFO - Setting 
next_dagrun for long_running_pyoperator to 
2021-06-13T00:00:00+00:00
   [2021-08-20 21:31:42,307] {dagrun.py:431} ERROR - 
Marking run <DagRun long_running_pyoperator @ 2021-06-06 
00:00:00+00:00: scheduled__2021-06-06T00:00:00+00:00, externally triggered: 
False> failed
   [2021-08-20 21:31:42,324] {dagrun.py:431} ERROR - 
Marking run <DagRun long_running_pyoperator @ 2021-06-07 
00:00:00+00:00: scheduled__2021-06-07T00:00:00+00:00, externally triggered: 
False> failed
   [2021-08-20 21:31:42,333] {dagrun.py:431} ERROR - 
Marking run <DagRun long_running_pyoperator @ 2021-06-08 
00:00:00+00:00: scheduled__2021-06-08T00:00:00+00:00, externally triggered: 
False> failed
   [2021-08-20 21:31:42,352] {dagrun.py:431} ERROR - 
Marking run <DagRun long_running_pyoperator @ 2021-06-09 
00:00:00+00:00: scheduled__2021-06-09T00:00:00+00:00, externally triggered: 
False> failed
   [2021-08-20 21:31:42,374] {dagrun.py:431} ERROR - 
Marking run <DagRun long_running_pyoperator @ 2021-06-10 
00:00:00+00:00: scheduled__2021-06-10T00:00:00+00:00, externally triggered: 
False> failed
   [2021-08-20 21:31:42,383] {dagrun.py:431} ERROR - 
Marking run <DagRun long_running_pyoperator @ 2021-06-11 
00:00:00+00:00: scheduled__2021-06-11T00:00:00+00:00, externally triggered: 
False> failed
   [2021-08-20 21:31:42,400] {dagrun.py:431} ERROR - 
Marking run <DagRun long_running_pyoperator @ 2021-05-27 
00:00:00+00:00: scheduled__2021-05-27T00:00:00+00:00, externally triggered: 
False> failed
   [2021-08-20 21:31:42,422] {dagrun.py:431} ERROR - 
Marking run <DagRun long_running_pyoperator @ 2021-05-28 
00:00:00+00:00: scheduled__2021-05-28T00:00:00+00:00, externally triggered: 
False> failed
   [2021-08-20 21:31:42,429] {dagrun.py:431} ERROR - 
Marking run <DagRun long_running_pyoperator @ 2021-05-29 
00:00:00+00:00: scheduled__2021-05-29T00:00:00+00:00, externally triggered: 
False> failed
   [2021-08-20 21:31:42,443] {dagrun.py:431} ERROR - 
Marking run <DagRun long_running_pyoperator @ 2021-05-30 
00:00:00+00:00: scheduled__2021-05-30T00:00:00+00:00, externally triggered: 
False> failed
   [2021-08-20 21:31:42,463] {dagrun.py:431} ERROR - 
Marking run <DagRun long_running_pyoperator @ 2021-05-31 
00:00:00+00:00: scheduled__2021-05-31T00:00:00+00:00, externally triggered: 
False> failed
   [2021-08-20 21:31:42,484] {dagrun.py:431} ERROR - 
Marking run <DagRun long_running_pyoperator @ 2021-06-01 
00:00:00+00:00: scheduled__2021-06-01T00:00:00+00:00, externally triggered: 
False> failed
   [2021-08-20 21:31:42,503] {dagrun.py:431} ERROR - 
Marking run <DagRun long_running_pyoperator @ 2021-06-02 
00:00:00+00:00: scheduled__2021-06-02T00:00:00+00:00, externally triggered: 
False> failed
   [2021-08-20 21:31:42,511] {dagrun.py:431} ERROR - 
Marking run <DagRun long_running_pyoperator @ 2021-06-03 
00:00:00+00:00: scheduled__2021-06-03T00:00:00+00:00, externally triggered: 
False> failed
   [2021-08-20 21:31:42,519] {dagrun.py:431} ERROR - 
Marking run <DagRun long_running_pyoperator @ 2021-06-05 
00:00:00+00:00: scheduled__2021-06-05T00:00:00+00:00, externally triggered: 
False> failed
   ```
   In the scheduler tasks log for dag processing, I found the following:
   
   ```log
   [2021-08-20 21:31:41,007] {processor.py:618} INFO - DAG(s) 
dict_keys(['long_running_pyoperator']) retrieved from 
/files/dags/long_running_pyoperator.py
   [2021-08-20 21:31:41,051] {processor.py:575} INFO - Executed failure 
callback for <TaskInstance: long_running_pyoperator.sleep_well 2021-06-04 
00:00:00+00:00 [failed]> in state failed
   [2021-08-20 21:31:41,082] {processor.py:575} INFO - Executed failure 
callback for <TaskInstance: long_running_pyoperator.sleep_well 2021-05-29 
00:00:00+00:00 [failed]> in state failed
   [2021-08-20 21:31:41,097] {processor.py:575} INFO - Executed failure 
callback for <TaskInstance: long_running_pyoperator.sleep_well 2021-06-05 
00:00:00+00:00 [failed]> in state failed
   [2021-08-20 21:31:41,116] {processor.py:575} INFO - Executed failure 
callback for <TaskInstance: long_running_pyoperator.sleep_well 2021-05-30 
00:00:00+00:00 [failed]> in state failed
   [2021-08-20 21:31:41,139] {processor.py:575} INFO - Executed failure 
callback for <TaskInstance: long_running_pyoperator.sleep_well 2021-06-01 
00:00:00+00:00 [failed]> in state failed
   [2021-08-20 21:31:41,164] {processor.py:575} INFO - Executed failure 
callback for <TaskInstance: long_running_pyoperator.sleep_well 2021-05-31 
00:00:00+00:00 [failed]> in state failed
   [2021-08-20 21:31:41,189] {processor.py:575} INFO - Executed failure 
callback for <TaskInstance: long_running_pyoperator.sleep_well 2021-05-28 
00:00:00+00:00 [failed]> in state failed
   [2021-08-20 21:31:41,201] {processor.py:575} INFO - Executed failure 
callback for <TaskInstance: long_running_pyoperator.sleep_well 2021-06-03 
00:00:00+00:00 [failed]> in state failed
   [2021-08-20 21:31:41,212] {processor.py:575} INFO - Executed failure 
callback for <TaskInstance: long_running_pyoperator.sleep_well 2021-05-27 
00:00:00+00:00 [failed]> in state failed
   [2021-08-20 21:31:41,224] {processor.py:575} INFO - Executed failure 
callback for <TaskInstance: long_running_pyoperator.sleep_well 2021-06-02 
00:00:00+00:00 [failed]> in state failed
   [2021-08-20 21:31:41,236] {processor.py:575} INFO - Executed failure 
callback for <TaskInstance: long_running_pyoperator.sleep_well 2021-06-09 
00:00:00+00:00 [failed]> in state failed
   [2021-08-20 21:31:41,246] {processor.py:575} INFO - Executed failure 
callback for <TaskInstance: long_running_pyoperator.sleep_well 2021-06-11 
00:00:00+00:00 [failed]> in state failed
   [2021-08-20 21:31:41,255] {processor.py:575} INFO - Executed failure 
callback for <TaskInstance: long_running_pyoperator.sleep_well 2021-06-07 
00:00:00+00:00 [failed]> in state failed
   [2021-08-20 21:31:41,265] {processor.py:575} INFO - Executed failure 
callback for <TaskInstance: long_running_pyoperator.sleep_well 2021-06-08 
00:00:00+00:00 [failed]> in state failed
   [2021-08-20 21:31:41,276] {processor.py:575} INFO - Executed failure 
callback for <TaskInstance: long_running_pyoperator.sleep_well 2021-06-10 
00:00:00+00:00 [failed]> in state failed
   [2021-08-20 21:31:41,285] {processor.py:575} INFO - Executed failure 
callback for <TaskInstance: long_running_pyoperator.sleep_well 2021-06-06 
00:00:00+00:00 [failed]> in state failed
   ```
   That could be as a result of the schedulerJob being marked as failed.
   
   Then the task log:
   ```log
   [2021-08-20, 21:31:46 UTC] {local_task_job.py:209} WARNING - State of this 
instance has been externally set to failed. Terminating instance.
   [2021-08-20, 21:31:46 UTC] {process_utils.py:100} INFO - Sending 
Signals.SIGTERM to GPID 5738
   [2021-08-20, 21:31:46 UTC] {taskinstance.py:1369} ERROR - Received SIGTERM. 
Terminating subprocesses.
   [2021-08-20, 21:31:46 UTC] {process_utils.py:66} INFO - Process 
psutil.Process(pid=5738, status='terminated', exitcode=0, started='21:24:33') 
(5738) terminated with exit code 0
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to