lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: [lwip-users] TCP Crash after repeated calls [Raw]


From: Chris_S
Subject: re: [lwip-users] TCP Crash after repeated calls [Raw]
Date: Thu, 23 Jul 2009 00:38:48 -0700

> > If you can get at some debug output, turn on the LWIP_DEBUG code and see
> > if that throws anything up.  Also turn on the LWIP_STATS code and

I have done that, and I'll show some output below.  I just can't get this
setup to act stable to even diagnose a specific problem.  When it crashes,
the debugger call stack never shows much so I can't tell  where it's been.
The last LR address seems to come out wild, in no memory region.  Just goes
into the weeds and I can't tell why.  Other times, TCP just stops working
while CPU is not crashed and PINGs still keep working.

- If I compile with all lwIP debug/console output OFF, ping works forever.
- If I compile with all lwIP debug/console output ON, ping crashes in the
2nd quad.
I think this must be due to too much output in the console to deal with.

 - If I compile with all lwIP debug/console output OFF, TCP/HTTP works on
1st page refresh,
on 2nd refresh nothing.  I don't even see a SYN/ACK from lwIP.  But, code is
still running!
I can PING again after that over and over just fine.  Yet TCP has stopped
working.

 Results after 1st page refresh....

 CON>:::::::::::::
CON>Console Start
CON>:::::::::::::
CON>Starting lwIP, StaticIP 192.168.2.1
CON>netif_set_ipaddr: netif address being changed
CON>netif: IP address of interface  set to 192.168.2.1
CON>netif: netmask of interface  set to 255.255.255.0
CON>netif: GW address of interface  set to 0.0.0.0
CON>raw_new
CON>HTTP Server Started
CON>ASSERT: Assert Test
CON>ASSERT: Error Test
CON>tcp_enqueue: queuelen: 0
CON>tcp_enqueue: 1 (after enqueued)
CON>tcp_receive: queuelen 1 ...
CON>0 (after freeing unacked)
CON>tcp_enqueue: queuelen: 0
CON>tcp_enqueue: 4 (after enqueued)
CON>tcp_receive: queuelen 4 ...
CON>2 (after freeing unacked)
CON>tcp_enqueue: queuelen: 2
CON>tcp_enqueue: 3 (after enqueued)
CON>tcp_receive: queuelen 3 ...
CON>1 (after freeing unacked)
CON>tcp_receive: queuelen 1 ...
CON>0 (after freeing unacked)
CON>tcp_enqueue: queuelen: 0
CON>tcp_enqueue: 1 (after enqueued)
CON>tcp_receive: queuelen 1 ...
CON>0 (after freeing unacked)
CON>tcp_enqueue: queuelen: 0
CON>tcp_enqueue: 2 (after enqueued)
CON>tcp_receive: queuelen 2 ...
CON>0 (after freeing unacked)
CON>tcp_enqueue: queuelen: 0
CON>tcp_enqueue: 1 (after enqueued)
CON>tcp_receive: queuelen 1 ...
CON>0 (after freeing unacked)
CON>

 ETHARP
         CON>xmit: 1
         CON>rexmit: 0
         CON>recv: 0
         CON>fw: 0
         CON>drop: 0
         CON>chkerr: 0
         CON>lenerr: 0
         CON>memerr: 0
         CON>rterr: 0
         CON>proterr: 0
         CON>opterr: 0
         CON>err: 0
         CON>cachehit: 22
 CON>
 IP_FRAG
         CON>xmit: 0
         CON>rexmit: 0
         CON>recv: 0
         CON>fw: 0
         CON>drop: 0
         CON>chkerr: 0
         CON>lenerr: 0
         CON>memerr: 0
         CON>rterr: 0
         CON>proterr: 0
         CON>opterr: 0
         CON>err: 0
         CON>cachehit: 0
 CON>
 ICMP
         CON>xmit: 0
         CON>rexmit: 0
         CON>recv: 0
         CON>fw: 0
         CON>drop: 0
         CON>chkerr: 0
         CON>lenerr: 0
         CON>memerr: 0
         CON>rterr: 0
         CON>proterr: 0
         CON>opterr: 0
         CON>err: 0
         CON>cachehit: 0
 CON>
 UDP
         CON>xmit: 0
         CON>rexmit: 0
         CON>recv: 0
         CON>fw: 0
         CON>drop: 0
         CON>chkerr: 0
         CON>lenerr: 0
         CON>memerr: 0
         CON>rterr: 0
         CON>proterr: 0
         CON>opterr: 0
         CON>err: 0
         CON>cachehit: 0
 CON>
 TCP
         CON>xmit: 7
         CON>rexmit: 0
         CON>recv: 12
         CON>fw: 0
         CON>drop: 0
         CON>chkerr: 0
         CON>lenerr: 0
         CON>memerr: 0
         CON>rterr: 0
         CON>proterr: 0
         CON>opterr: 0
         CON>err: 0
         CON>cachehit: 0
 CON>
 MEM HEAP
         CON>avail: 8192
         CON>used: 0
         CON>max: 3168
         CON>err: 0
 CON>
 MEM RAW_PCB
         CON>avail: 4
         CON>used: 1
         CON>max: 1
         CON>err: 0
 CON>
 MEM UDP_PCB
         CON>avail: 4
         CON>used: 0
         CON>max: 0
         CON>err: 0
 CON>
 MEM TCP_PCB
         CON>avail: 31
         CON>used: 2
         CON>max: 2
         CON>err: 0
 CON>
 MEM TCP_PCB_LISTEN
         CON>avail: 3
         CON>used: 1
         CON>max: 1
         CON>err: 0
 CON>
 MEM TCP_SEG
         CON>avail: 32
         CON>used: 0
         CON>max: 2
         CON>err: 0
 CON>
 MEM REASSDATA
         CON>avail: 5
         CON>used: 0
         CON>max: 0
         CON>err: 0
 CON>
 MEM ARP_QUEUE
         CON>avail: 6
         CON>used: 0
         CON>max: 0
         CON>err: 0
 CON>
 MEM PBUF_REF/ROM
         CON>avail: 33
         CON>used: 0
         CON>max: 2
         CON>err: 0
 CON>
 MEM PBUF_POOL
         CON>avail: 20
         CON>used: 0
         CON>max: 2
         CON>err: 0
 CON>

 This is after 1st page refresh, good...

 238 4940.471020 192.168.2.10 192.168.2.1 TCP rbakcup1 > http [SYN] Seq=0
