Skip to content
Tcl Source Code History Of Ticket 1618235fffffffff
Login

History Of Ticket 1618235fffffffff

Artifacts Associated With Ticket 1618235fffffffff

  1. Ticket change [85f464e311] (rid 131417) by nobody on 2006-12-18 16:41:14:

    1. assignee initialized to: "hobbs"
    2. cmimetype initialized to: "text/plain"
    3. 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]
      
      
    4. foundin initialized to: "obsolete: 8.4.14"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "nobody"
    10. subsystem initialized to: "29. http Package"
    11. title initialized to: "http.test-4.15 http::Event FAILED"
    12. type initialized to: "Bug"
  2. Ticket change [770571be07] (rid 105692) by hobbs on 2007-06-11 04:22:15:

    1. assignee changed to: "vasiljevic"
    2. priority changed to: "7 High"
  3. Ticket change [526f5816a7] (rid 126316) by lwright-itron on 2007-06-11 20:45:34:

    1. icomment:
      Logged In: YES 
      user_id=1671459
      Originator: NO
      
      Category should be "Tcl", not "http".
      
      
    2. login: "lwright-itron"
    3. mimetype: "text/plain"
    4. username: "lwright-itron"
  4. Ticket change [1673bf3c2a] (rid 124722) by dkf on 2007-06-14 15:58:47:

    1. assignee changed to: "hobbs"
    2. priority changed to: "9 Immediate"
    3. subsystem changed to: "27. Channel Types"
  5. Ticket change [595a2b4dc8] (rid 117964) by hobbs on 2007-11-13 07:35:22:

    1. assignee changed to: "vasiljevic"
  6. Ticket change [500b4fa370] (rid 125911) by dkf on 2007-11-13 18:24:39:

    1. 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!
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  7. Ticket change [fca7ca96fd] (rid 108273) by dkf on 2007-11-13 21:40:25:

    1. assignee changed to: "dkf"
    2. closedate changed to: "2007-11-13T14:40:25"
    3. closer changed to: "dkf"
    4. 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.
      
      
    5. login: "dkf"
    6. mimetype: "text/plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
    9. username: "dkf"
  8. Ticket change [dbeabf6acc] (rid 108046) by dgp on 2007-11-27 00:14:17:

    1. 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
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. username: "dgp"
  9. Ticket change [ca9ca19fe4] (rid 95385) by dkf on 2007-11-30 15:09:46:

    1. assignee changed to: "dgp"
    2. 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.
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. priority changed to: "7 High"
    6. username: "dkf"
  10. Ticket change [a4743d3d16] (rid 110210) by dgp on 2007-12-04 00:04:21:

    1. foundin changed to: "obsolete: 8.5b3"
    2. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      confirmed by "RockShox"
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. priority changed to: "9 Immediate"
    6. title changed to: "tclUnixChan.c fails to compile on BSD"
    7. username: "dgp"
  11. Ticket change [387602bed7] (rid 112212) by dgp on 2007-12-04 00:13:26:

    1. assignee changed to: "dkf"
    2. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. username: "dgp"
  12. Ticket change [74daaff06e] (rid 105288) by dkf on 2007-12-04 04:41:24:

    1. closedate changed to: "2007-12-03T21:41:24"
    2. closer changed to: "dkf"
    3. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      Should now be fixed...
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. priority changed to: "8"
    7. status changed to: "Pending"
    8. username: "dkf"
  13. Ticket change [2524810595] (rid 131235) by sf-robot on 2007-12-18 10:20:08:

    1. closedate changed to: "2007-12-18T03:20:08"
    2. closer changed to: "sf-robot"
    3. 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).
      
      
    4. login: "sf-robot"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "sf-robot"