New submission from Jonas Norling <jonas.norl...@greeneggs.se>: 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). ---------- components: Interpreter Core files: time_test.py messages: 376338 nosy: wocket priority: normal severity: normal status: open title: Timeout is affected by jumps in system time type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49440/time_test.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41710> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com