Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ba86562e20061f442af3fa514723fae49b9b53cb
Ticket: 13d3af3ad5b8e8eb20d673962d442dd64a40af40
IPV6 only used for IPV4/IPV6 sockets on windows
User & Date: oehhar on 2014-05-29 13:58:16
Changes

  1. closedate changed to: "2456807.08213738"
  2. icomment:
    I have made some tests today with my CentOS system.
    
    Issue: test socket-14.9.1 blocks forever.
    
    Background: as CentOS does not resolve "::1" to localhost but only "127.0.0.1" due to the /etc/hosts contents:
    <verbatim>
    127.0.0.1 localhost.localdomain localhost
    ::1 localhost6.localdomain6 localhost6
    </verbatim>
    
    Thus, the socket in the test should not connect.
    Test contents:
    
    <verbatim>
    test socket-14.9.1 {pending [socket -async] and blocking [puts], server is IPv6} \
        -constraints {socket supported_inet supported_inet6} \
        -setup {
            makeFile {
                set server [socket -server accept -myaddr ::1 0]
                proc accept {s h p} {set ::x $s}
                puts [lindex [fconfigure $server -sockname] 2]
                flush stdout
                vwait x
                puts [gets $x]
            } script
            set fd [open |[list [interpreter] script] RDWR]
            set port [gets $fd]
        } -body {
            set sock [socket -async localhost $port]
            puts $sock ok
            flush $sock
            list [fconfigure $sock -error] [gets $fd]
        } -cleanup {
            # make sure the server exits
            catch {socket ::1 $port}
            close $sock
            close $fd
        } -result {{} ok}
    </verbatim>
    
    The command which blocks is: "flush $sock".
    
    What I have tried:
       *   No server at all (as it does not connect anyway) -> ok, no block but error
       *   Server and client in different shells -> ok, no block but error
       *   Checkout which was stated ok by dgp: 2014-04-08 15:15:31 2b3521353bf91817 GOOD CURRENT -> blocks
       *   Tried this test with tcl8.6.1 release -> blocks
    
    I suppose that the issue is in the function "WaitForConnect".
    
    So I have put "fprintf(stderr,...) or printf(...) in this function but nothing appeared on the test run:
    
    make tests TESTFLAGS="-verbose bte -file socket2.tcl"
    
    (socket2.tcl is my test version of socket.tcl only containing 14.9.1 and the boot code).
    
    So I tired to use "ddd" to debug the function, but even with "configure --enable-symbols", ddd says to "WaitForConnect" -> No line number information.
    
    So I am sorry, this is my bank holiday report, switch back to windows issues,
    Harald
    
  3. login: "oehhar"
  4. mimetype: "text/x-fossil-wiki"
  5. username: "oehhar"