lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Underflow problem when reconnecting multiple times.


From: Fabian Schneider
Subject: Re: [lwip-users] Underflow problem when reconnecting multiple times.
Date: Tue, 2 Aug 2016 15:35:20 +0200

Hello again,
>Which website are you talking about??
http://lists.nongnu.org/archive/html/lwip-users/2016-08/msg00010.html

>Did you realize this is a different error? It's now an overflow, the summary 
>states an underflow.
I did not, it seems the error has somehow switched from an underflow from the last post to a overflow this time.
But i cannot explain either as i only retry the connection after a failed connection and no other functions are called.
After rechecking the errors, it seems i get both errors simultaniously.

Assertion "detected memp overflow in pool 0" failed at line 262 in ../lwip/src/core/memp.c
Assertion "detected memp underflow in pool 0" failed at line 307 in ../lwip/src/core/memp.c

>No. Not closing might not fix your problem, but when tcp_err is called, you 
>MUST NOT use
>the pcb for anything since it is already deallocated. This is clearly 
>documented both in rawapi.txt
>and in the sources.
As written in the email you replied to the pcb does not get used on the tcp_err call.
This means i do not close, open or do anything else on the tcp_err.
A new connection is made after a while and retried but this is not called through tcp_err.

-A pcb is made, and tries to connect.
-pcb fails to connect tcp_err is called (integer variable changes to represent fail).
-fail detected and new pcb is made after some time, tries to connect
-pcb fails.
-after multiple retries both an underflow and overflow assert happen and application crashes

Fabian


----------------------------------------------------------

Hello Sergio,

A quick note, it seems that the Reply button on the website does not work with gmail (only internet explorer actually responded to the mailto link but did not let me send anything).
As I do not use email client software I had to reply by sending this email to lwip-users again.

As I noted in the email I sent previously, I have tried many ways of closing the connection.
Not closing it on a tcp_err call is one of those ways.
When not closing the connection on tcp_err I receive the same error:
Assertion "detected memp overflow in pool 0" failed at line 262 in ../lwip/src/core/memp.c

Also when I try to connect to the webserver after 1 failed connection the watchdog gets triggered and the system reboots.

I have to conclude that closing the connection on a tcp_err is not the problem.

--------------------------------------------------------------

Hi everyone,

I have a question about a problem i've been having but cannot find the source of.

I've written a simple program that should connect to a server and transmit any data it gets from the OS to it. When the connection fails to establish it should simply close the connection and try again.
To do this i disable all callbacks and close the connection on either a close call from the OS or an tcp_err call.
After this i make a new pcb with tcp_new, rebind and try to connect again.

This works a few times but after failing to connect multiple times, i get the following error:
Assertion "detected memp underflow in pool 0" failed at line 307 in ../lwip/src/core/memp.c

I have tried closing and retrying the connection in many different ways, including not closing the connection and only doing so on a tcp_poll call. Yet i cannot seem to find the exact cause of the issue.
I also have an FTP and Web server running on this device that work without any issues.

I am using a single threaded custom OS with lwip 1.4.1 in raw mode. 

My question is. Is it clear to anyone what the problem could be,
Is there an issue with the way i close the connection or re-open it?

Thank you all very much,

Fabian

2016-08-02 12:05 GMT+02:00 Fabian Schneider <address@hidden>:
Hello Sergio,

A quick note, it seems that the Reply button on the website does not work with gmail (only internet explorer actually responded to the mailto link but did not let me send anything).
As I do not use email client software I had to reply by sending this email to lwip-users again.

As I noted in the email I sent previously, I have tried many ways of closing the connection.
Not closing it on a tcp_err call is one of those ways.
When not closing the connection on tcp_err I receive the same error:
Assertion "detected memp overflow in pool 0" failed at line 262 in ../lwip/src/core/memp.c

Also when I try to connect to the webserver after 1 failed connection the watchdog gets triggered and the system reboots.

I have to conclude that closing the connection on a tcp_err is not the problem.


Fabian


reply via email to

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