Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows: resync the VM time when the system clock gets changed #588

Merged
merged 3 commits into from
Sep 8, 2021

Conversation

LinqLover
Copy link
Contributor

@LinqLover LinqLover commented Aug 30, 2021

As of today, if the Windows system time is changed, already running VM instances will not reflect this change. With this patch, this bug is fixed. The full bug report is on squeak-dev: https://lists.squeakfoundation.org/pipermail/squeak-dev/2021-August/216306.html

This bug only affects builds for Windows versions prior to Windows 8, never builds do not use the tick variables any longer. See:

#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
/* Compute the current VM time basis, the number of microseconds from 1901.
*
* As of Windows 8 there is a FILETIME wall clock interface which is high
* precision and so does not have to be combined with the millisecond clock.
*/

(However, as #499 is still unmerged, currently, also builds for Windows 10 are affected by the bug. Looks like we were never benefitting from @eliotmiranda's improvements for the Win8 APIs (cf. fae0d31) until today 😆)

Independently of this patch, we will want to fix cross-platform-occurring VM hangs when the system clock is pulled backward. See the bug report on squeak-dev for this, again.

Please review thoroughly!

/cc @marceltaeumel

@LinqLover
Copy link
Contributor Author

(By the way, the best thing while you are dealing with timing issues is that after you have committed all your stuff, you set your system time back to normal and realize that you have spent one hour less on this issue than you were assuming ... ^^)

@marceltaeumel
Copy link
Contributor

FYI: We wanted to bump the minimal supported version to Windows Vista. Eliot suggested even Windows 8 but we still have a lot of Windows 7 users out there. See PR #499

@LinqLover
Copy link
Contributor Author

Why don't we create multiple builds for the different Windows versions?

@eliotmiranda
Copy link
Contributor

eliotmiranda commented Aug 31, 2021 via email

@LinqLover
Copy link
Contributor Author

Thank you for the feedback, Jakob, and for the explanation, Eliot. Is there anything else that keeps us from getting this one merged? :-)

@eliotmiranda eliotmiranda merged commit 9fb9505 into OpenSmalltalk:Cog Sep 8, 2021
@LinqLover LinqLover deleted the win-resync-system-time branch September 8, 2021 20:54
hogoww referenced this pull request in hogoww/opensmalltalk-vm Dec 25, 2021
hogoww referenced this pull request in hogoww/opensmalltalk-vm Dec 25, 2021
…false ] on method [ markAndShouldScan: ] KILLED by 1/10 test cases.
hogoww referenced this pull request in hogoww/opensmalltalk-vm Feb 26, 2022
…hod [ allOldSpaceEntitiesForCompactingFrom:to:do: ] 10 test cases.
hogoww referenced this pull request in hogoww/opensmalltalk-vm Feb 26, 2022
…od [ allOldSpaceEntitiesForCompactingFrom:to:do: ] 9/10 Test Cases are NOT EQUIVALENT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants