Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 1467d400c35c332b5599b3596fa7b5529b3423e0
Ticket: 3545363fffffffffffffffffffffffffffffffff
socket/vwait hang in io-53.10 and socket.test
User & Date: twylite on 2012-07-18 21:50:59
Changes

  1. icomment:
    Okay, using the above script with 'set addr {-myaddr localhost}' causes a hang on vwait.  Telnet connects, but nothing comes out on the Tcl side.
    
    This precisely explains the zlib-8.3 test failure.
    
    And I suspect this isolates the problem(s): nmake /f makefile.vc test TESTFLAGS="-file socket.test -match socket_inet6* -verbose pbstel"
    
    All socket_inet6-2.* tests fail for me, and 2.11 hangs.  Details are below.
    
    I'm not familiar with IPv6 networks, and my OS (Windows 7 64-bit) only has IPv4 network access.  Obviously there appears to be a IPv6 stack present (and 'ping localhost' or 'ping ::1' works).  I've tried enabling IPv6 on my network adapter and giving it an address (that works, ipconfig /all shows the address, I can ping it) but this makes no difference to the socket_inet6-2.* tests.
    
    Despite this, I would expect these tests not to hang.  I would expect a typical Windows 7 home user to have a similar 'default' IPv6 stack and consequently I would expect this bug to reproduce on such a system.
    
    
    C:/User/Tcl_BUILD/cmake-2012/tcl-trunk/tests/socket.test:317: error: test failed
    : socket_inet6-2.1 tcp connection
    ==== socket_inet6-2.1 tcp connection FAILED
    ==== Contents of test case:
    
        # $x == "ready" at this point
        set sock [socket $localhost $listen]
        lappend x [gets $f]
        close $sock
        lappend x [gets $f]
    
    ---- Result was:
    ready timed_out {}
    ---- Result should have been (exact matching):
    ready done {}
    ==== socket_inet6-2.1 FAILED
    
    ---- socket_inet6-2.2 start
    
    
    C:/User/Tcl_BUILD/cmake-2012/tcl-trunk/tests/socket.test:348: error: test failed
    : socket_inet6-2.2 tcp connection with client port specified
    ==== socket_inet6-2.2 tcp connection with client port specified FAILED
    ==== Contents of test case:
    
        # $x == "ready" at this point
        set sock [socket -myport $port $localhost $listen]
        puts $sock hello
        flush $sock
        lappend x [expr {[gets $f] eq "hello $port"}]
        close $sock
        return $x
    
    ---- Result was:
    ready 0
    ---- Result should have been (exact matching):
    ready 1
    ==== socket_inet6-2.2 FAILED
    
    ---- socket_inet6-2.3 start
    
    
    C:/User/Tcl_BUILD/cmake-2012/tcl-trunk/tests/socket.test:383: error: test failed
    : socket_inet6-2.3 tcp connection with client interface specified
    ==== socket_inet6-2.3 tcp connection with client interface specified FAILED
    ==== Contents of test case:
    
        # $x == "ready" at this point
        set sock [socket -myaddr $localhost $localhost $listen]
        puts $sock hello
        flush $sock
        lappend x [gets $f]
        close $sock
        return $x
    
    ---- Result was:
    ready {}
    ---- Result should have been (exact matching):
    ready {hello ::1}
    ==== socket_inet6-2.3 FAILED
    
    ---- socket_inet6-2.4 start
    
    
    C:/User/Tcl_BUILD/cmake-2012/tcl-trunk/tests/socket.test:416: error: test failed
    : socket_inet6-2.4 tcp connection with server interface specified
    ==== socket_inet6-2.4 tcp connection with server interface specified FAILED
    ==== Contents of test case:
    
        # $x == "ready" at this point
        set sock [socket $localhost $listen]
        puts $sock hello
        flush $sock
        lappend x [gets $f]
        close $sock
        return $x
    
    ---- Result was:
    ready {}
    ---- Result should have been (exact matching):
    ready hello
    ==== socket_inet6-2.4 FAILED
    
    ---- socket_inet6-2.5 start
    
    
    C:/User/Tcl_BUILD/cmake-2012/tcl-trunk/tests/socket.test:450: error: test failed
    : socket_inet6-2.5 tcp connection with redundant server port
    ==== socket_inet6-2.5 tcp connection with redundant server port FAILED
    ==== Contents of test case:
    
        # $x == "ready" at this point
        set sock [socket $localhost $listen]
        puts $sock hello
        flush $sock
        lappend x [gets $f]
        close $sock
        return $x
    
    ---- Result was:
    ready {}
    ---- Result should have been (exact matching):
    ready hello
    ==== socket_inet6-2.5 FAILED
    
    ---- socket_inet6-2.6 start
    ++++ socket_inet6-2.6 PASSED
    ---- socket_inet6-2.7 start
    
    
    C:/User/Tcl_BUILD/cmake-2012/tcl-trunk/tests/socket.test:493: error: test failed
    : socket_inet6-2.7 echo server, one line
    ==== socket_inet6-2.7 echo server, one line FAILED
    ==== Contents of test case:
    
        set s [socket $localhost $listen]
        fconfigure $s -buffering line -translation lf
        puts $s "hello abcdefghijklmnop"
        set x [gets $s]
        close $s
        list $x [gets $f]
    
    ---- Result was:
    {} timeout
    ---- Result should have been (exact matching):
    {hello abcdefghijklmnop} done
    ==== socket_inet6-2.7 FAILED
    
    ---- socket_inet6-2.8 start
    
    
    C:/User/Tcl_BUILD/cmake-2012/tcl-trunk/tests/socket.test:535: error: test failed
    : socket_inet6-2.8 echo server, loop 50 times, single connection
    ==== socket_inet6-2.8 echo server, loop 50 times, single connection FAILED
    ==== Contents of test case:
    
        set s [socket $localhost $listen]
        fconfigure $s -buffering line
        catch {
            for {set x 0} {$x < 50} {incr x} {
                puts $s "hello abcdefghijklmnop"
                gets $s
            }
        }
        close $s
        catch {set x [gets $f]}
        return $x
    
    ---- Result was:
    done 0
    ---- Result should have been (exact matching):
    done 50
    ==== socket_inet6-2.8 FAILED
    
    ---- socket_inet6-2.9 start
    ++++ socket_inet6-2.9 PASSED
    ---- socket_inet6-2.10 start
    
    
    C:/User/Tcl_BUILD/cmake-2012/tcl-trunk/tests/socket.test:597: error: test failed
    : socket_inet6-2.10 close on accept, accepted socket lives
    ==== socket_inet6-2.10 close on accept, accepted socket lives FAILED
    ==== Contents of test case:
    
        set ss [socket -server accept 0]
        proc accept {s a p} {
            global ss
            close $ss
            fileevent $s readable "readit $s"
            fconfigure $s -trans lf
        }
        proc readit {s} {
            global done
            gets $s
            close $s
            set done 1
        }
        set cs [socket $localhost [lindex [fconfigure $ss -sockname] 2]]
        puts $cs hello
        close $cs
        vwait done
        return $done
    
    ---- Result was:
    timed_out
    ---- Result should have been (exact matching):
    1
    ==== socket_inet6-2.10 FAILED
    
    
    
  2. login: "twylite"
  3. mimetype: "text/plain"
  4. username: "twylite"