Issue 47238: Python threading.Event().wait() depends on the system time

Issue47238

Created on 2022-04-06 10:19 by AleksandrAQ, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
reproduction.py AleksandrAQ, 2022-04-06 10:19 You need root privileges to change the system time.
Messages (1)
msg416851 - (view) Author: Aleksandr (AleksandrAQ) Date: 2022-04-06 10:19
This happens on Ubuntu on Python versions 3.8.5 and 3.10.4

I have two threads that can change the system time to a day ago.
If the change in the system time for a day occurs at the time of wait, then I hang for one day plus the waiting time.

I thought Event.wait() uses a monotonous clock, but this behavior points to an absolute clock.

Are there any solutions?
History
Date User Action Args
2022-04-11 14:59:58adminsetgithub: 91394
2022-04-06 10:19:09AleksandrAQcreate