lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Problem with freeing tcp segments


From: Michał Gołębiowsk
Subject: [lwip-users] Problem with freeing tcp segments
Date: Thu, 15 Sep 2016 09:13:33 +0200
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

I am using LwIP 1.4.1 from repo, latest commit dated of 2016-02-11.
I have a http server and Modbus TCP based on netconn. Both of them are in different tasks and using different netconn structures. The http server has implemented API and is responding requests made automatically by website 3 times per second.
The problem:
When site is open in browser and modbus client is running and after some time the device starts using all resources to memp_overflow_check_element_overflow() and there is a reset by a watchdog.
If I turn off watchdog the device has frozen and it is looking like in infinite loop.

That is tcp/netconn/memp part of my lwipopts.h:
#define SYS_LIGHTWEIGHT_PROT            1
#define LWIP_TCP                        1
#define LWIP_ICMP                       1
#define LWIP_NETCONN                    1
#define LWIP_SO_SNDTIMEO                1
#define LWIP_SO_RCVTIMEO                1
/*---*/
#define MEMP_OVERFLOW_CHECK             1// 6-7-16 MG
#define MEM_ALIGNMENT                   4
#define MEM_LIBC_MALLOC                 0
#define MEMP_MEM_MALLOC                 0
#define MEM_SIZE                        50000
#define MEMP_SANITY_CHECK               0
#define MEMP_NUM_PBUF                   2000   
#define MEMP_NUM_TCP_PCB                100
#define MEMP_NUM_TCP_PCB_LISTEN         200
#define MEMP_NUM_TCP_SEG                12
#define MEMP_NUM_SYS_TIMEOUT            24
#define MEMP_NUM_NETBUF                 200
#define MEMP_NUM_NETCONN                250
#define PBUF_POOL_SIZE                  2000 //1.08.16 MG
#define PBUF_POOL_BUFSIZE               2000
/*---*/
#define TCP_QUEUE_OOSEQ                 1
#define TCP_MSS                         (1500 - 40)
#define TCP_OVERSIZE                    TCP_MSS
#define TCP_SND_BUF                     (2*TCP_MSS) //2
#define TCP_SND_QUEUELEN                (4 * TCP_SND_BUF/TCP_MSS) //4
#define TCP_WND                         (4*TCP_MSS) //4 3.8.16 MG
#define LWIP_TCPIP_TIMEOUT              0

When I suspend program after fr
eezing It's always in memp_overflow_check_element_overflow() :
(the top is the latest)


Thank you for  your help,
Kindly Regards,
Michał Gołębiowski

reply via email to

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