Re: tcludp - bug when closing 1-of-2 listening ports



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

.



Relevant Pages

  • Re: receive delay
    ... UDP packets are used for new mail notifications, or in this case to notify ... the client is requesting the update instead of the server sending a UDP ... right of outlook, also under E-mail accounts the Use Cached mode is ... Something is blocking UDP packets. ...
    (microsoft.public.exchange.admin)
  • Re: Deaf CAsyncSocket on Windows Service.
    ... Note that for UDP, your network stack is free to discard, at any time, for any reason ... correlation between UDP packets sent and UDP packets received, ... UDP does not guarantee delivery, ... If you do a receive of fewer bytes than the UDP message, ...
    (microsoft.public.vc.mfc)
  • blocking for multiple sources
    ... One of my other threads' job is to queue up UDP packets for the main ... But occasionally I may need to have the main thread send a pulse to the ... with a timeout using select, ...
    (comp.os.qnx)
  • HTTPS Tunnel: how-to write...
    ... Our UDP packets are audio and video. ... Is a HTTPTunnel a solution that will enable us to send UDP to and ... server over port 80/433? ...
    (microsoft.public.win32.programmer.networks)
  • Re: tcludp - bug when closing 1-of-2 listening ports
    ... It is indeed linked with zero-sized UDP packets. ... % puts -nonewline $s titi ... So I think we have at least two bugs, one on the write side (producing ... Since you can reproduce the bug, I must not longer search for an PC not updated to XP SP3. ...
    (comp.lang.tcl)