ultralight icon indicating copy to clipboard operation
ultralight copied to clipboard

Ultralight --> Fluffy OFFER fails

Open ScottyPoi opened this issue 1 year ago • 4 comments

Issue:

Hive tests for OFFER fail in one direction between Ultralight and Fluffy

Same tests pass in opposite direction, and pass in both directions with Trin

ScottyPoi avatar Sep 05 '24 22:09 ScottyPoi

Tests seem to succeed, but then fail like this:

2024-09-05T21:58:33.427Z cf738:Portal:uTP:RECEIVED:ST_FIN || ackNr: 7683     ||
2024-09-05T21:58:33.428Z uTP:congestionControl cur_window: 512 bytes in flight
2024-09-05T21:58:33.429Z cf738:Portal Cannot Find Open Request for socketKey ...

So probably an issue with FIN packet handling, and closing the socket too early

ScottyPoi avatar Sep 05 '24 22:09 ScottyPoi

Are we properly acknowledging the FIN in all scenarios or is there still some edge case where we are closing a socket before the FIN is sent?

acolytec3 avatar Sep 06 '24 00:09 acolytec3

It is unclear to me why we receive this FIN packet at all. In this scenario, Ultralight is the WRITE socket, and is the one that sends the FIN packet when it is done writing. So we send a FIN, which gets ACKed, and that should be the end of it. But Fluffy sends its own FIN packet, and seems to get hung up waiting for it to be ACKed.

ScottyPoi avatar Sep 06 '24 02:09 ScottyPoi

Digging into the Fluffy logs, it looks like Fluffy anticipates the end of the stream 1 packet too early. They send a FIN packet and try to read the incomplete bytes, and then the final data packet arrives. I have described this in more detail on the fluffy channel in hopes that they can provide some insight into why this would happen.

ScottyPoi avatar Sep 06 '24 03:09 ScottyPoi

This issue appears to be resolved.

Both clients have lots of recent updates, as did the hive tests and JSON-RPC spec itself. I don't know at what point this problem stopped, so it is still unclear what the cause or solution to this issue ever was :shrug:

ScottyPoi avatar Oct 11 '24 21:10 ScottyPoi