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
Under high load, ktcp may fail to open new connections and eventually hang completely. The issue is very timing sensitive. even the smallest printf in related code eliminates the problem. Even rearranging some code in the ktcp.c main loop is enough to change the behaviour (but not to eliminate the problem).
Here's the scenario most likely to repeat the problem (this is on a AMI386SX/40 SBC):
telnet into TLVC, issue the command hd /dev/hda - which will run for a long time.
Wait for a couple of minutes, the connect to the TLVC system with ftp. A message should say connect <something>, then the ftp client would hang. The output in the telnet window will continue. If the client ftp command does not hang, ktcp is working normally and will continue to do so for a while. Try again in a few minutes, run some other commands in the meanwhile. And make sure there aren't any debug statements in the code that emit output during the opening of connections.
If the ftp command hangs, issue a netstat command from the console or a serial terminal window. this will hang and the output in the telnet window will stop. Interrupt the hanging netstat with ^C and the output in the telnet window will continue. This stop/start sequence is repeatable any number of times.
Aborting the hung ftp connection from the client is likely to hang ktcp completely (and make all network processes uninterruptible, including netstat).
This is not the only way to trigger the behaviour, a second telnet session may have the same effect (or not), this part is unpredictable.
The ftp startup sequence that hangs gets through the first few packets, then stops:
IOW, ktcp accepts the connection by responding with a SYN-ACK, and the client follows with an ACK as appropriate, and it seems like this ACK is never registered on the TLVC side of the connection.
I lot of time has been spent on tracking down the problem, with little success so far. It seems likely though that the problem is located in the devtcp code
The text was updated successfully, but these errors were encountered:
Under high load,
ktcp
may fail to open new connections and eventually hang completely. The issue is very timing sensitive. even the smallestprintf
in related code eliminates the problem. Even rearranging some code in thektcp.c
main loop is enough to change the behaviour (but not to eliminate the problem).Here's the scenario most likely to repeat the problem (this is on a AMI386SX/40 SBC):
telnet
into TLVC, issue the commandhd /dev/hda
- which will run for a long time.ftp
. A message should sayconnect <something>
, then theftp
client would hang. The output in thetelnet
window will continue. If the clientftp
command does not hang,ktcp
is working normally and will continue to do so for a while. Try again in a few minutes, run some other commands in the meanwhile. And make sure there aren't any debug statements in the code that emit output during the opening of connections.ftp
command hangs, issue anetstat
command from the console or a serial terminal window. this will hang and the output in thetelnet
window will stop. Interrupt the hangingnetstat
with ^C and the output in thetelnet
window will continue. This stop/start sequence is repeatable any number of times.ftp
connection from the client is likely to hangktcp
completely (and make all network processes uninterruptible, includingnetstat
).telnet
session may have the same effect (or not), this part is unpredictable.The
ftp
startup sequence that hangs gets through the first few packets, then stops:IOW,
ktcp
accepts the connection by responding with a SYN-ACK, and the client follows with an ACK as appropriate, and it seems like this ACK is never registered on the TLVC side of the connection.I lot of time has been spent on tracking down the problem, with little success so far. It seems likely though that the problem is located in the
devtcp
codeThe text was updated successfully, but these errors were encountered: