Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

varnishd: always shutdown both ends to a backend#4064

Merged
dridi merged 1 commit into
varnishcache:masterfrom
asadsa92:fin_wait2
Mar 1, 2024
Merged

varnishd: always shutdown both ends to a backend#4064
dridi merged 1 commit into
varnishcache:masterfrom
asadsa92:fin_wait2

Conversation

@asadsa92

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Asad Sajjad Ahmed <asadsa@varnish-software.com>

@nigoroll nigoroll left a comment

Copy link
Copy Markdown
Member

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

dridi commented Feb 28, 2024

Copy link
Copy Markdown
Member

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

dridi commented Feb 28, 2024

Copy link
Copy Markdown
Member

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
Copy Markdown
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

dridi commented Feb 28, 2024

Copy link
Copy Markdown
Member

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
Copy Markdown
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

dridi commented Mar 1, 2024

Copy link
Copy Markdown
Member

bugwash: merge

@dridi
dridi merged commit d92ca50 into varnishcache:master Mar 1, 2024
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.
nigoroll pushed a commit to cartoush/varnish-cache that referenced this pull request Jan 20, 2025
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants