Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 708f935835f21ef90debf186c2afc21b5b319a8c8671aa96a8e6e151703d816d
Ticket: 858404314692d758d1aba126ac6dd0c448c1de3b
Windows: after and Tcl_Sleep can sleep about 72 minutes
User & Date: serhiy.storchaka on 2026-10-16 22:01:31
Changes

  1. cmimetype changed to: "text/x-fossil-wiki"
  2. comment changed to:
    In the retry loop of Tcl_Sleep() (win/tclWinNotify.c), vdelay.usec = desired.usec - now.usec is negative when the remaining time crosses a second boundary, and <nowiki>(unsigned long)vdelay.usec / 1000</nowiki> turns it into about 4294967 ms, so SleepEx() waits about 71.6 minutes. The loop runs when SleepEx() wakes before Tcl's clock reaches the target, which happens easily on virtual machines: a 9.0.5 tclsh and its children all hung in <nowiki>[after 8000]</nowiki> for more than 10 minutes on a Windows 11 VM.
    
    The cast came with [837dbec7cc]. 8.6 (signed arithmetic) and 9.1 (TIP 723) are not affected.
    
  3. foundin changed to: "9.0.5"
  4. login: "serhiy.storchaka"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. severity changed to: "Minor"
  8. status changed to: "Open"
  9. submitter changed to: "serhiy.storchaka"
  10. subsystem changed to: "03. Timer Events"
  11. title changed to:
    Windows: after and Tcl_Sleep can sleep about 72 minutes
    
  12. type changed to: "Bug"