Win=25200 Len=0 MSS=1460
239 4940.471465 192.168.2.1 192.168.2.10 TCP http > rbakcup1 [SYN, ACK]
Seq=0 Ack=1 Win=2048 Len=0 MSS=1460
240 4940.471569 192.168.2.10 192.168.2.1 TCP rbakcup1 > http [ACK] Seq=1
Ack=1 Win=25200 Len=0
241 4940.472151 192.168.2.10 192.168.2.1 HTTP GET /index.html HTTP/1.1 242
4940.473975 192.168.2.1 192.168.2.10 TCP http > rbakcup1 [ACK] Seq=1 Ack=389
Win=2048 Len=0
243 4940.475880 192.168.2.1 192.168.2.10 TCP [TCP segment of a reassembled
PDU]
244 4940.605088 192.168.2.10 192.168.2.1 TCP rbakcup1 > http [ACK] Seq=389
Ack=1461 Win=25200 Len=0
245 4940.606835 192.168.2.1 192.168.2.10 TCP [TCP segment of a reassembled
PDU]
246 4940.606876 192.168.2.1 192.168.2.10 HTTP HTTP/1.0 200 OK  (text/html)
247 4940.606978 192.168.2.10 192.168.2.1 TCP rbakcup1 > http [ACK] Seq=389
Ack=1639 Win=25023 Len=0
248 4940.608953 192.168.2.10 192.168.2.1 TCP rbakcup1 > http [FIN, ACK]
Seq=389 Ack=1639 Win=25023 Len=0
249 4940.610805 192.168.2.1 192.168.2.10 TCP http > rbakcup1 [ACK] Seq=1639
Ack=390 Win=2047 Len=0


 This is all I get on the 2nd refresh attempt.  There is no lwIP ACK to the
SYN, yet CPU is not crashed,
 and PINGs still work.  But no more TCP.

 3381 149409.829866 192.168.2.10 192.168.2.1 TCP unisql > http [SYN] Seq=0
Win=25200 Len=0 MSS=1460
3382 149412.828834 192.168.2.10 192.168.2.1 TCP unisql > http [SYN] Seq=0
Win=25200 Len=0 MSS=1460








reply via email to

[Prev in Thread] Current Thread [Next in Thread]