lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] [lwip] Assert failure


From: Kieran Mansley
Subject: [lwip-users] [lwip] Assert failure
Date: Wed, 08 Jan 2003 22:03:17 -0000

I'm developing lwIP for what is, I expect, a rather different application
to most - high performance low latency LANs.  I don't expect to be able to
use lwIP as it stands (in fact I will probably have to reimplement large
portions of it to achieve the performance we require) as it's been
designed with very different applications in mind, but its clean code and
lightweight nature make it an excellent choice (so far!) to base a new
stack on.

So, to this end I've been busy porting it to our network environment
(running on Linux, but not using any tun/tap stuff - accessing the network
driver directly).  The application I've been using to test development is
ttcp, so I'm using the socket-style interface to access the stack from the
application.  All is well so far.  However, the stack is falling over
an assert when it tries to transmit a second packet (first one in each
direction is fine):

Assertion "tcp_enqueue: valid queue length" failed at line 181 in
src/core/tcp_output.c

This is due to pcb->snd_queuelen being 1, while pcb->unacked and
pcb->unsent are both NULL.

I've grunged through the internals of the code, and think I may have found
the cause of this.  I'm hoping it's a bug in the lwIP code anyway, as I
don't see how I could misuse the stack to cause a inconsitency in its
internal state such as this.

The offending code is in tcp_process().  In the "case SYN_SENT" section an
item from the pcb->unacked list is removed and freed, but snd_queuelen is
not updated to reflect this.  Is this correct, or should it be updating
its internal state at this point as I suspect?

If this is not the cause, then any other suggestions would be gratefully
received.

Kieran

[This message was sent through the lwip discussion list.]




reply via email to

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