buglwIP - A Lightweight TCP/IP stack - Bugs: bug #37271, endless loop seg =...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitted by:  Dig Kleppe <digkleppe>
Submitted on:  Wed 05 Sep 2012 06:50:42 AM UTC  
 
Category: TCPSeverity: 3 - Normal
Item Group: Crash ErrorStatus: Invalid
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: 1.4.0

Thu 22 Nov 2012 05:08:29 PM UTC, comment #4:

Alright, closing as invalid then.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Thu 25 Oct 2012 01:59:12 PM UTC, comment #3:

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

Dig Kleppe <digkleppe>
Thu 06 Sep 2012 07:36:36 PM UTC, 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.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Wed 05 Sep 2012 06:32:23 PM UTC, comment #1:

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?

Bill Auerbach <billauerbach>
Wed 05 Sep 2012 06:50:42 AM UTC, original submission:

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

Dig Kleppe <digkleppe>

 

Attached Files
file #26473:  lwipopts.h added by digkleppe (20KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by billauerbach (Posted a comment)
  • -unavailable- added by digkleppe (Submitted the item)
  • -unavailable- added by digkleppe
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 22 Nov 2012 05:08:29 PM UTCgoldsimonStatusNeed Info=>Invalid
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed
    Thu 06 Sep 2012 07:36:36 PM UTCgoldsimonStatusNone=>Need Info
    Wed 05 Sep 2012 06:50:42 AM UTCdigkleppeAttached File-=>Added lwipopts.h, #26473
      Carbon-Copy-=>Added digkleppe

    Back to the top


    Powered by Savane 3.1-cleanup1