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

Fix issue with Gradle daemons hanging indefinitely on shutdown #44867

Merged
merged 3 commits into from
Jul 25, 2019

Conversation

mark-vieira
Copy link
Contributor

@mark-vieira mark-vieira commented Jul 25, 2019

This PR fixes and issue folks were reporting where Gradle daemons would be hung, such that the processes were still running but commands like gradle --stop didn't report them as running. The issue was were were inadvertently registering a shutdown hook that never completes. This caused the daemon on shutdown to unregister itself from the daemon registry (so it would never be reused) but the JVM would never actually exit.

@mark-vieira mark-vieira added the :Delivery/Build Build or test infrastructure label Jul 25, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

clustersToWatch.removeAll(clustersToWatch);
}
public synchronized void unWatch(Collection<ElasticsearchCluster> cluster) {
clustersToWatch.removeAll(clustersToWatch);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be clustersToWatch.removeAll(cluster)? (note, the name cluster shoudl really be plural since it is a collection?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Looks like we were never actually registering this clusters to be watched.

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mark-vieira mark-vieira merged commit 016f98c into elastic:master Jul 25, 2019
@mark-vieira mark-vieira deleted the hung-daemon-fix branch July 25, 2019 19:44
mark-vieira added a commit to mark-vieira/elasticsearch that referenced this pull request Jul 25, 2019
mark-vieira added a commit to mark-vieira/elasticsearch that referenced this pull request Jul 25, 2019
polyfractal pushed a commit to polyfractal/elasticsearch that referenced this pull request Jul 29, 2019
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team v7.3.1 v7.4.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants