Artifacts Associated With Ticket 557878ffffffffff
Ticket change [98a3905baf] (rid 110644) by nobody on 2002-05-19 06:18:41:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The bug affects Tcl 8.3.2 - 8.4a5 When a server socket is created and "fconfigure $sock -encoding binary" is used the server fails to call the proc specified in the socket -server command. The end result is that client sockets fail to be able to connect. This problem doesn't affect Unix-like (OpenBSD 3.0) systems from the tests that I've run. I and another person were able to verify that it fails in Windows. I tested it with Windows XP. Now, I know that fconfiguring a server socket is apparently pointless as DKF put it I believe, but it is a bug nonetheless.
- foundin initialized to: "obsolete: 8.4a5"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "16. Commands A-H"
- title initialized to: "server fails with -encoding binary"
- type initialized to: "Bug"
Ticket change [5ddf97443d] (rid 115542) by dkf on 2002-05-20 16:26:52:
- assignee changed to: "andreas_kupries"
- subsystem changed to: "25. Channel System"
Ticket change [b00279b236] (rid 97914) by dgp on 2002-05-21 01:50:51:
- subsystem changed to: "27. Channel Types"
Ticket change [fa8dd58ee6] (rid 91895) by andreas_kupries on 2002-05-22 00:25:32:
- priority changed to: "7 High"
Ticket change [bc86485c2f] (rid 101764) by andreas_kupries on 2002-05-22 01:28:55:
- priority changed to: "8"
Ticket change [991424b1eb] (rid 110724) by andreas_kupries on 2002-05-25 00:32:33:
- icomment:
Logged In: YES user_id=75003 Confirmed for Win2K.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [a0f291b283] (rid 96898) by andreas_kupries on 2002-05-25 00:35:41:
- icomment:
Logged In: YES user_id=75003 Actually setting any encoding, even the encoding reported back by fconfigure will cause the problem. In other words, the problem is not so much in the specific encoding chosen, but the act of performing the reconfiguration of the server socket.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [217985b200] (rid 130588) by andreas_kupries on 2002-05-25 01:26:58:
- icomment:
Logged In: YES user_id=75003 Yep. What happens is this: When the server socket is reconfigured the system will call TcpWatchProc in tclWinSock.c to update for which events to look. Adding some tracing statements to this routine we see: $ ./bin/tclsh84s.exe % fconfigure [set a [socket -server hoo 0]] -sockname 0.0.0.0 0.0.0.0 1143 % fconfigure $a -encoding 1143 unknown encoding "1143" % fconfigure $a -encoding binary FD_READ = 001 FD_WRITE = 002 FD_CLOSE = 032 FD_ACCEPT = 008 FD_CONNECT = 016 watch = 008 select = 008 watch/new = 000 select/new = 008 watch determines which events are watched by windows for the handle, and ACCEPT is the event sent if a new connection arrives on the socket. As we can see the ACCEPT is cleared completely. This is because the server socket is neither readable nor writable. Unix systems are not affected because they check if an acceptProc is set (tclUnixChan.c, line 2354, TcpWatchProc) and avoid messing with the masks and events if that it so. We have to perform the same check for Windows. The mechanism on Mac is unclear. This means that this report has to be given to the mac maintainers to make sure that this bug is not present for that platform too.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [bf93297065] (rid 102272) by andreas_kupries on 2002-05-25 01:54:30:
- icomment:
File Added - 23688: 557878.diff Logged In: YES user_id=75003 Attaching a patch.
- login: "andreas_kupries"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- username: "andreas_kupries"
- icomment:
Add attachment "557878.diff" [9af03b02bc] (rid 111038) by andreas_kupries on 2002-05-25 01:54:30.
Ticket change [ca46cbb709] (rid 122437) by andreas_kupries on 2002-05-25 02:06:07:
- closedate changed to: "2002-05-24T19:06:07"
- closer changed to: "andreas_kupries"
- icomment:
Logged In: YES user_id=75003 Patch committed.
- login: "andreas_kupries"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "andreas_kupries"