-
Notifications
You must be signed in to change notification settings - Fork 16
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
Latest ack_nr must not be bigger that the pending packets in the current receive window #138
Comments
I don't think this is an error, but a feature. seq_numbers are infinitely reused during the connection, hence |
yes, if you randomly generate a 2^16 packet number and then you overflow, then ok, it can happen, but the problem is that this bug is happening right now without overflowing seq numbers. |
Edited the issue to note that this is happening even if we don't overflow on the seq numbers, which means there is a bug in the utp receiver logic and how the last ack_nr/pending packets are tracked. |
Could you post some logs, what client is the sender? |
I do see the issue you are pointing out now. I don't agree with what is described in the issue though I wonder what uTP implementation is sending us that. The logs don't say anything, but the sender must be sending super small packets. Cause it is clear that there is a bug, but not necessarily enough to go on from the logs alone, but I assume you are debugging this now. Very cool you found this problem! |
This is the sender details:
|
Trin! Well that is very concerning, that means we are sending packets with payloads on average 1024*1024/65535= 16bytes. That is very yikers as the header is 64 |
I think it is more likely that there is a bug in the uTP socket and how it handles pending and ack packets. |
I am aware of a bug making us not able to handle over 2^16 data packets, I am assuming this bug might be different, but hopefully we find and fix them all 🧐 |
Is this the error line you're thinking of for large data?
FWIW, #147 does not resolve this ^ error. (as of 678f7bf anyway) |
I am a little confused what you are asking, but to fix the bug of not being able to send over 2^16 packets, instead of tracking the initial sequence number in packets should be a circular buffer containing (next_sequence_number.wrapping_sub(current_packet_window)..next_sequence_number) excluding acked packets. I am a little confused what you were asking, but I thought I would share this context regardless. |
Ok, so it sounds like it's a distinct issue. I just posted the test I used to get that error: #148 |
Running multiple uTP streams can cause sometimes the receiver to have pending packets with low sequence numbers than the current ack_nr.
This can't be possible because the latest ack_nr means that we received ALL packets before this number, so the pending packets should not include numbers <= last ack_nr (except if we overflow on the pending packets seq).
The text was updated successfully, but these errors were encountered: