[En-Nut-Discussion] Web server problem (missing FIN packets)

Dusan Ferbas dferbas at dfsoft.cz
Tue Mar 16 16:24:47 CET 2004


Hi developers,

today we experienced something more about this issue.

Goal:           Every five seconds we request 3kB html page + 5kB picture 
file (.png)
         or      43kB .swf file (static binary from SPI flash) + 5kB + 9kB 
.xml (generated on the fly) files.
                 Browser is Mozilla 1.5. Same behaviour was observed with IE 6.

Environment:    Nut/OS is 3.5 with latest sources from CVS.
                 We are using MSS of 1460 bytes (TCP_MAXSEG option). Same 
size is used for output buffer (SO_SNDBUF socket option).
                 SO_SNDTIMEO with 3000 ms recommended by Oliver S. (just 
before NutTcpAccept())
                 There is 14kB of free heap. Http threads are running at 
priority 80.

                 SW idea comes from httpd example. Stream is used, 
fflush()ed and fclose()d. Then NutTcpCloseSocket()

Problem:        From user's view it looks like file was not sent. Ethereal 
shows that file was completely sent,
                 but no FIN was sent from Nut/OS. During tests this appears 
several times for let me say 50 attempts.
                 Once Mozilla is closed it tries to close unfinished 
connections with FIN packets. Nut/OS responds with RST.

                 We are able to reproduce this.

Observation:    PC is connected to Nut/OS board over a switch. Once this 
switch was changed to a 10Mb hub
                 we were no more able to reproduce erroneous behaviour. 
Changing back to a switch (speed from PC at 100Mb)
                 brought problems back.

Any idea with Realtek wait or TCP state machine ? Can this be something 
with half/full duplex and bad RTL negotiation currently discussed in 
conference ? (I do not have 100Mb hub to sniff it)


Dusan  




More information about the En-Nut-Discussion mailing list