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
- cmimetype changed to: "text/x-fossil-wiki"
- 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.
- foundin changed to: "9.0.5"
- login: "serhiy.storchaka"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "serhiy.storchaka"
- subsystem changed to: "03. Timer Events"
- title changed to:
Windows: after and Tcl_Sleep can sleep about 72 minutes
- type changed to: "Bug"