demikernel icon indicating copy to clipboard operation
demikernel copied to clipboard

[test] TCP echo test does not test if echoes were actually completed

Open iyzhang opened this issue 1 year ago • 1 comments

Description

It is possible for the tcp echo test to not actually echo any packets. If the client successfully connects to the server kernel but then the kernel closes the connection, either the test will exit successfully or it will hang if the kernel does not close all connections. In either side the server side tcp echo application will likely hang because it did not get any connections from the OS kernel.

How to Reproduce

Steps to reproduce the behavior:

  1. OS kernel is up but not passing connections on to the application
  2. TCP echo client gets successful connects to all clients
  3. Server-side kernel closes the connections
  4. TCP echo client exits if all client connections are closed, otherwise hangs.

Documentation

This line in the TCP echo test is the problem (same between sequential and concurrent):

We are not seeing this line print out on the server and we should if the client actually connects/exits without error:

We should probably add some more application level traces, for example in each of the issue_* and handle_* functions.

Expected Behavior

If the server-side application is not echoing data back, the test should detect that.

iyzhang avatar Oct 30 '23 20:10 iyzhang

@iyzhang could you help me elaborating on the following topics:

  • Why would the OS kernel not be passing connections to the applications?
  • Why would server-side kernel close connections, even without receiving any data?
  • If the server is not echoing back packets, how would TCP-echo client exit?
  • What is the buggy line that you wanted to highlight?

ppenna avatar Jan 08 '24 12:01 ppenna