-
Notifications
You must be signed in to change notification settings - Fork 166
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
picoquic ignores ACK #1734
Comments
Do you happen to have a qlog trace? I need to correctly reinstall wireshark on my new laptop, and that will take some time. |
Yes, this and the terminal output. |
Looking at the qlog, I see this initial exchange: I am not sure what you feel is wrong there. The picoquic client sent an Initial message that was acked. There is no need to retransmit anything, since the message was acked. The client waits until the next message from the server, which arrives 200ms later. The handshake proceeds normally after that. |
Yes, there is no need to retransmit data, but a probe packet should be sent based on the new RTT estimate. Assume that instead of being slow to continue the handshake, the remaining server packets are lost and the server is blocked by the anti-amplification limit. In that case, we want picoquic to send probe packets to unblock the server after PTO expiry. What do you think? Did I miss anything? I think below are the relevant paragraphs from the RFCs: According to RFC9000 the client MUST send a probe packet during this phase in the handshake.
And the timer SHOULD be restarted every time an ack-eliciting packet is sent or acknowledged RFC9002:
|
You had me a bit confused with the reference to QUIC-TLS. I think you meant QUIC-RECOVERY. But yes, the correct text is the anti deadlock specification in section 8.1 of RFC 9000. Deadlock prevention is handled by the code in function Obviously, that did not work in your case. It is worth investigating, but I need first to build a test that reproduces the issue. |
Turns out that the repro is not easy. The repro step are:
I do have tests of the amplification limit, but none of them start with "server sends immediate ACK in a packet by itself". The initial ACK are always bundled with an initial packet containing the server hello. That's a different behavior. And it is not too easy to change. In fact, if your implementation send the Initial ACK in the same packet at the server hello, we probably would not see the issue. |
Which send code are you referring to exactly? Following the RFC9002 reference above, the PTO timer needs to be restarted on reception of an acknowledgement that newly acknowledges an ack-eliciting packet. Regarding the reproduction, I agree with the given steps. But sending instant ACKs (ACK without ServerHello) happens quite often with current deployments. |
Picoquic uses just one global timer, set to the earliest of all timed events. The sending code is executed when that timer fires, and runs a "what do I have to do" process to execute whatever actions are pending. Obviously, a step is missed in the initial state, and that process does not execute properly. And yes, it is probably simpler to treat this as a unit test, as you describe. |
My initial repro does not find an issue: You see in the test a PTO probe being sent 30 ms after the ACK was received, which is the expected behavior. I noticed the error message after the log of the incoming ACK packet in the previous example, "Received unpadded initial, length=51", so I changed the test to send short ACKs, and get a trace much similar to yours: So, no repro. I think that you observed the issue on an old version of the code, and that the bug was fixed in PR #1731, Fix RTT computation on first sample, specifically the lines: Fixing the closing parenthesis ensured that the retransmission timer would be updated after the first RTT measurement. A version before that would have kept the initial retransmission timer until the 2nd measurement, which would cause exactly the bug that you are reporting. I am adding the test code in PR #1739, "Add test of initial PTO for retransmissions." I will make sure that the Docker image also gets updated. |
I think this is fixed. The interop runner image has been updated. |
I used picoquic as QUIC client to communicate with a modified quic-go server, which responds with an acknowledgment without coalesced ServerHello in response to the ClientHello.
The acknowledgment seems to be ignored by picoquic, as it does not react with probe packets.
This issue is most noticeable when the server is slow to complete the handshake. To simulate this, I introduced a delay after the ACK. I used the picoquic interop-runner docker image for testing. A pcap file is attached, with the ACK visible in Wireshark as packet No. 6.
The ACK should allow the client to accurately estimate the RTT, program the PTO, and send probe packets upon PTO expiry. Currently, picoquic does not react to the acknowledgment by sending probe packets.
I suppose the issue is in picoquic_update_path_rtt, but wasn't able to track down the exact line causing this. Most relevant seem to be the handling of the first RTT estimate, but this and the checks in L285-287 look correct to me:
picoquic/picoquic/timing.c
Lines 293 to 296 in e78af22
Do you have any ideas on this?
picoquic-ignores-instant-ack.pcapng.gz
The text was updated successfully, but these errors were encountered: