[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Patch for bug 23119
From: |
Ken Smith |
Subject: |
Re: [lwip-users] Patch for bug 23119 |
Date: |
Wed, 11 Mar 2009 04:43:28 -0700 |
On Wed, Mar 11, 2009 at 1:50 AM, Kieran Mansley <address@hidden> wrote:
> On Tue, 2009-03-10 at 14:22 -0700, Ken Smith wrote:
>> I'm using lwip-1.3.0 and I believe I have encountered the problem
>> discussed here.
>>
>> http://savannah.nongnu.org/bugs/?23119
>>
>> I am using SO_RCVTIMEO (set to 30 seconds) and occasionally, my
>> application gets into a loop where lwip with TCP_DEBUG enabled just
>> keeps displaying:
>>
>> tcp_slowtmr: processing active pcb
>> tcp_slowtmr: max SYN retries reached
>> tcp_pcb_purge
>> tcp_pcb_purge: data left on ->unacked
>
> Sounds like you have a different problem to the bug you mention: that
> one was just to do with whether timeouts were classed as fatal or not.
> I therefore think that the patch won't help.
>
> The output above suggests that lwIP has tried to open a connection to
> another host but has received no reply after a lot of attempts, and so
> is giving up. When removing the connection it noticed that there is
> some data on the unacked queue, which is a little odd for a connection
> that has not yet been opened, but it should cope with that, free the
> unacked queue, and remove the connection.
>
> Can you explain more about how your application uses the sockets API?
> Maybe with a code sample to show what it's doing when things go wrong.
> A packet capture can often be useful too.
I'm using the lwIP sockets API via axTLS under FreeRTOS on ARM7.
Here's my call to connect.
struct sockaddr_in client_addr;
int client_fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
int32_t recv_timeout = 30000; //required to be in millis
setsockopt(client_fd,SOL_SOCKET,SO_RCVTIMEO, (char*)&recv_timeout,
sizeof(recv_timeout));
AxsslLog(CioVerLow, "**tls: SERVER: trying to connect\r\n");
if (lwip_connect(client_fd, (struct sockaddr *) &client_addr,
sizeof(client_addr)) < 0) {
AxsslLog(CioVerLow, "**tls: SERVER: connect failed\r\n");
lwip_close(client_fd)
ssl_ctx_free(ssl_ctx);
return NULL;
}
The ethernet port of my device is connected to a layer two bridge and
then to an ethernet->CDMA/EVDO modem. (In the wild, it is connected
directly to the modem.) When I do tcpdump on the bridge, I get no
output from my device. It thinks it's trying to get out to the
network but no packets are actually coming out.
I've attached two versions of my lwipopts.h file and output from a
call to stats_display(). The lwipopts.h that was in play at the time
was lwipopts.h.cal2. Here is the error output that keeps looping when
lwip is in trying to connect.
1 lwip_socket(PF_INET, SOCK_STREAM, 6) = 0
2 **tls: SERVER: trying to connect
3 lwip_connect(0, addr=OMITTED port=OMITTED)
4 tcp_connect to port OMITTED
5 tcp_slowtmr: processing active pcb
6 tcp_slowtmr: processing active pcb
7 tcp_slowtmr: processing active pcb
8 tcp_slowtmr: processing active pcb
9 tcp_slowtmr: polling application
10 tcp_slowtmr: processing active pcb
11 tcp_slowtmr: processing active pcb
12 tcp_slowtmr: processing active pcb
13 tcp_slowtmr: processing active pcb
14 tcp_slowtmr: polling application
15 tcp_slowtmr: processing active pcb
16 tcp_slowtmr: processing active pcb
17 tcp_slowtmr: processing active pcb
18 tcp_slowtmr: processing active pcb
19 tcp_slowtmr: polling application
20 tcp_slowtmr: processing active pcb
21 tcp_slowtmr: processing active pcb
22 tcp_slowtmr: processing active pcb
23 tcp_slowtmr: processing active pcb
24 tcp_slowtmr: polling application
25 tcp_slowtmr: processing active pcb
26 tcp_slowtmr: processing active pcb
27 tcp_slowtmr: processing active pcb
28 tcp_slowtmr: processing active pcb
29 tcp_slowtmr: polling application
30 tcp_slowtmr: processing active pcb
31 tcp_slowtmr: processing active pcb
32 tcp_slowtmr: processing active pcb
33 tcp_slowtmr: processing active pcb
34 tcp_slowtmr: polling application
35 tcp_slowtmr: processing active pcb
36 tcp_slowtmr: processing active pcb
37 tcp_slowtmr: processing active pcb
38 tcp_slowtmr: processing active pcb
39 tcp_slowtmr: polling application
40 tcp_slowtmr: processing active pcb
41 tcp_slowtmr: processing active pcb
42 tcp_slowtmr: processing active pcb
43 tcp_slowtmr: processing active pcb
44 tcp_slowtmr: polling application
45 tcp_slowtmr: processing active pcb
46 tcp_slowtmr: processing active pcb
47 tcp_slowtmr: processing active pcb
48 tcp_slowtmr: processing active pcb
49 tcp_slowtmr: polling application
50 tcp_slowtmr: processing active pcb
51 tcp_slowtmr: max SYN retries reached
52 tcp_pcb_purge
53 tcp_pcb_purge: data left on ->unacked
54 lwip_connect(0) failed, err=-5
55 **tls: SERVER: connect failed
56 lwip_close(0)
Any ideas appreciated.
Thanks,
Ken
lwipopts.h
Description: Binary data
lwipopts.h.cal2
Description: Binary data
stats_display
Description: Binary data
- [lwip-users] Patch for bug 23119, Ken Smith, 2009/03/10
- [lwip-users] Re: Patch for bug 23119, Ken Smith, 2009/03/10
- Re: [lwip-users] Patch for bug 23119, Kieran Mansley, 2009/03/11
- Re: [lwip-users] Patch for bug 23119,
Ken Smith <=
- Re: [lwip-users] Patch for bug 23119, Kieran Mansley, 2009/03/11
- Re: [lwip-users] Patch for bug 23119, Ken Smith, 2009/03/12
- Re: [lwip-users] Patch for bug 23119, Kieran Mansley, 2009/03/13
- Re: [lwip-users] Patch for bug 23119, address@hidden, 2009/03/13
- Re: [lwip-users] Patch for bug 23119, Ken Smith, 2009/03/16
- Re: [lwip-users] Patch for bug 23119, Simon Goldschmidt, 2009/03/17
- Re: [lwip-users] Patch for bug 23119, Ken Smith, 2009/03/20
- Re: [lwip-users] Patch for bug 23119, address@hidden, 2009/03/20
- Re: [lwip-users] Patch for bug 23119, Ken Smith, 2009/03/20