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

Spinning loop in VBE_Poll causes master to kill child on CLI timeout #2295

Closed
mbgrydeland opened this Issue Mar 31, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@mbgrydeland
Contributor

mbgrydeland commented Mar 31, 2017

In VBE_Poll() there is a loop that deletes old dynamic backends after a cooling period. This loop bugs out and becomes a kind of long running spinlock when the backend to be cleaned has a non-zero n_conn (due to very slow backend fetch). This causes the CLI thread to spin in a tight loop, possibly for a very long time, causing the master process to kill the child on CLI timeout.

PR and test case will follow.

@mbgrydeland mbgrydeland self-assigned this Mar 31, 2017

mbgrydeland added a commit to mbgrydeland/varnish-cache that referenced this issue Mar 31, 2017

Fix the spinlock loop in VBE_Poll
VBE_Poll would not advance to test the next backend on the cooling
list when the backend's n_conn is non-zero. This would create a
spinlock effect, causing delays that could make the master kill the
child because of CLI timeout.

Fixes: #2295
@mbgrydeland

This comment has been minimized.

Show comment
Hide comment
@mbgrydeland

mbgrydeland Mar 31, 2017

Contributor

Ref #2296

Contributor

mbgrydeland commented Mar 31, 2017

Ref #2296

hermunn added a commit that referenced this issue Apr 5, 2017

Fix the spinlock loop in VBE_Poll
VBE_Poll would not advance to test the next backend on the cooling
list when the backend's n_conn is non-zero. This would create a
spinlock effect, causing delays that could make the master kill the
child because of CLI timeout.

Fixes: #2295
@hermunn

This comment has been minimized.

Show comment
Hide comment
@hermunn

hermunn Apr 5, 2017

Contributor

In the corresponding pull request I wrote:

Backport review: 667256f backported as 04b4e38.

Contributor

hermunn commented Apr 5, 2017

In the corresponding pull request I wrote:

Backport review: 667256f backported as 04b4e38.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment