[En-Nut-Discussion] Http server - ethereal

Damian Slee damian at commtech.com.au
Tue Feb 24 09:05:36 CET 2004


I have been looking at this in more detail today, cause I have had the
same problem as Cosmin since I started using ethernut 6+months ago.

Running latest CVS, and new realtek driver.  I had this problem before
the new realtek driver.

I have a frames page with 3 sections in it, so 3 html files + frame
setup html file.  Only text content + forms on the pages.

The problem is that the main frame with a form on it sits there trying
to load for about 20 seconds, then it loads.  I have traced this with
Ethereal.  If I click on one of my menu links in the left frame, forcing
browser to open new connection, the form loads imediately.

Originally I though this was cause I was only running 2 http threads,
but changing this to 4 or 8 makes no difference.  Like Cosmin indicated
last week.

Even stranger, after not being able to solve it, I enabled NUTDEBUG on
tcp.  Got some nice debug out the serial port.  I can no longer
replicate the problem.  Remove NUTDEBUG, and problem comes back.

I don't think it is low memory causing this, it would be worse with
NUTDEBUG wouldn't it?

I captured with etherreal, powered on ethernut, then opened browser and
replicated the problem.  Stop capture 20+ seconds later, once it had
fully loaded with no intervention.

Capture showed; 
(anyone know how to export to txt file in ethereal?)
(PC port number in brackets)
(I have left off the trailing ACK, FIN ACK)

(2104) TCP syn sent by PC to ethernut for first HTTP request
ARP lookup by ethernut
(2104) SYN ACK sent back to PC, and ACK back again
(2104) Data
(2104) FIN ACK

(2106) TCP syn sent by PC
(2106) SYN ACK sent back to PC, , and ACK back again
(2106) data

(2108) TCP syn sent by PC
(2109) TCP syn sent by PC  (this appears to get lost)

(2106) FIN ACK

(2108) SYN ACK sent back to PC, , and ACK back again
(2108) data

(3 seconds later)
(2109) TCP syn sent by PC  (this appears to get lost, again)

(6 seconds later)
(2109) TCP syn sent by PC  (this appears to get lost, again)
 
(12 seconds later, error must be reported back to browser after 3 Syn
timeouts)
(browser gives up on port 2109, closes socket and tries open another
socket)

(2110) TCP syn sent by PC
~1 millisecond later
(2110) SYN ACK sent back to PC, , and ACK back again
(2110) data
< page loaded completely >

Repeatable every time from power on.  Sometimes while refreshing.

-----------------------------------------------------------

These are the scenarios as I see it?

1.) If the first (2109) Syn got lost
Why don't the 2nd or 3rd Syn, get Syn,Acked?

2.) Low memory.  Then 9 seconds later the other threads have well and
truly stopped, and memory been freed, why shouldn't it be able to handle
the Syn's being sent then?

3.) Syn Ack from ethernut got lost, and no further Syn Acks are sent?
I not sure, should another Syn Ack be sent in reponse to a received Syn,
3 and 9 seconds later?

4.) Its like that port number gets barred.


Any ideas on how to move forward on this?




More information about the En-Nut-Discussion mailing list