Overview
| Artifact ID: | 2a54fc0cdb52f7aa63a19cc6c119bb2d96e07c8f |
|---|---|
| Ticket: | 1555698fffffffffffffffffffffffffffffffff
socket name corruption |
| User & Date: | matben on 2006-09-10 09:04:01 |
Changes
- assignee changed to: "andreas_kupries"
- cmimetype changed to: "text/plain"
- comment changed to:
I was getting weird errors while experimenting with Pats dns package using the code below. What it does is essentially open a tcp socket async to the dns port (53), gets some stuff, and invokes a callback while its socket is still open. In the callback I open another socket async but the writable handler is never invoked if I do dns::cleanup on the dns token (which closes socket). It turned out that the second socket created is identical to the already open one!!! The debug output looks essentially: ---> cb ::dns::1 ... ::dns::1(sock) = sock12 ... socket=sock12 Two different open sockets with identical names!!! This happens consistently on MacOS 10.2.8 Tcl 8.4.9 (sorry for not having a more recent one). I have tested WinXP using 8.4.12 (I guess) and it happened once, and then I couldn't reproduce it anymore. Ideas? Mats package require dns proc cb {token} { global s puts "---> cb $token" parray $token set s [socket -async google.com 80] fconfigure $s -blocking 0 fileevent $s writable writable puts "\t socket=$s" # Try with and without cleanup. dns::cleanup $token } proc writable {args} { global s puts "+++> writable s=$s" close $s } dns::resolve google.com -command cb -protocol tcp - foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "matben"
- subsystem changed to: "24. Channel Commands"
- title changed to: "socket name corruption"
- type changed to: "Bug"