|
From: | Albert Bartel |
Subject: | [lwip-devel] communication hangs after single ACK |
Date: | Mon, 16 Nov 2009 11:15:52 +0100 |
Hello lwip-developers, after having some problems with an Atmel UC3 port of
lwip-stack, I fixed them with some help of some lwip developers. There was a
big bug in the port so that the ethernetif_input task called ethernet_input()
directly instead of calling netif->input(). So it was not thread safe. After fixing this bug, I also updated the stack to
the lates version (V1.3.2 RC1) and hoped that the strange behaviour would be
fixed, since there have been some changes in the stack. But the problem still occurs. I will try to describe the problem: A colleague has got a PC
that runs Windows Vista and is connected over a WLAN-Router (signal strength
may be not good). I got a PC that runs
Windows XP and is connected directly to a Router (not WLAN). The Server is a small
Atmel UC3A Webserver that uses lwip-stack and supports only HTTP/1.0 (no keep
alive), so for each request a new connection has to be established. With my PC everything
works fine, I got no problems. But with the PC of my colleague it often occurs,
that the PC receives no data from the client while the connection will stay
opened (ESTABLISHED). I attached a small
Ethereal trace with a request when this situation happened. It is like that: PC |
Server -------------------------- SYN |
|
SYN,ACK ACK |
HTTP GET | |
ACK Connection hangs, no
response data for this request is sent. FIN, ACK | |
ACK After manually closing
the connection (after more that 60s) the data that should have been sent as
response is sent - but after the connection has been closed. |
HTTP OK with data RST, ACK | |
FIN, ACK Other requests from the
same PC to the webserver, while this connection hangs, are handled and answered
correctly. If everything works fine,
directly after sending the GET message I get a HTTP/1.0 200 OK message (with
ACK for the GET), but in the cases, when I get no data and the connection stays
open, I only get an ACK for the GET, but no data follows. The data comes in a
separate packet after closing the connection manually. The GET must be seen by
the stack because of the correct ACK, but somehow the request is not processed
by the webserver. After the FIN, ACK from the client recv_tcp() sets the
api_event NETCONN_EVT_RCVPLUS and the webserver processes the GET after lwip_selscan
returns >0. If I turn on TCP_INPUT_DEBUG
and TCP_OUTPUT_DEBUG, the debug output slows down the whole system and
this problem does not occur anymore. Is it possible, that an api_event
(NETCONN_EVT_RCVPLUS/ NETCONN_EVT_SENDPLUS) somehow gets lost? Have you got an idea or a
hint, why this happens? Many thanks in advance. Greetings Albert |
communication_hangs.pcap
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |