lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] 0.7.1: Assert fails in tcp_process


From: Tom C. Barker
Subject: RE: [lwip-users] 0.7.1: Assert fails in tcp_process
Date: Mon, 15 Mar 2004 14:50:00 -0800

Thanks for the advice Chris.

I suspected things were getting stepped on somewhere.
I had not thought of the timers.
I'll take a look again at the porting guide.
Thanks again for logging a reply to the list.

Tom Barker


-----Original Message-----
From: Chris Jones [mailto:address@hidden
Sent: Monday, March 15, 2004 2:37 PM
To: Mailing list for lwIP users
Subject: RE: [lwip-users] 0.7.1: Assert fails in tcp_process




Tom,

I had a problem a few weeks ago with #s 2  & 3 below.

In my case, when porting the stack to the C55 DSP, I decided to implement
the timeouts as a seperate thread that was spawned and would sleep until it
was time to execute the callback function.

Well, after many hours of debug, I came to realize that the code in tcpin.c
and tcpout.c is not thread safe, therefore the unacked and unsent queues
were being changed asynchronously to the main tcp thread and it was screwing
things up.

I have since implemented the timeouts according to the porting guide and
things are working. Performance seems to be a dog right now, but I haven't
set about to find out wpslhat is wrong yet.

Hope this helps.

Chris Jones
Engenium Technologies


-----Original Message-----
From: address@hidden
[mailto:address@hidden Behalf
Of Tom C. Barker
Sent: Tuesday, March 09, 2004 7:20 PM
To: 'Mailing list for lwIP users'
Subject: [lwip-users] 0.7.1: Assert fails in tcp_process


Hello,

Could anyone explain why I might consistently be getting any one of
the following failing ASSERTs?

( I would think someone has run into these issues or the ASSERTs
would never have been added.)

Thanks,
Tom

(1) In tcp.c, tcp_slowtmr(), it will fail on pcb->state != TIME_WAIT.

 while (pcb != NULL) {
    LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: processing active pcb\n"));
    LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state !=
CLOSED);
    LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state !=
LISTEN);
    LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state
!= TIME_WAIT);


(2) In tcpin.c, tcp_receive(), it will fail on ( pcb->unacked != NULL ||
pcb->unsent != NULL )

LWIP_DEBUGF(TCP_QLEN_DEBUG, ("%u (after freeing unacked)\n", (unsigned
int)pcb->snd_queuelen));
  if (pcb->snd_queuelen != 0) {
    LWIP_ASSERT("tcp_receive: valid queue length", pcb->unacked != NULL ||
     pcb->unsent != NULL);
  }


(3) In tcpout.c, tcp_enqueue(), it will fail on ( pcb->unacked != NULL ||
pcb->unsent != NULL )
  if (pcb->snd_queuelen != 0) {
    LWIP_ASSERT("tcp_enqueue: valid queue length", pcb->unacked != NULL ||
    pcb->unsent != NULL);
  }



_______________________________________________
lwip-users mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/lwip-users



_______________________________________________
lwip-users mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/lwip-users




reply via email to

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