Skip to content
Tcl Source Code History Of Ticket 1962217fffffffffffffffffffffffffffffffff
Login

History Of Ticket 1962217fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 1962217fffffffffffffffffffffffffffffffff

  1. Ticket change [0003bd0c2e] (rid 119249) by nobody on 2008-05-12 07:06:36:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      I have a problem to resolv reverse DNS in tcl interpreter compiled with treads in my server socket code. If host is available i reverse DNS zone it is ok but if host is not available tcl returns last position from /etc/hosts file.
      This situation is only on tcl compiled with threads. I check 8.5.2, 8.4.15, 8.4.18
      
      No threaded interpreter:
      logger: Opening SMTP connection from 172.16.17.222
      
      Threaded interpreter:
      logger: Opening SMTP connection from osiolek
      
      Last position from my /etc/hosts
      172.16.55.11 osiolek
      
      fconfigure returns bad hostname 
      
      Sample code:
      if {[catch {set RemoteName [lindex [fconfigure $channel -peername] 1]} err]} {
              logger "Can't read client name"
              after 0 "close $channel"
              return
          }
      
      Linux distributions: SLES 9, SLES 10, Ubuntu
      
      [email protected]
      
    4. foundin initialized to: "None"
    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: "49. Threading"
    11. title initialized to: "dns resolver problem"
    12. type initialized to: "Bug"
  2. Ticket change [ed786d5b7e] (rid 103886) by wapinski on 2008-05-20 04:55:40:

    1. icomment:
      Logged In: YES 
      user_id=2091947
      Originator: NO
      
      my observations:
      
      with nothreaded interpreter:
      
      set hostip [lindex [fconfigure $channel -peername] 0] returns client(host) IP
      set hostname [lindex [fconfigure $channel -peername] 1] returns client(host) NAME (from DNS or /etc/hosts)
      set hostport [lindex [fconfigure $channel -peername] 2] returns client(host) PORT
      
      but with threaded interpreter "fconfigure -peername" returns good client IP, NAME and PORT doesn't exists (!).
      
      Darek. [email protected]
      
      
      
      
    2. login: "wapinski"
    3. mimetype: "text/plain"
    4. username: "wapinski"
  3. Ticket change [70941a55c4] (rid 100511) by dkf on 2008-05-20 15:16:11:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      Looks like there's thread-safety problems in TclpGetHostByAddr when built under modern Linux. Should review to see if replacing with getaddrinfo (which is *supposed* to be thread-safe) is practical.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  4. Ticket change [72e46dc42e] (rid 104944) by dkf on 2008-05-20 15:16:12:

    1. assignee changed to: "andreas_kupries"
    2. foundin changed to: "obsolete: 8.5.2"
    3. priority changed to: "8"
    4. subsystem changed to: "27. Channel Types"
  5. Ticket change [75acd0e64d] (rid 105427) by wapinski on 2008-05-26 18:35:21:

    1. icomment:
      Logged In: YES 
      user_id=2091947
      Originator: NO
      
      Maybe problem is because gethostbyaddr_r return more than one error conditions:
      http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/apis/tsghosta.htm
      
      "
      Error Conditions
      
      When the gethostbyaddr_r() function fails, h_errno (defined in <netdb.h>) can be set to:
      
      [HOST_NOT_FOUND]
      [NO_DATA]
      [NO_RECOVERY]
      [TRY_AGAIN]
      [EINVAL]
      "
      
      In TclpGetHostByAddr(const char *addr, int length, int type) in tclUnixCompat.c we have only NULL? If I reduce TclpGetHostByAddr() to:
      
      struct hostent *
      TclpGetHostByAddr(
          const char *addr,
          int length,
          int type)
      {
          return gethostbyaddr(addr, length, type);
      }
      
      everything is OK. But this is NOT answer.
      
      
    2. login: "wapinski"
    3. mimetype: "text/plain"
    4. username: "wapinski"
  6. Ticket change [0cf68843fa] (rid 114274) by dkf on 2012-05-18 00:08:39:

    1. assignee changed to: "rmax"
    2. closedate changed to: "2012-05-17T17:08:39"
    3. closer changed to: "dkf"
    4. icomment:
      
      
      allow_comments - 1
      
      Tcl 8.6 uses getaddrinfo() now which is documented as thread safe. (It also supports IPv6, which is why we switched to GAI.)
      
      
    5. login: "dkf"
    6. mimetype: "text/plain"
    7. resolution changed to: "Out of Date"
    8. status changed to: "Closed"
    9. username: "dkf"