Re: tcludp - bug when closing 1-of-2 listening ports
- From: Alexandre Ferrieux <alexandre.ferrieux@xxxxxxxxx>
- Date: Sun, 2 Nov 2008 17:55:52 -0800 (PST)
On Nov 3, 2:07 am, Alexandre Ferrieux <alexandre.ferri...@xxxxxxxxx>
wrote:
If I were to guess, I'd say something like a zero-length UDP packet...
but who knows ?
Update 2: I think I have a better characterization of the behavior
now.
It is indeed linked with zero-sized UDP packets.
I have found a deterministic way of producing them (as witnessed by
Wireshark when sending over the LAN):
% set s [udp_open]
% fconfigure $s -remote {somemachine 3000} -buffering none
% puts -nonewline $s titi
% puts -nonewline $s titi
% puts -nonewline $s titi
% close $s
This sends 3 normal UDP packets + 1 zero-sized.
Notice that all this is at interactive speed (no race condition), and
that three 'titi' are needed (two are not enough). Now combined with
your receiver, sending an "exit" packet then a zero-sized one, this
locks the receiving code, somewhere inside the intricate tcludp
machinery,
Several observations:
(1) The speed of the sending sequence has no effect (contrarily to my
first impression)
(2) The zero-sized packet wreaks havoc in tcludp only if it comes on
a closed socket (your case)
(3) Tcludp is not supposed to send zero-sized UDP packets
(4) However it should handle them gracefully, because some other
source can send them.
So I think we have at least two bugs, one on the write side (producing
zero-sized packets) and one on the read side (locking an internal
thread when these beasts come at the wrong time).
I think you should forward this to the maintainer.
-Alex
.
- Follow-Ups:
- References:
- Re: tcludp - bug when closing 1-of-2 listening ports
- From: Alexandre Ferrieux
- Re: tcludp - bug when closing 1-of-2 listening ports
- From: Vera
- Re: tcludp - bug when closing 1-of-2 listening ports
- From: Neil Madden
- Re: tcludp - bug when closing 1-of-2 listening ports
- From: Alexandre Ferrieux
- Re: tcludp - bug when closing 1-of-2 listening ports
- From: Vera
- Re: tcludp - bug when closing 1-of-2 listening ports
- From: Alexandre Ferrieux
- Re: tcludp - bug when closing 1-of-2 listening ports
- From: Alexandre Ferrieux
- Re: tcludp - bug when closing 1-of-2 listening ports
- Prev by Date: Re: tcludp - bug when closing 1-of-2 listening ports
- Next by Date: doubt in tcl
- Previous by thread: Re: tcludp - bug when closing 1-of-2 listening ports
- Next by thread: Re: tcludp - bug when closing 1-of-2 listening ports
- Index(es):
Relevant Pages
|