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

one minute delay on return (pipe) and a POST-Request #1806

Closed
bsdphk opened this issue Mar 4, 2016 · 11 comments
Closed

one minute delay on return (pipe) and a POST-Request #1806

bsdphk opened this issue Mar 4, 2016 · 11 comments

Comments

@bsdphk
Copy link
Contributor

bsdphk commented Mar 4, 2016

Old ticket imported from Trac
See archived copy here: https://varnish-cache.org/trac/ticket/1806

@daghf
Copy link
Member

daghf commented Mar 11, 2016

I looked into this.

The issue seems to be that for return (pipe) we don't pass the request body. For pipe this is deferred until we do V1P_Process. This is fine for piped connections where we use a fresh backend connection, but when we get a recycled connection (state == STOLEN) we do VBT_Wait and go on the waiter first.

Thus the backend receives a request indicating a req body and waits around for that. At the same time the vbc is on the waiter expecting data from the backend, and we end up in a deadlock situation until timeout.

A fix could be to always force a fresh backend connection for piped requests (thereby avoiding the waiter), but there might be a more elegant solution?

@Krapulat
Copy link

+1

@fgsch
Copy link
Member

fgsch commented Mar 12, 2016

Related to #1772.

daghf added a commit to daghf/varnish-cache that referenced this issue Mar 14, 2016
Fixes a bug where we went on the waiter prior to passing the request
body.

The VBT_Wait call is now handled in vbe_dir_finish.

Test case by thomaslc

Fixes: varnishcache#1806
daghf added a commit to daghf/varnish-cache that referenced this issue Mar 15, 2016
Fixes a bug where we went on the waiter prior to passing the request
body.

The VBT_Wait call is now handled in vbe_dir_finish.

Test case by thomaslc

Fixes: varnishcache#1806
@daghf daghf closed this as completed in 76777c8 Mar 18, 2016
hermunn pushed a commit to hermunn/varnish-cache that referenced this issue May 2, 2016
Fixes a bug where we wait for an event to fire on the backend socket
prior to passing the request body.

The VBT_Wait call is now handled in vbe_dir_finish.

Test case by thomaslc

Fixes: varnishcache#1806
hermunn pushed a commit that referenced this issue May 2, 2016
Fixes a bug where we wait for an event to fire on the backend socket
prior to passing the request body.

The VBT_Wait call is now handled in vbe_dir_finish.

Test case by thomaslc

Fixes: #1806
@mbarcia
Copy link

mbarcia commented May 12, 2016

Current version on Debian Jessie 4.1.2 (Mar 4th) still has this bug, which was fixed on March 14th.

Any idea when this fix is going to reach Debian Jessie? Thank you very much.

@lkarsten
Copy link
Contributor

@mbarcia We'll do another release when we're done with the backporting efforts, probably in June. After that you have to bug @ssm or another packager to upload the fresh version.

@lkarsten
Copy link
Contributor

Strictly speaking, since it is jessie, our official packages covers it and will most likely be out a day or two after the release.

@mbarcia
Copy link

mbarcia commented May 31, 2016

@lkarsten thank you very much

lkarsten pushed a commit that referenced this issue Jun 1, 2016
@lkarsten
Copy link
Contributor

lkarsten commented Jun 1, 2016

backport review: commited to 4.1 head, needs 4.0 review.

@Krapulat
Copy link

Krapulat commented Jun 3, 2016

@lkarsten When it will be available the fix in Varnish 4.1 for Ubuntu?

@cherouvim
Copy link

Hello. Any idea when is this comming to ubuntu? I have a couple of ubuntu 16 servers with migrated sites and until this is fixed I have to change all pipe to pass in the vcls in order for posts to work quickly, but this introduces some other problems.

Thanks

@denisbr
Copy link

denisbr commented Jun 30, 2016

@cherouvim Ubuntu packaging for Xenial is handled by the maintainers of the ubuntu package maintainers (http://packages.ubuntu.com/xenial/varnish). @ssm might be able to guesstimate something, but due to the nature of the process it's not easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants