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 deadlock in GraphiteWriter #6770

Merged
merged 1 commit into from Nov 13, 2018
Merged

Conversation

mcktr
Copy link
Member

@mcktr mcktr commented Nov 12, 2018

This fixes a deadlock in the GraphiteWriter feature, which is visible during the reload process. The reload thread waits for the GraphiteWriter to finish, but the GraphiteWriter can't finish because it's stuck in SendMetric() waiting for a lock which is hold by the reload thread.

Analysis: #6753 (comment)

fixes #6753

This fixes a deadlock in the GraphiteWriter feature, which is visible
during the reload process. The reload thread waits for the
GraphiteWriter to finish, but the GraphiteWriter can't finish because
it's stuck in `SendMetric()` waiting for a lock which is hold by the
reload thread.
@mcktr mcktr added the bug Something isn't working label Nov 12, 2018
@mcktr mcktr requested a review from dnsmichi November 12, 2018 19:38
@dnsmichi
Copy link
Contributor

Good catch. The ObjectLock isn't necessary here, since there's only one WQ thread active. Still, we may change the code in the future to allow multiple worker threads and as such, multiple connections.

@dnsmichi dnsmichi added this to the 2.10.2 milestone Nov 13, 2018
@dnsmichi dnsmichi merged commit 374dd91 into master Nov 13, 2018
@dnsmichi dnsmichi deleted the bugfix/graphitewriter-deadlock branch November 13, 2018 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Icinga2.service state is reloading in systemd after safe-reload until systemd time-out
2 participants