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

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

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

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

mbgrydeland opened this issue Mar 31, 2017 · 2 comments
Assignees
Labels

Comments

@mbgrydeland
Copy link
Contributor

@mbgrydeland 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
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: varnishcache#2295
@mbgrydeland
Copy link
Contributor Author

@mbgrydeland mbgrydeland commented Mar 31, 2017

Ref #2296

hermunn added a commit that referenced this issue Apr 5, 2017
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
Copy link
Member

@hermunn 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.