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.

classification
Title: [2.7] test_signal.test_setitimer_tiny() fails randomly on x86-64 El Capitan 2.7
Type: Stage: resolved
Components: Tests Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: pitrou, vstinner
Priority: normal Keywords:

Created on 2017-08-21 14:21 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg300626 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-08-21 14:21
http://buildbot.python.org/all/builders/x86-64%20El%20Capitan%202.7/builds/161/steps/test/logs/stdio

0:04:49 [173/403/1] test_signal failed
test test_signal failed -- Traceback (most recent call last):
  File "/Users/buildbot/buildarea/2.7.billenstein-elcapitan/build/Lib/test/test_signal.py", line 500, in test_setitimer_tiny
    self.assertEqual(self.hndl_called, True)
AssertionError: False != True
msg300627 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-08-21 14:31
It's related to bpo-30807, "setitimer() can disable timer by mistake".

Test code:

    def test_setitimer_tiny(self):
        # bpo-30807: C setitimer() takes a microsecond-resolution interval.
        # Check that float -> timeval conversion doesn't round
        # the interval down to zero, which would disable the timer.
        self.itimer = signal.ITIMER_REAL
        signal.setitimer(self.itimer, 1e-6)
        time.sleep(1)
        self.assertEqual(self.hndl_called, True)
msg300628 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-08-21 14:33
It seems like build 161 is the first since build 142 which failed.

I don't see this failure in recent 3.6 and 3.x builds.

So the failure seems very rare.
msg300629 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-08-21 15:16
I wrote https://github.com/python/cpython/pull/3165 "[2.7] bpo-30263: regrtest: add system load average", it might help to understand why test_signal fails randomly (check if there is a correlation with the system load).
msg318114 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-05-29 21:59
I didn't see the failure recently. I close the issue.
History
Date User Action Args
2022-04-11 14:58:50adminsetgithub: 75429
2018-05-29 21:59:57vstinnersetstatus: open -> closed
resolution: out of date
messages: + msg318114

stage: resolved
2017-08-21 15:16:52vstinnersetmessages: + msg300629
2017-08-21 14:33:47vstinnersetmessages: + msg300628
2017-08-21 14:31:26vstinnersetnosy: + pitrou
messages: + msg300627
2017-08-21 14:21:31vstinnercreate