Hi
I added check for CLOSING state in tcp.c, with this patch the pcb is freed
/* Check if this PCB has stayed too long in LAST-ACK */
if (pcb->state == LAST_ACK) {
if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL /
TCP_SLOW_INTERVAL) {
++pcb_remove;
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in
LAST-ACK\n"));
}
}
+ /* Check if this PCB has stayed too long in CLOSING */
+ if (pcb->state == CLOSING) {
+ if ((u32_t)(tcp_ticks - pcb->tmr) >
+ TCP_CLOSING_TIMEOUT / TCP_SLOW_INTERVAL) {
+ ++pcb_remove;
+ LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in
CLOSING\n"));
+ }
+ }
/* If the PCB should be removed, do it. */
/Med vänlig hälsning/Best Regards
Jan Wester
/
/_________________________________ /
/**WHI Konsult AB**/
/Scheelegatan 11, 112 28 Stockholm//, //Sweden
//www.whi.se/ <http://www.whi.se/>
/address@hidden <mailto:address@hidden>/
/+46 8 449 05 30/
------------------------------------------------------------------------
*Från:* address@hidden
[mailto:address@hidden *För *Jan Wester
*Skickat:* den 5 december 2007 17:16
*Till:* 'Mailing list for lwIP users'
*Ämne:* SV: SV: [lwip-users] Re: TCP_SEG Leak ...
Ok
I try to fix the closing first. Take a look on it tomorrow
/Med vänlig hälsning/Best Regards
Jan Wester
/
/_________________________________ /
/**WHI Konsult AB**/
/Scheelegatan 11, 112 28 Stockholm//, //Sweden
//www.whi.se/ <http://www.whi.se/>
/address@hidden <mailto:address@hidden>/
/+46 8 449 05 30/
------------------------------------------------------------------------
*Från:* address@hidden
[mailto:address@hidden *För
address@hidden
*Skickat:* den 5 december 2007 17:10
*Till:* Mailing list for lwIP users
*Kopia:* address@hidden;
'Mailing list for lwIP users'
*Ämne:* Re: SV: [lwip-users] Re: TCP_SEG Leak ...
Could you add a routine that checks for "all PCB is in CLOSING state"
and issue a reset to the micro?
Not a good solution for the long term (obviously lwip needs fix), but
it would at least keep the system available for the short term.
Andy
*"Jan Wester" <address@hidden>*
Sent by: address@hidden
12/05/2007 11:07 AM
Please respond to
Mailing list for lwIP users <address@hidden>
To
"'Mailing list for lwIP users'" <address@hidden>
cc
Subject
SV: [lwip-users] Re: TCP_SEG Leak ...
Ok,
I found it in my changelog
Still not working, sometimes the last ack disappears and on close the
pcb state is changed to CLOSING, forever
After a while all pcb is in CLOSING state and I have to reset the system
/Med vänlig hälsning/Best Regards
Jan Wester/
/_________________________________ /
*/WHI Konsult AB/*
/Scheelegatan 11, 112 28 Stockholm, Sweden/_
_/_www.whi.se_/ <http://www.whi.se/>/_
_//address@hidden/ <mailto:address@hidden>/
+46 8 449 05 30/
------------------------------------------------------------------------
*Från:* address@hidden
[mailto:address@hidden *För
*Goldschmidt Simon*
Skickat:* den 5 december 2007 16:33*
Till:* Mailing list for lwIP users*
Ämne:* AW: [lwip-users] Re: TCP_SEG Leak ...
_http://cvs.savannah.nongnu.org/viewvc/lwip/CHANGELOG?root=lwip&r1=1.267&r2=1.268_
<http://cvs.savannah.nongnu.org/viewvc/lwip/CHANGELOG?root=lwip&r1=1.267&r2=1.268>
------------------------------------------------------------------------
*Von:* address@hidden
[mailto:address@hidden
*Im Auftrag von *Jan Wester*
Gesendet:* Mittwoch, 5. Dezember 2007 16:26*
An:* 'Mailing list for lwIP users'*
Betreff:* SV: [lwip-users] Re: TCP_SEG Leak ...
Sorry about the version, I use 1.3.0,
Ok, I have downloaded the latest cvs head, but nothing was mentioned
in the changelog
I shall start to test to see if it works
/Med vänlig hälsning/Best Regards
Jan Wester/
/_________________________________ /
*/WHI Konsult AB/*
/Scheelegatan 11, 112 28 Stockholm, Sweden/_
_/_www.whi.se_/ <http://www.whi.se/>/_
_//address@hidden/ <mailto:address@hidden>/
+46 8 449 05 30/
------------------------------------------------------------------------
*Från:* address@hidden
[mailto:address@hidden *För
*Goldschmidt Simon*
Skickat:* den 5 december 2007 15:58*
Till:* Mailing list for lwIP users*
Ämne:* RE: [lwip-users] Re: TCP_SEG Leak ...
Hi,
the fix for this bug is included in CVS head. I can't send you 'a fix'
since I would have to create one for your lwIP version (by backporting
it to the version of lwIP you use). You can either download a CVS
version of lwIP ('pretty stable' at the moment... - no guarantee for
that, though!), wait until 1.3.0 is released, or backport it yourself
by looking at the latest diffs to tcp.c and tcp_in.c in WebCVS.
Simon
------------------------------------------------------------------------
*Von:* address@hidden
[mailto:address@hidden
*Im Auftrag von *Jan Wester*
Gesendet:* Mittwoch, 5. Dezember 2007 15:51*
An:* address@hidden; 'Mailing list for lwIP users'*
Betreff:* SV: [lwip-users] Re: TCP_SEG Leak ...
Hi
Can you send me the fix for ooseq, I belive I have the same problem
with my webserver with more simultane connections
/Med vänlig hälsning/Best Regards
Jan Wester/
/_________________________________ /
*/WHI Konsult AB/*
/Scheelegatan 11, 112 28 Stockholm, Sweden/_
_/_www.whi.se_/ <http://www.whi.se/>/_
_//address@hidden/ <mailto:address@hidden>/
+46 8 449 05 30/
------------------------------------------------------------------------
*Från:* address@hidden
[mailto:address@hidden *För *Thomas
Catalino*
Skickat:* den 3 december 2007 02:33*
Till:* address@hidden
Ämne:* [lwip-users] Re: TCP_SEG Leak ...
Simon -
Thanks for confirming the bug. We'll put a patch in our code for now
and will watch the bug for the real fix. Let me know if I can help, I
would have suggested a fix, but I'm not familiar enough with the ooseq
processing in the stack.
As you can imagine this is eventually fatal -- especially for
applications that make / break a lot of TCP connections (we do a lot
of HTTP GETs and POSTs and is how we discovered it).
Thanks again -
Tom
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users
------------------------------------------------------------------------
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.16.15/1174 - Release Date: 06.12.2007 10:11