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

Improve process terminating in scheduler_job #8064

Merged
merged 2 commits into from
Apr 3, 2020

Conversation

mik-laj
Copy link
Member

@mik-laj mik-laj commented Apr 2, 2020

We cannot perform operation join because the process may already be terminated. To wait for the process to complete is the wait method.

This occurs when I send ctrl-c to the scheduler (running with MySQL backend)

File "/opt/airflow/airflow/utils/dag_processing.py", line 633, in _exit_gracefully
    self.terminate()
  File "/opt/airflow/airflow/utils/dag_processing.py", line 1206, in terminate
    processor.terminate()
  File "/opt/airflow/airflow/jobs/scheduler_job.py", line 222, in terminate
    self._process.join(5)
  File "/usr/local/lib/python3.6/multiprocessing/process.py", line 122, in join
    assert self._parent_pid == os.getpid(), 'can only join a child process'
AssertionError: can only join a child process

Issue link: WILL BE INSERTED BY boring-cyborg

Make sure to mark the boxes below before creating PR: [x]


In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.

@boring-cyborg boring-cyborg bot added the area:Scheduler including HA (high availability) scheduler label Apr 2, 2020
@mik-laj mik-laj changed the title Improve process terminating in scheduler_job [DONT-MERGE] Improve process terminating in scheduler_job Apr 2, 2020
@mik-laj mik-laj changed the title [DONT-MERGE] Improve process terminating in scheduler_job Improve process terminating in scheduler_job Apr 3, 2020
@mik-laj mik-laj merged commit 94480a7 into apache:master Apr 3, 2020
@muscovitebob
Copy link

Hey folks is there a linked issue here?

@mik-laj
Copy link
Member Author

mik-laj commented Jul 24, 2020

we do not have. I just got the error message that is in the PR description.

@muscovitebob
Copy link

Alright. We get this error quite often in running composer-1.10.4-airflow-1.10.6 with Python 3 out of the box, just trying to assemble some context on why this occurs, thanks!

@mik-laj
Copy link
Member Author

mik-laj commented Jul 24, 2020

@muscovitebob It is nothing important. You can ignore it. The Cloud Composer team is aware of this issue and even this has been fixed upon their request. This will be fixed in future Cloud Composer releases. I heard on Airflow Summit that 1.10.10 is to be released soon.

@swalkowski
Copy link
Contributor

I don't see this change in any of:

Is this intentional? Will it be included in 1.10.12 or a later version?

@mik-laj mik-laj added this to the Airflow 1.10.12 milestone Jul 31, 2020
@mik-laj
Copy link
Member Author

mik-laj commented Jul 31, 2020

@swalkowski It seems to me that this is just an oversight. I added these changes to the milestone for the next release.

kaxil pushed a commit that referenced this pull request Aug 14, 2020
kaxil pushed a commit that referenced this pull request Aug 15, 2020
kaxil pushed a commit that referenced this pull request Aug 15, 2020
cfei18 pushed a commit to cfei18/incubator-airflow that referenced this pull request Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Scheduler including HA (high availability) scheduler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants