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

varnishd: always shutdown both ends to a backend #4064

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

asadsa92
Copy link
Contributor

No description provided.

Copy link
Member

@nigoroll nigoroll left a comment

Choose a reason for hiding this comment

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

Looks like a good catch to me, but should we not handle the pfd as in vcp_handle() here?

  • call the close method, because otherwise we leak file descriptors
  • free the pfd, because otherwise we leak memory

@dridi
Copy link
Member

dridi commented Feb 28, 2024

Looks like a good catch to me, but should we not handle the pfd as in vcp_handle() here?

The loop below is waiting for waiters to notice the shutdown and call vcp_handle().

@dridi
Copy link
Member

dridi commented Feb 28, 2024

Actually on this topic, this sleeping loop is something we should move as a CLI hook, waiting asynchronously for connection pools to be freed before deleting them for good.

@nigoroll
Copy link
Member

The loop below is waiting for waiters to notice the shutdown and call vcp_handle().

Ah, this makes sense, thank you.

FWIW, @asadsa92 please add such explanations to the issue description or commit message. Leaving it to reviewers to figure out for themselves is no good use of their time.

this sleeping loop is something we should move as a CLI hook, waiting asynchronously for connection pools to be freed

yes.

@dridi
Copy link
Member

dridi commented Feb 28, 2024

this sleeping loop is something we should move as a CLI hook, waiting asynchronously for connection pools to be freed

yes.

I will follow up on that, I know someone who can work on this.

@asadsa92
Copy link
Contributor Author

FWIW, @asadsa92 please add such explanations to the issue description or commit message. Leaving it to reviewers to figure out for themselves is no good use of their time.

Sorry about that.
This is kind of the gist of the issue, once the read side of the socket is shutdown the waiter issues a notification which calls the vcp_handle to clean up. Not closing the read side result in no notification from the waiter.

@dridi
Copy link
Member

dridi commented Mar 1, 2024

bugwash: merge

@dridi dridi merged commit d92ca50 into varnishcache:master Mar 1, 2024
13 of 14 checks passed
cartoush added a commit to cartoush/varnish-cache that referenced this pull request Sep 25, 2024
Before, we would wait in a blocking loop for
connection pools to be freed before deleting
them for good.
This commit transforms this blocking loop into a
CLI hook that will delete the freed connection
pools at each trigger.

Refs varnishcache#4064
Better diff with the --ignore-all-space option.
cartoush added a commit to cartoush/varnish-cache that referenced this pull request Sep 25, 2024
Before, we would wait in a blocking loop for
connection pools to be freed before deleting
them for good.

This commit transforms this blocking loop into a
CLI hook that will delete the freed connection
pools at each trigger.

Refs varnishcache#4064

Better diff with the --ignore-all-space option.
cartoush added a commit to cartoush/varnish-cache that referenced this pull request Sep 27, 2024
Before, we would wait in a blocking loop for
connection pools to be freed before deleting
them for good.

This commit transforms this blocking loop into a
CLI hook that will delete the freed connection
pools at each trigger.

Refs varnishcache#4064

Better diff with the --ignore-all-space option.
cartoush added a commit to cartoush/varnish-cache that referenced this pull request Sep 27, 2024
Before, we would wait in a blocking loop for
connection pools to be freed before deleting
them for good.

This commit transforms this blocking loop into a
CLI hook that will delete the freed connection
pools at each trigger.

Refs varnishcache#4064

Better diff with the --ignore-all-space option.
cartoush added a commit to cartoush/varnish-cache that referenced this pull request Sep 27, 2024
Before, we would wait in a blocking loop for
connection pools to be freed before deleting
them for good.

This commit transforms this blocking loop into a
CLI hook that will delete the freed connection
pools at each trigger.

Refs varnishcache#4064

Better diff with the --ignore-all-space option.
cartoush added a commit to cartoush/varnish-cache that referenced this pull request Oct 2, 2024
Before, we would wait in a blocking loop for
connection pools to be freed before deleting
them for good.

This commit transforms this blocking loop into a
CLI hook that will delete the freed connection
pools at each trigger.

Refs varnishcache#4064

Better diff with the --ignore-all-space option.
cartoush added a commit to cartoush/varnish-cache that referenced this pull request Oct 2, 2024
Before, we would wait in a blocking loop for
connection pools to be freed before deleting
them for good.

This commit transforms this blocking loop into a
CLI hook that will delete the freed connection
pools at each trigger.

Refs varnishcache#4064

Better diff with the --ignore-all-space option.
cartoush added a commit to cartoush/varnish-cache that referenced this pull request Oct 2, 2024
Before, we would wait in a blocking loop for
connection pools to be freed before deleting
them for good.

This commit transforms this blocking loop into a
CLI hook that will delete the freed connection
pools at each trigger.

Refs varnishcache#4064

Better diff with the --ignore-all-space option.
cartoush added a commit to cartoush/varnish-cache that referenced this pull request Oct 2, 2024
Before, we would wait in a blocking loop for
connection pools to be freed before deleting
them for good.

This commit transforms this blocking loop into a
CLI hook that will delete the freed connection
pools at each trigger.

Refs varnishcache#4064

Better diff with the --ignore-all-space option.
cartoush added a commit to cartoush/varnish-cache that referenced this pull request Oct 3, 2024
Before, we would wait in a blocking loop for
connection pools to be freed before deleting
them for good.

This commit transforms this blocking loop into a
CLI hook that will delete the freed connection
pools at each trigger.

Refs varnishcache#4064

Better diff with the --ignore-all-space option.
cartoush added a commit to cartoush/varnish-cache that referenced this pull request Oct 11, 2024
Before, we would wait in a blocking loop for
connection pools to be freed before deleting
them for good.

This commit transforms this blocking loop into a
CLI hook that will delete the freed connection
pools at each trigger.

Refs varnishcache#4064

Better diff with the --ignore-all-space option.
cartoush added a commit to cartoush/varnish-cache that referenced this pull request Oct 14, 2024
Before, we would wait in a blocking loop for
connection pools to be freed before deleting
them for good.

This commit transforms this blocking loop into a
CLI hook that will delete the freed connection
pools at each trigger.

Refs varnishcache#4064

Better diff with the --ignore-all-space option.
cartoush added a commit to cartoush/varnish-cache that referenced this pull request Oct 15, 2024
Before, we would wait in a blocking loop for
connection pools to be freed before deleting
them for good.

This commit transforms this blocking loop into a
CLI hook that will delete the freed connection
pools at each trigger.

Refs varnishcache#4064

Better diff with the --ignore-all-space option.
cartoush added a commit to cartoush/varnish-cache that referenced this pull request Oct 16, 2024
Before, we would wait in a blocking loop for
connection pools to be freed before deleting
them for good.

This commit transforms this blocking loop into a
CLI hook that will delete the freed connection
pools at each trigger.

Refs varnishcache#4064

Better diff with the --ignore-all-space option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants