lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] problems with pbuf alloc


From: schulz, marco
Subject: [lwip-users] problems with pbuf alloc
Date: Wed, 26 May 2004 15:51:53 +0200

Hi group,

 

I am using LWIP v0.5.3 with uCOS/II.

 

I have made a small program using the RAW API that listens for an incoming TCP connection and then it sends 1000 Bytes of random data when it receives a “GET” command from the remote host.

The remote host sends the “GET” command every 100ms. This should simulate somehow a streaming data transfer.

 

After a certain amount of packets the transmission simply stops. When I print out some debug information I can observe that the transmission stops due to a problem with the PBUF ALLOCATION.

Below I have printed the debug information of the two last requested data packets. The packet (1) was o.k. but for packet (2) the tcp_output could not allocate a PBUF.

 

Is there anything known about such problems or does anybody have a solution for this.

 

For me it seems that deallocated PBUF memory is not used anymore for the allocation of new PBUFs and therefore program is running out of memory.

 

 

(1)        +-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags PSH ACK -+-+-+-+-+-+-+-+-+-+-+-+-+

-+

State: ESTABLISHED

tcp_receive: ACK for 657697, unacked->seqno 656697:657697

tcp_receive: removing 656697:657697 from pcb->unacked

tcp_receive: queuelen 2 ... 0 (after freeing unacked)

[myTCPsent]  1000 Bytes acked

 

tcp_output: sending ACK for 3687872875

pbuf_header: old 74088 new 74074 (20)

pbuf_header: old 74074 new 74060 (20)

pbuf_header: old 74060 new 74052 (14)

tcp_recved: recveived 3 bytes, wnd 1460 (0).

[myTCPrecv]  652 x GET command received, creating data...

[myTCPsend]  BUF: 5840

tcp_enqueue: 0

pbuf_header: old 74088 new 74074 (20)

tcp_enqueue: queueing 657697:658697 (0x0)

tcp_enqueue: 2 (after enqueued)

[myTCPsend]  1000 Bytes gesendet

[myTCPrecv]  RETURN FROM SENDING

tcp_output_segment: 657697:658697

pbuf_header: old 74074 new 74060 (20)

pbuf_header: old 74060 new 74052 (14)

State: ESTABLISHED

pbuf_header: old 740a4 new 740b2 (-14)

pbuf_header: old 740b2 new 740c6 (-20)

pbuf_header: old 740c6 new 740da (-20)

(2)        +-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags PSH ACK -+-+-+-+-+-+-+-+-+-+-+-+-+-+

State: ESTABLISHED

tcp_receive: ACK for 658697, unacked->seqno 657697:658697

tcp_receive: removing 657697:658697 from pcb->unacked

tcp_receive: queuelen 2 ... 0 (after freeing unacked)

[myTCPsent]  1000 Bytes acked

 

tcp_output: (ACK) could not allocate pbuf

tcp_recved: recveived 3 bytes, wnd 1460 (0).

[myTCPrecv]  653 x GET command received, creating data...

[myTCPsend]  BUF: 5840

tcp_enqueue: 0

tcp_enqueue: could not allocate memory for header pbuf

tcp_enqueue: 0 (with mem err)

send_data: error Out of memory error. len 1000 5840

[myTCPsend]  1000 Bytes gesendet

[myTCPrecv]  RETURN FROM SENDING

tcp_output: nothing to send

State: ESTABLISHED

 

 

Thanks, M.Schulz.

 

****************************************

Dipl.-Ing. (FH) Marco Schulz

IPHT Jena

Dept. Quantum Electronics

Albert-Einstein-Str. 9

07745 Jena

 

Phone: +49 3641 206118

FAX:    +49 3641 206199

****************************************

 


reply via email to

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