This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author wocket
Recipients wocket
Date 2020-09-04.08:34:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
In-reply-to
Content
The timeout for threading.Lock, threading.Condition, etc, is not using a monotonic clock — it is affected if the system time (realtime clock) is set.

The attached program can be used to show the problem. It is expected to print "Took 2.000 s" repeatedly, but if run with permissions to set the system time, it prints:
$ sudo ./time_test.py
Took 2.400 s
Took 1.657 s
Took 2.044 s
Took 2.401 s
...

(the 1.6 s time can be explained by NTP correcting the clock)

There are already a number of closed bugs for this and related issues: bpo 23428, bpo 31267, bpo 35747.

This happens in Python 3.7.7 (ARM32, Yocto Warrior), Python 3.8.2 (AMD64, Ubuntu Linux 20.04) and Python v3.9.0rc1 (AMD64, Ubuntu Linux 20.04).
History
Date User Action Args
2020-09-04 08:34:54wocketsetrecipients: + wocket
2020-09-04 08:34:54wocketsetmessageid: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org>
2020-09-04 08:34:54wocketlinkissue41710 messages
2020-09-04 08:34:54wocketcreate