-
Notifications
You must be signed in to change notification settings - Fork 44
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
Allow IoBuffer to hold multiple packets #531
base: main
Are you sure you want to change the base?
Conversation
I notice the |
@OxleyS yeah that's what I think too. Would it be possible for you to test with this branch and that log message I just added? I want to see if this happens. |
Sure, I can't promise too much since the panic has so far been extremely rare, but I can certainly throw it up there and see what happens. Other possibilities to consider are behavior if |
A small update on this - we've been running our servers with this fix since Wednesday last week, and so far haven't seen a panic nor the |
@OxleyS sounds promising. How frequent was it before the fix? |
It only happened once, so it must be some rather freak conditions that trigger it. |
Yeah. Let's just give it time. |
This is a potential fix for #530.
The story here is that the openssl crate has an abstraction layer
SslStream
which is generic over something that implementsRead
/Write
. str0m is push/pull which means we need an "adapter" to convert between these two methods – that adapter is calledIoBuffer
.I have assumed the operation of the
IoBuffer
would be such that each time we push an incoming packet to it, theSslStream
needs to read that packet completely. The assertion tripped in #530 seem to indicate that doesn't always happen.This PR relaxes this assumption to allow
IoBuffer
to potentially hold a few unconsumed packets. Because there is no repro, this is a shot in the dark.