Assertion : "tcp_enqueue: no pbufs on queue => both queues empty"

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Assertion : "tcp_enqueue: no pbufs on queue => both queues empty"

Amir Bukhari-4
I use lwip in a embedded system, one time I have got this the following message:
"tcp_enqueue: no pbufs on queue => both queues empty"
Exactly on this line:
LWIP_ASSERT("tcp_enqueue: no pbufs on queue => both queues empty",
      pcb->unacked == NULL && pcb->unsent == NULL);

in tcp_out.c

what case such assertion?
----------------------------------------------------------
Amir Bukhari
aquintos GmbH * integration experts
Lammstraße 21 * 76133 Karlsruhe * GERMANY
phone: 0721 / 516 38-0
Mobile +49-179-7318737
Mail: [hidden email]
Web: http://www.aquintos.com



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Assertion : "tcp_enqueue: no pbufs on queue => bothqueues empty"

Mumtaz Ahmad
Dear amir

Its most probably the mutiple threading issue.



----- Original Message -----
From: "Amir Bukhari" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, October 31, 2006 2:28 PM
Subject: [lwip-users] Assertion : "tcp_enqueue: no pbufs on queue =>
bothqueues empty"


> I use lwip in a embedded system, one time I have got this the following
message:

> "tcp_enqueue: no pbufs on queue => both queues empty"
> Exactly on this line:
> LWIP_ASSERT("tcp_enqueue: no pbufs on queue => both queues empty",
>       pcb->unacked == NULL && pcb->unsent == NULL);
>
> in tcp_out.c
>
> what case such assertion?
> ----------------------------------------------------------
> Amir Bukhari
> aquintos GmbH * integration experts
> Lammstraße 21 * 76133 Karlsruhe * GERMANY
> phone: 0721 / 516 38-0
> Mobile +49-179-7318737
> Mail: [hidden email]
> Web: http://www.aquintos.com
>
>
>
> _______________________________________________
> lwip-users mailing list
> [hidden email]
> http://lists.nongnu.org/mailman/listinfo/lwip-users



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Assertion : "tcp_enqueue: no pbufs on queue => both queues empty"

Kelvin Lawson
In reply to this post by Amir Bukhari-4
> I use lwip in a embedded system, one time I have got this the following message:
> "tcp_enqueue: no pbufs on queue => both queues empty"
> Exactly on this line:
> LWIP_ASSERT("tcp_enqueue: no pbufs on queue => both queues empty",
>       pcb->unacked == NULL && pcb->unsent == NULL);

I had this problem recently, and it was down to my setting for
TCP_SND_QUEUELEN. This must be less than 256, because the data type used
for storing the queue length (snd_queuelen) is 8 bits. Any larger and
the snd_queuelen counter will overflow.

Hope this helps,
Kelvin.



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Re: Assertion : "tcp_enqueue: no pbufs on queue => both queues empty"

Jonathan Larmour
Kelvin Lawson wrote:

>> I use lwip in a embedded system, one time I have got this the
>> following message:
>> "tcp_enqueue: no pbufs on queue => both queues empty"
>> Exactly on this line:
>> LWIP_ASSERT("tcp_enqueue: no pbufs on queue => both queues empty",
>>       pcb->unacked == NULL && pcb->unsent == NULL);
>
> I had this problem recently, and it was down to my setting for
> TCP_SND_QUEUELEN. This must be less than 256, because the data type used
> for storing the queue length (snd_queuelen) is 8 bits. Any larger and
> the snd_queuelen counter will overflow.

Any developer care to make the obvious quick change? It's probably more
effort overall for a developer if I submitted a patch rather than to just
to do it:
#if (TCP_SND_QUEUELEN > 255)
   u16_t
#else
   u8_t
#endif
   snd_queuelen; /* Available buffer space for sending (in tcp_segs). */

and ditto for queuelen in tcp_enqueue() in tcp_out.c.

But if you prefer I can submit this as a patch.

Jifl
--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
------["The best things in life aren't things."]------      Opinions==mine



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Re: Assertion : "tcp_enqueue: no pbufs on queue => both queues empty"

Pedro Alves-6
Jonathan Larmour wrote:

> Kelvin Lawson wrote:
>
>>> I use lwip in a embedded system, one time I have got this the
>>> following message:
>>> "tcp_enqueue: no pbufs on queue => both queues empty"
>>> Exactly on this line:
>>> LWIP_ASSERT("tcp_enqueue: no pbufs on queue => both queues empty",
>>>       pcb->unacked == NULL && pcb->unsent == NULL);
>>
>>
>> I had this problem recently, and it was down to my setting for
>> TCP_SND_QUEUELEN. This must be less than 256, because the data type
>> used for storing the queue length (snd_queuelen) is 8 bits. Any
>> larger and the snd_queuelen counter will overflow.
>
>
> Any developer care to make the obvious quick change? It's probably
> more effort overall for a developer if I submitted a patch rather than
> to just to do it:
> #if (TCP_SND_QUEUELEN > 255)
>   u16_t
> #else
>   u8_t
> #endif
>   snd_queuelen; /* Available buffer space for sending (in tcp_segs). */
>
> and ditto for queuelen in tcp_enqueue() in tcp_out.c.
>

I'd prefer to see it typedefed in one place, and the typedef used in the
other.

And if TCP_SND_QUEUELEN bigger than 65535 doesn't make sense, add:

#if (TCP_SND_QUEUELEN > 65535)
# error "some error message."
#enidf

> But if you prefer I can submit this as a patch.
>
> Jifl




_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users