You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 16, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 16, 2026. It is now read-only.
h2_refcnt_delta and nidle_active increased simultaneously at 10:40-11:00.
This instance removed (and Hitch restart) from cluster at 17:00-17:30.
But, h2_refcnt_delta is not so much reduced.
I have also a thread leak under unbuntu 16.04 (4.4.0-98-generic) with varnish 6.0.0 and HAProxy 1.8 with h2 enable. The same config with very few h2 trafic show no leak.
Threads goes down when child restart ...
Activity
xcir commentedon Mar 20, 2018
I'm testing other conditions.(ESI + HTTP/1 + varnish restart)
But, take few days to result comes out.
xcir commentedon Mar 23, 2018
ESI:enabled + h2:disabled + varnish restart
->Not increase.
ESI:disabled + h2:enabled

-> After posting thread increased in few instance.
This graph(ESI:disabled+h2:enabled) is running for 5 days.
I think this issue seems at http2.
xcir commentedon Mar 26, 2018
Hitch stopped.
Only healthcheck request.(HTTP)
Instance removed from the cluster at 20:30(JST)
ESI: Enabled h2: Enabled thread_pools: 2 thread_pool_min: 200 MAIN.threads: 527
ESI: Disabled h2: Enabled thread_pools: 2 thread_pool_min: 150 MAIN.threads: 344
xcir commentedon Mar 27, 2018
All TZ is UTC+0900(JST)
I added some counters for check.
master...1c804ea
nidle_delta = nidle_incr - nidle_decr (idle threads count)
nidle_active = MAIN.threads - nidle_delta (active threads count)
h2_refcnt_delta = h2_refcnt_incr - h2_refcnt_decr (active h2 streams count)
h2_refcnt_delta and nidle_active increased simultaneously at 10:40-11:00.
This instance removed (and Hitch restart) from cluster at 17:00-17:30.
But, h2_refcnt_delta is not so much reduced.
xcir commentedon Apr 6, 2018
I'm looking for a cause commit...
Leaked

0d3044d
https://github.com/xcir/varnish-cache/tree/tmp/snap/1003-0d3044d
Not leaked

3a86dd8
https://github.com/xcir/varnish-cache/tree/tmp/snap/0817-3a86dd8
00:50(JST)~ removed instance , set thread_pool_timeout=10 and thread_pool_min=10.
xcir commentedon Apr 10, 2018
I think thread leak began from 0d3044d
Francois-v3 commentedon May 7, 2018
I have also a thread leak under unbuntu 16.04 (4.4.0-98-generic) with varnish 6.0.0 and HAProxy 1.8 with h2 enable. The same config with very few h2 trafic show no leak.

Threads goes down when child restart ...
Francois-v3 commentedon May 10, 2018
In addition, i can observe that by changing communication between HAProxy and varnish from TCP to UDS, threak leak become at least very small:

Francois-v3 commentedon May 17, 2018
Finaly i still have thread leak, but only above 2500/3000 requests per second.

ehocdet commentedon May 24, 2018
We have also thread leak since h2 is activated.
With frequently vcl load/discard we can see a lot of vcl stalled in "discarded cold/busy" state.
n_vcl grows with h2 enable, and stop to grow without. n_vcl metric on 4 servers:

daghf commentedon May 30, 2018
Hey
I've now pushed fixes for two separate potential thread leak situations (a56469c and 4b73c5f).
The first one relates to failing POST bodies, and the second one is relating to our handling of PRIORITY frames.
Could I ask you to please give master a spin to see if you still have a thread leak?
xcir commentedon May 31, 2018
I'm testing at varnish 6.0.0 + bin/varnishd/http2/* changes.
Please tell me, if you need other commit.
varnish-6.0.0...xcir:tmp/snap/v600-apply-h2commit
xcir commentedon May 31, 2018
varnish-6.0.0...xcir:b418fe871acc1798026f86e10904c01807403d8f
16:45(JST) ~ removed instance , set thread_pool_timeout=10 and thread_pool_min=10.
Leaked...
11 remaining items
xcir commentedon Jun 19, 2018
leaked again...

23:25(JST) ~ replace varnish ( ed50971 -> 677320e )
02:15(JST) ~ removed instance , set thread_pool_timeout=10 and thread_pool_min=10.
backtrace
https://gist.github.com/xcir/6d0dc200a11ba987f53a770a1f80ff3f
backtrace(h2=0x7f63194affc0)
https://gist.github.com/xcir/bbf50720fc2fa14038f009c54c37dd19
xcir commentedon Jun 21, 2018
backtrace
https://gist.github.com/xcir/05c2e1e534c649c1d00fa9dd2168b725#file-backtrace-all
VSL (h2:0x7fa6c1189fc0)
https://gist.github.com/xcir/05c2e1e534c649c1d00fa9dd2168b725#file-h2sess-h2-0x7fa6c1189fc0-wrk-0x7fa6c118ade0-arg-0x7fa1ae9a0020
VSL (h2:0x7fa1bb4b8fc0)
https://gist.github.com/xcir/05c2e1e534c649c1d00fa9dd2168b725#file-h2sess-h2-0x7fa1bb4b8fc0-wrk-0x7fa1bb4b9de0-arg-0x7fa1a5346020
VSL (h2:0x7fa6c4813fc0)
https://gist.github.com/xcir/05c2e1e534c649c1d00fa9dd2168b725#file-h2-0x7fa6c4813fc0-wrk-0x7fa6c4814de0-arg-0x7fa1ac505020
Don't transition to CLOS_REM state until we've seen END_STREAM
xcir commentedon Jun 23, 2018
again..
backtrace + VSL
https://gist.github.com/xcir/336098bb0d2a93552d232ff4516f90a1
working varnish(tmp/snap/0618-trunk)
xcir@d2378c9
Use a separate condvar for connection-level flow control updates
Use a separate condvar for connection-level flow control updates
xcir commentedon Jul 1, 2018
I'm running 812b136 commit for 4days. Not leak!
I think this issue was fixed.
Don't transition to CLOS_REM state until we've seen END_STREAM
Use a separate condvar for connection-level flow control updates
Decline DATA frames after seeing END_STREAM