-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Assertion on non-empty upstream_requests in Router::Filter destructor in stress test #9054
Comments
This is from ENVOY_SHA1 = "619eb5735f038a568df6497f28fac1bf809b2379" # 11.06.2019 |
@snowp could you take a look at this? |
It seems like somehow we're handling the defer delete for the HCM ActiveStream without all the I'm wondering if what's going on is that the ActiveStream is being shut down between If this is the case we should probably just bail out early in |
In our test setup, we had a http filter making async_client call. While the async_client call is in progress, the filter is paused with STOP. This filter is not handling onDestroy() to cancel active async_client call. Could this be the root cause? But, the upsteram_stream_ in Router is created on the Router::decodeHeader(). I assume if my filter decodeHeader() is paused with STOP, Router::decodeHeader() should not be called. Since Router::upstream_requests is not empty when crash, it means my filter async_client call should have returned, it should have returned CONTINUE so that Router::decodeHeader() is called. |
If this is reproducible, any chance you can rerun with -l trace and share the logs of the offending connection with us? It might shortcut a lot of debugging! |
It is a stress test. with over 10k requests within 1m, with "-l trace", it will generate too much logs. problem may not happen. |
reproduce steps is: run a stress test with over 10k request per minute for a couple hours. |
Update: I am trying to cancel the async_client in-flight request when filter is gone in my http custom filter to see if it fixes the problem. Will update the result here. |
After I cancel the in-flight async_client request on my custom Http Filter::onDestroy(), the problem went away. Hence I close the issue. |
Title: Envoy crash with assertion on upstream_requests not empty in Router::Filter destructor in stress test using wrk
Description:
\During stress test using wrk with command similar to following:
wrk -t 1 --timeout 2m -c 10 -d 60s
with these data
= 1 threads and 10 connections
= Thread Stats Avg Stdev Max +/- Stdev
= Latency 38.91ms 5.71ms 101.70ms 90.33%
= Req/Sec 257.68 28.93 303.00 71.83%
= 15411 requests in 1.00m, 3.48MB read
= Requests/sec: 256.63
= Transfer/sec: 59.40KB
Call Stack:
The text was updated successfully, but these errors were encountered: