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

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

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

Amir Bukhari-4

Yes, I have 2 real time task which access the same connection, but one only sends and the second task read and send data.

This case should not case an assertion, its application problem to handle such case, but TCP/IP stack should not be affected with such or I am wrong

What can happened if both queue is embty, does lwip will crash?



-----Ursprüngliche Nachricht-----
Von: lwip-users-bounces+bukhari=[hidden email] [mailto:lwip-users-bounces+bukhari=[hidden email]] Im Auftrag von Mumtaz Ahmad
Gesendet: Dienstag, 31. Oktober 2006 10:37
An: Mailing list for lwIP users
Betreff: Re: [lwip-users] Assertion : "tcp_enqueue: no pbufs on queue =>bothqueues empty"

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


_______________________________________________
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
It happens because  both threads uses pbuf related functions and thats the
main source of such assertions


----- Original Message -----
From: "Amir Bukhari" <[hidden email]>
To: "Mailing list for lwIP users" <[hidden email]>
Sent: Tuesday, October 31, 2006 4:23 PM
Subject: AW: [lwip-users] Assertion : "tcp_enqueue: no pbufs on
queue=>bothqueues empty"


>
> Yes, I have 2 real time task which access the same connection, but one
only sends and the second task read and send data.
>
> This case should not case an assertion, its application problem to handle
such case, but TCP/IP stack should not be affected with such or I am wrong
>
> What can happened if both queue is embty, does lwip will crash?
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: lwip-users-bounces+bukhari=[hidden email]
[mailto:lwip-users-bounces+bukhari=[hidden email]] Im Auftrag von
Mumtaz Ahmad
> Gesendet: Dienstag, 31. Oktober 2006 10:37
> An: Mailing list for lwIP users
> Betreff: Re: [lwip-users] Assertion : "tcp_enqueue: no pbufs on queue
=>bothqueues empty"

>
> 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
>
>
> _______________________________________________
> 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: AW: Assertion : "tcp_enqueue: no pbufs on queue =>bothqueues empty"

Kieran Mansley
In reply to this post by Amir Bukhari-4
On Tue, 2006-10-31 at 12:23 +0100, Amir Bukhari wrote:
> Yes, I have 2 real time task which access the same connection, but one only sends and the second task read and send data.
>
> This case should not case an assertion, its application problem to handle such case, but TCP/IP stack should not be affected with such or I am wrong
>
> What can happened if both queue is embty, does lwip will crash?

Your port of lwIP should ensure that there is only one thread in the
lwIP core code at any one time.  lwIP is not thread safe I'm afraid.
The consequences of having two threads concurrently active in the stack
are many and varied, but all bad.

Kieran



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