lwip-users
[Top][All Lists]
Advanced

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

SV: SV: [lwip-users] Re: TCP_SEG Leak ...


From: Jan Wester
Subject: SV: SV: [lwip-users] Re: TCP_SEG Leak ...
Date: Thu, 6 Dec 2007 12:29:37 +0100

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
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
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
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


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
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
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



reply via email to

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