Artifacts Associated With Ticket 1618235fffffffff
Ticket change [85f464e311] (rid 131417) by nobody on 2006-12-18 16:41:14:
- assignee initialized to: "hobbs"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Tcl 8.4.14 Suse Linux 9.2 (running as a VMware Workstation 5.5.3 guest OS on a Windows XP Service Pack 2 host OS). > ./configure --enable-threads > make > make test ... ==== http-4.15 http::Event FAILED ... ---- Result was: 1 0 ---- Result should have been (exact matching): 11 When running "make test" with threads enabled (i.e. compiled with "-DTCL_THREADS=1 -DHAVE_GETHOSTBYNAME_R_6=1"), I get the above test failure. This does not happen with Tcl 8.5a6, as I'll explain later. The problem appears to stem from the behavior of gethostbyname_r() (see tcl/unix/tclUnixCompat.c line 589). For my version of Linux (Suse 9.2), gethostbyname_r() returns 0 for both valid and invalid URL's. However, the fifth parameter (struct hostent **RESULT) returns a NULL for invalid URL's. Therefore, a potential fix would be to change "&tsdPtr->hent" on line 591 to use the value returned by the fifth parameter "hePtr", e.g.: return (gethostbyname_r(name, &tsdPtr->hent, tstPtr->hbuf, sizeof(tsdPtr->hbuf), &hePtr, &h_errno) == 0) ? &tsdPtr->hent : NULL; should be: return (gethostbyname_r(name, &tsdPtr->hent, tstPtr->hbuf, sizeof(tsdPtr->hbuf), &hePtr, &h_errno) == 0) ? hePtr : NULL; This problem occurs in Tcl 8.4.14 when threads are enabled because tcl/unix/tclUnixChan.c:CreateSocketAddress() invokes the supposedly thread-safe function tcl/unix/tclUnixCompat.c:TclpGetHostByName(), which then invokes gethostbyname_r() if HAVE_GETHOSTBYNAME_R_6 is defined. This problem does not occur in Tcl 8.5a6 because tclUnixChan.c:CreateSocketAddress() was modified to call the potentially thread-unsafe gethostbyname() function, which may be another problem. Larry Wright [email protected] - foundin initialized to: "obsolete: 8.4.14"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "29. http Package"
- title initialized to: "http.test-4.15 http::Event FAILED"
- type initialized to: "Bug"
Ticket change [770571be07] (rid 105692) by hobbs on 2007-06-11 04:22:15:
- assignee changed to: "vasiljevic"
- priority changed to: "7 High"
Ticket change [526f5816a7] (rid 126316) by lwright-itron on 2007-06-11 20:45:34:
- icomment:
Logged In: YES user_id=1671459 Originator: NO Category should be "Tcl", not "http".
- login: "lwright-itron"
- mimetype: "text/plain"
- username: "lwright-itron"
- icomment:
Ticket change [1673bf3c2a] (rid 124722) by dkf on 2007-06-14 15:58:47:
- assignee changed to: "hobbs"
- priority changed to: "9 Immediate"
- subsystem changed to: "27. Channel Types"
Ticket change [595a2b4dc8] (rid 117964) by hobbs on 2007-11-13 07:35:22:
- assignee changed to: "vasiljevic"
Ticket change [500b4fa370] (rid 125911) by dkf on 2007-11-13 18:24:39:
- icomment:
Logged In: YES user_id=79902 Originator: NO I think it's safer to say that Tcl 8.5 hasn't had the fixes that 8.4 has had in this area, and is thus thread-unsafe!
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [fca7ca96fd] (rid 108273) by dkf on 2007-11-13 21:40:25:
- assignee changed to: "dkf"
- closedate changed to: "2007-11-13T14:40:25"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 Originator: NO HEAD now doesn't use gethostbyname() directly. Both HEAD and 8.4 do the 6-arg form correctly.
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"
Ticket change [dbeabf6acc] (rid 108046) by dgp on 2007-11-27 00:14:17:
- icomment:
Logged In: YES user_id=80530 Originator: NO The 2007-11-13 commit to tclUnixChan.c is reported to have broken the Tcl build on BSD. http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/f738f13083af1918/39c44dea58d938bc?lnk=st&q=#39c44dea58d938bc
- login: "dgp"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "dgp"
- icomment:
Ticket change [ca9ca19fe4] (rid 95385) by dkf on 2007-11-30 15:09:46:
- assignee changed to: "dgp"
- icomment:
Logged In: YES user_id=79902 Originator: NO Can't see how the reported fix applies. Can't work on it now either (in an airport!). Their #1 fix might be to disable getaddrinfo() support on that platform when building Tcl.
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "7 High"
- username: "dkf"
Ticket change [a4743d3d16] (rid 110210) by dgp on 2007-12-04 00:04:21:
- foundin changed to: "obsolete: 8.5b3"
- icomment:
Logged In: YES user_id=80530 Originator: NO confirmed by "RockShox"
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "9 Immediate"
- title changed to: "tclUnixChan.c fails to compile on BSD"
- username: "dgp"
Ticket change [387602bed7] (rid 112212) by dgp on 2007-12-04 00:13:26:
- assignee changed to: "dkf"
- icomment:
Logged In: YES user_id=80530 Originator: NO
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [74daaff06e] (rid 105288) by dkf on 2007-12-04 04:41:24:
- closedate changed to: "2007-12-03T21:41:24"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 Originator: NO Should now be fixed...
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "8"
- status changed to: "Pending"
- username: "dkf"
Ticket change [2524810595] (rid 131235) by sf-robot on 2007-12-18 10:20:08:
- closedate changed to: "2007-12-18T03:20:08"
- closer changed to: "sf-robot"
- icomment:
Logged In: YES user_id=1312539 Originator: NO This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
- login: "sf-robot"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "sf-robot"