-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Short lived connections causing segmentation fault #4310
Comments
@PiotrSikora I'm guessing this is the same issue as istio/istio#8310. |
Nevermind; not quite the same I don't think. |
It doesn't look like it is. Also, it seems that this started very recently (unless I'm misreading this), whereas TCP proxy changes have been merged ~3 weeks ago. |
Actually, it's the same... I got confused by the |
Also, it's worth noting that this is only happening for TLS listeners. Ultimately, I think that the proper fix for this is marking connection as "connected" and connecting to upstream only after the TLS handshake completed successfully (see the discussion in #2800). |
I agree that not connecting to an upstream until after the TLS handshake completes would improve the behavior. However, my guess is that this can also happen with non-TLS connections, it just depends on the timing. I think it's a sequence like, or similar to:
Another possibility is that handshake failure interacts incorrectly with half-close semantics, and the handshake failure is considered a half-close. |
Closing the upstream connection is not safe from the Filter destructor, because it triggers events back into the downstream connection, which is partially destructed. Ensure that the upstream connection is closed before the destructor is called. Fixes envoyproxy#4310 Signed-off-by: Greg Greenway <[email protected]>
Signed-off-by: Stephan Zuercher <[email protected]>
* Fix crash in tcp_proxy. Closing the upstream connection is not safe from the Filter destructor, because it triggers events back into the downstream connection, which is partially destructed. Ensure that the upstream connection is closed before the destructor is called. Fixes #4310 Signed-off-by: Greg Greenway <[email protected]>
Description:
When a client attempts to make a very short connection -- for example, checking that a port is open -- Envoy crashes with a seg fault. For context, we have health check logic that tries to establish these short connections periodically.
Repro steps:
envoyproxoy/envoy:3b47cbabb517db69a40f38843a405d1d6f742f5d
docker image.Config:
config.yml:
listeners.yml:
Call Stack:
cc @jvshahid
The text was updated successfully, but these errors were encountered: