Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 92578810f1f37b3315e7863356b682f0d2b68b1ec5da9c046e746f6c903fc7c6
Ticket: 72814c7ef162e03e4261a0236f4f03efc8c51372
Tcl 8.6.7 - Tcl 8.6.13 socket.test hang intermittently on Windows 10
User & Date: szhong on 2023-10-16 15:05:19
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-plain"
  4. comment changed to:
    I had originally posted in the newsgroup and Harald Oehlmann had kindly directed me to post here.
    
    I'm running into an issue where socket.test is hanging on my Windows 10 machine using Visual Studio 2013 with Tcl 8.6.7 and Tcl 8.6.13. It looks like it hangs at the end of the test when close() is being called on the socket.
    
    nmake -f makefile.vc MACHINE=AMD64 release
    nmake -f makefile.vc MACHINE=AMD64 TESTFLAGS="-verbose tpse -file socket.test" test
    nmake -f makefile.vc MACHINE=AMD64 TESTFLAGS="-verbose tpse -file socket.test" test
    nmake -f makefile.vc MACHINE=AMD64 TESTFLAGS="-verbose tpse -file socket.test" test
    nmake -f makefile.vc MACHINE=AMD64 TESTFLAGS="-verbose tpse -file socket.test" test
    ...
    ++++ socket-15.1.0 PASSED
    ---- socket-15.1.1 start
    ++++ socket-15.1.1 PASSED
    ---- socket-15.1.2 start
    ++++ socket-15.1.2 PASSED
    ---- socket-15.1.3 start
    ++++ socket-15.1.3 PASSED
    ---- socket-15.1.4 start
    ++++ socket-15.1.4 PASSED
    ---- socket-15.1.5 start
    ++++ socket-15.1.5 PASSED
    ---- socket-15.1.6 start
    ++++ socket-15.1.6 PASSED
    ---- socket-15.1.7 start
    ++++ socket-15.1.7 PASSED
    ---- socket-15.1.8 start
    ++++ socket-15.1.8 PASSED
    (hangs)
    
    Using git bisect, I have found the first bad commit to be
    
    5d0864fb41175752fd026bc818facf5849387c5a is the first bad commit
    commit 5d0864fb41175752fd026bc818facf5849387c5a
    Merge: 237c46512c 2f5a766c71
    Author: jan.nijtmans <[email protected]>
    Date: Mon May 1 08:20:54 2017 +0000
    
    Fix [8bd13f07bde6fb0631f27927e36461fdefe8ca95|8bd13f07bd]: Closing tcl pipes prevents windows threads from starting up. Patch by sebres (Dipl. Ing. Sergey G. Brester)
    (also fix duplicate test-case number in link.test)
    
    tests/link.test | 2 +-
    win/tclWinConsole.c | 223 +++++++------------
    win/tclWinInit.c | 20 ++
    win/tclWinInt.h | 75 +++++++
    win/tclWinPipe.c | 621 ++++++++++++++++++++++++++++++++++++++--------------
    win/tclWinSerial.c | 93 ++------
    6 files changed, 643 insertions(+), 391 deletions(-)
    
    I have also used Visual Studio 2019 to compile Tcl 6.8.13 and reproduce the hang, but on a different test within socket.test.
    
    ++++ socket_inet6-13.1 SKIPPED: thread
    ++++ socket_inet6-13.2.tr1 SKIPPED: thread
    ++++ socket_inet6-13.2.tr2 SKIPPED: thread
    ++++ socket_inet6-13.2.cl1 SKIPPED: thread
    ++++ socket_inet6-13.2.cl2 SKIPPED: thread
    (hangs)
    
    It hangs in the sendCommand()
    
    socket.test: 1932
    # cleanup
    if {$remoteProcChan ne ""} {
    catch {sendCommand exit}
    }
    
    I have verified that it hangs with 32-bit as well using Visual Studio 2019
    
    nmake -f makefile.vc MACHINE=IX86 TESTFLAGS="-verbose tpse -file socket.test" test
    
    ...
    ---- socket-15.1.0 start
    ++++ socket-15.1.0 PASSED
    ---- socket-15.1.1 start
    ++++ socket-15.1.1 PASSED
    ---- socket-15.1.2 start
    ++++ socket-15.1.2 PASSED
    ---- socket-15.1.3 start
    ++++ socket-15.1.3 PASSED
    ---- socket-15.1.4 start
    ++++ socket-15.1.4 PASSED
    ---- socket-15.1.5 start
    ++++ socket-15.1.5 PASSED
    ---- socket-15.1.6 start
    ++++ socket-15.1.6 PASSED
    ---- socket-15.1.7 start
    ++++ socket-15.1.7 PASSED
    ---- socket-15.1.8 start
    ++++ socket-15.1.8 PASSED
    (hangs)
    
  5. foundin changed to: "8.6.7"
  6. is_private changed to: "0"
  7. login: "szhong"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "5faaf7952fa19368c310907d1981ea0ad4bdde3d"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "szhong"
  14. subsystem changed to: "25. Channel System"
  15. title changed to:
    Tcl 8.6.7 - Tcl 8.6.13 socket.test hang intermittently on Windows 10
    
  16. type changed to: "Bug"