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
dispatcher.DispatchLink calls conn.Close() (or rather common.Interrupt()) on incoming connection only if error occurs.
conn.Close() is not called in case of successful handling (connection finishes or completes by outbound policy idle timeout), when DispatchLink return with no error and HandleConnection function just ends.
This breaks lifecycle handling, and leave connections (both TCP/UDP) dangling in gVisor while already closed from upstream side.
Add defer conn.Close(), always signalling handled connection to close to the input (tun) side, send finish packets (TCP) and cleanup handling (UDP).
yeah, sorry for that. we did so many changes so quick, that it's hard to properly do long testing of it. things slipped. when there are many connections open, if I look at prof there is like 500 more coroutines and then 300 less in few minutes. which looks "fine", but actually wasn't.
I spend yesterday and today testing and found out that there is no .Close() call on sucessfull finish, and it is required for proper lifecycle (otherwise gVisor don't know that connection is no longer open)
If you wait with the release one more day, so I'll monitor the situation with this change, see how prof performs, how many are connections there and how my devices perform - that would be perfect
I was monitoring the implementation that was release for whole last week.
After this change it all look proper and good, this change was final cherry on the top, and the implementation is proper after that, as designed. No crashes, no issues.
I'll start looking at how to implement simple routing next week.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dispatcher.DispatchLink calls conn.Close() (or rather common.Interrupt()) on incoming connection only if error occurs.
conn.Close() is not called in case of successful handling (connection finishes or completes by outbound policy idle timeout), when DispatchLink return with no error and HandleConnection function just ends.
This breaks lifecycle handling, and leave connections (both TCP/UDP) dangling in gVisor while already closed from upstream side.
Add defer conn.Close(), always signalling handled connection to close to the input (tun) side, send finish packets (TCP) and cleanup handling (UDP).