-
Notifications
You must be signed in to change notification settings - Fork 651
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
NIOAsyncChannel
can hit an assertion failure in NIOAsyncWriter
if the listening channel closes while activating an accepted connection
#2813
Comments
Motivation: The h2 transport tests cancel the task group running them when the test has completed. Cancelling the server makes apple/swift-nio#2813 more likely to occur. Modifications: - Tell the server to stop listening and let the test stop gracefully Result: Fewer runtime issues
Motivation: The h2 transport tests cancel the task group running them when the test has completed. Cancelling the server makes apple/swift-nio#2813 more likely to occur. Modifications: - Tell the server to stop listening and let the test stop gracefully Result: Fewer runtime issues
Thanks for opening this. The problem is similar to what we see in H2 when the consuming task of the inbound streams sequence gets cancelled. Currently both async sequences in question are dropping all buffered elements on the ground on cancellation. Now in both cases the element type can by a The fundamental issue that we are having here is that those async sequence are our place where we hand off the element from the EL to Swift Concurrency. Two solutions that come to mind:
|
Motivation: The h2 transport tests cancel the task group running them when the test has completed. Cancelling the server makes apple/swift-nio#2813 more likely to occur. Modifications: - Tell the server to stop listening and let the test stop gracefully Result: Fewer runtime issues
Motivation: The h2 transport tests cancel the task group running them when the test has completed. Cancelling the server makes apple/swift-nio#2813 more likely to occur. Modifications: - Tell the server to stop listening and let the test stop gracefully Result: Fewer runtime issues
If the listening channel is shutting down then accepted connections which haven't yet been referenced by the caller will be dropped. If the as-yet-unreferenced accepted connections have been activated (
channelActive
) has fired the channel will drop its ref to the outbound writer. As the ref count drops to zero we'll the assertion failure inNIOAsyncWriter
.The text was updated successfully, but these errors were encountered: