Artifacts Associated With Ticket 8584043146
Ticket change [708f935835] (rid 258336) by serhiy.storchaka on 2026-10-16 22:01:31:
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized 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 initialized to: "9.0.5"
- login: "serhiy.storchaka"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "serhiy.storchaka"
- subsystem initialized to: "03. Timer Events"
- title initialized to:
Windows: after and Tcl_Sleep can sleep about 72 minutes
- type initialized to: "Bug"
Ticket change [1d50db5b31] (rid 258340) by serhiy.storchaka on 2026-10-16 22:03:36:
- icomment:
Proposed fix in branch [/timeline?r=win-sleep-negative-usec|win-sleep-negative-usec] (from core-9-0-branch): compute the delay before casting it to DWORD. Tested on Windows 11 with a slowed-down Tcl clock: 9.0.5 hung in 4 of 8 runs, the fixed build in none.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [4a9052bba4] (rid 258382) by jan.nijtmans on 2026-10-17 06:51:49:
- assignee changed to: "aku"
- closer changed to: "nobody"
- 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.
- icomment:
+1 Please go ahead
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
Ticket change [2cfe80b848] (rid 258445) by serhiy.storchaka on 2026-10-17 07:25:45:
- icomment:
Merged into 9.0 in [19fc013bb1]. Main is not affected (TIP 723).
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- icomment:
Ticket change [ac9480d51d] (rid 259957) by serhiy.storchaka on 2026-10-22 17:19:27:
- closedate changed to: "2461330.8095555324"
- closer changed to: "serhiy.storchaka"
- login: "serhiy.storchaka"