[bug #37271] endless loop seg = pcb->unacked; seg->next != NULL; seg = seg->next

[bug #37271] endless loop seg = pcb->unacked; seg->next != NULL; seg = seg->next

classic Classic list List threaded Threaded
5 messages  Options  Options 
Reply  |  Threaded  |  More 

[bug #37271] endless loop seg = pcb->unacked; seg->next != NULL; seg = seg->next

Simon Goldschmidt-2
11085 posts
URL: 
  < http://savannah.nongnu.org/bugs/?37271

                 Summary: endless loop seg = pcb->unacked; seg->next != NULL; 
seg = seg->next 
                 Project: lwIP - A Lightweight TCP/IP stack 
            Submitted by: digkleppe 
            Submitted on: Wed 05 Sep 2012 06:50:42 AM GMT 
                Category: TCP 
                Severity: 3 - Normal 
              Item Group: Crash Error 
                  Status: None 
                 Privacy: Public 
             Assigned to: None 
             Open/Closed: Open 
         Discussion Lock: Any 
         Planned Release: 
            lwIP version: 1.4.0 

    _______________________________________________________ 

Details: 

In tcp_out.c line 928 
After stressing the stack sometimes an endless loop is entered: 
 for (; useg->next != NULL; useg = useg->next); 

when useg->next= useg 

line 1248: 
 for (seg = pcb->unacked; seg->next != NULL; seg = seg->next); 

seg->next = seg 

I have no problems with mem( LWIPstats has no errors); 

Dig Kleppe 
  





    _______________________________________________________ 

File Attachments: 


------------------------------------------------------- 
Date: Wed 05 Sep 2012 06:50:42 AM GMT  Name: lwipopts.h  Size: 20kB   By: 
digkleppe 

< http://savannah.nongnu.org/bugs/download.php?file_id=26473

    _______________________________________________________ 

Reply to this item at: 

  < http://savannah.nongnu.org/bugs/?37271

_______________________________________________ 
  Message sent via/by Savannah 
   http://savannah.nongnu.org/


_______________________________________________ 
lwip-devel mailing list 
[hidden email] 
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply  |  Threaded  |  More 

[bug #37271] endless loop seg = pcb->unacked; seg->next != NULL; seg = seg->next

Simon Goldschmidt-2
11085 posts
Follow-up Comment #1, bug #37271 (project lwip): 

When I have been stuck in this loop, it has been my doing and not a bug in 
lwIP.  In my experience this was caused by memory corruption, multiple freeing 
of pbufs, or using an already freed pbuf. 

Maybe in the stressing the Ethernet driver is doing something bad? 

    _______________________________________________________ 

Reply to this item at: 

  < http://savannah.nongnu.org/bugs/?37271

_______________________________________________ 
  Message sent via/by Savannah 
   http://savannah.nongnu.org/


_______________________________________________ 
lwip-devel mailing list 
[hidden email] 
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply  |  Threaded  |  More 

[bug #37271] endless loop seg = pcb->unacked; seg->next != NULL; seg = seg->next

Simon Goldschmidt-2
11085 posts
Update of bug #37271 (project lwip): 

                  Status:                    None => Need Info               

    _______________________________________________________ 

Follow-up Comment #2: 

I can only agree to comment #1: having a loop in the TCP pcbs or segments is 
most often a bug in the lwIP port (most often violating lwIP's threading 
requirement of "only one context may be active in lwIP at a time"). 

Can you rule this out for sure? I don't want to say lwIP can't have bugs, but 
for this kind of bug, please make sure it's not your port! 

> I have no problems with mem( LWIPstats has no errors); 

That does not mean anything: I wouldn't relate memory errors to this in any 
way. 

    _______________________________________________________ 

Reply to this item at: 

  < http://savannah.nongnu.org/bugs/?37271

_______________________________________________ 
  Nachricht gesendet von/durch Savannah 
   http://savannah.nongnu.org/


_______________________________________________ 
lwip-devel mailing list 
[hidden email] 
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply  |  Threaded  |  More 

[bug #37271] endless loop seg = pcb->unacked; seg->next != NULL; seg = seg->next

Simon Goldschmidt-2
11085 posts
Follow-up Comment #3, bug #37271 (project lwip): 

I finally found the problem: 
When I disabled the pre-emptive option of the RTOS it was running fine. So I 
thought it must have something to do with task prio's. 

I lowered the priority of "feeding" the stack with received data. 
Now it runs perfect without any problem. 
Thanks for the support! 
Dig 




    _______________________________________________________ 

Reply to this item at: 

  < http://savannah.nongnu.org/bugs/?37271

_______________________________________________ 
  Message sent via/by Savannah 
   http://savannah.nongnu.org/


_______________________________________________ 
lwip-devel mailing list 
[hidden email] 
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply  |  Threaded  |  More 

[bug #37271] endless loop seg = pcb->unacked; seg->next != NULL; seg = seg->next

Simon Goldschmidt-2
11085 posts
Update of bug #37271 (project lwip): 

                  Status:               Need Info => Invalid                 
             Assigned to:                    None => goldsimon               
             Open/Closed:                    Open => Closed                 

    _______________________________________________________ 

Follow-up Comment #4: 

Alright, closing as invalid then. 

    _______________________________________________________ 

Reply to this item at: 

  < http://savannah.nongnu.org/bugs/?37271

_______________________________________________ 
  Message sent from/by Savannah 
   http://savannah.nongnu.org/


________________________________________________ 
lwip-devel mailing list 
[hidden email]  
https://lists.nongnu.org/mailman/listinfo/lwip-devel
«  Return to lwip-devel   |   203 views

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325892083&siteId=291194637