Repository navigation
Closed
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
- Windows PGO TailCall: https://buildbot.python.org/#/builders/1872/builds/84
- macOS NoGIL: https://buildbot.python.org/#/builders/1367/builds/1140
- FreeBSD14 Refleaks: https://buildbot.python.org/#/builders/1617/builds/886
Example on macOS:
FAIL: test_rollover_based_on_st_birthtime_only (test.test_logging.TimedRotatingFileHandlerTest.test_rollover_based_on_st_birthtime_only)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_logging.py", line 6666, in test_rollover_based_on_st_birthtime_only
self.assertTrue(found, msg=msg)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
AssertionError: False is not true : No rotated files found, went back 5 seconds
Example on Windows:
FAIL: test_rollover_based_on_st_birthtime_only (test.test_logging.TimedRotatingFileHandlerTest.test_rollover_based_on_st_birthtime_only)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\bbarea\pull_request.itamaro-win64-srv-22-aws.tailcall.pgo\build\Lib\test\test_logging.py", line 6666, in test_rollover_based_on_st_birthtime_only
self.assertTrue(found, msg=msg)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
AssertionError: False is not true : No rotated files found, went back 5 seconds
Stdout:
Contents of test_logging-2-njcaf5hh.log:
os.stat_result(st_mode=33206, st_ino=116249165381905831, st_dev=5772745545947373322, st_nlink=1, st_uid=0, st_gid=0, st_size=88, st_atime=1780658874, st_mtime=1780658874, st_ctime=1780658869)
2026-06-05 11:27:54,029 testing - new record supposedly in the new file after rollover
Contents of test_logging-2-njcaf5hh.log.2026-06-05_11-27-49:
os.stat_result(st_mode=33206, st_ino=167477611143228771, st_dev=5772745545947373322, st_nlink=1, st_uid=0, st_gid=0, st_size=123, st_atime=1780658871, st_mtime=1780658871, st_ctime=1780658869)
2026-06-05 11:27:49,817 testing - initial
2026-06-05 11:27:51,921 testing - update before rollover to renew the st_mtime
Stderr:
Test time: 2026-06-05 11-27-54
The only matching files are: ['test_logging-2-njcaf5hh.log', 'test_logging-2-njcaf5hh.log.2026-06-05_11-27-49']
Metadata
Metadata
Assignees
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
- StatusShow more project fieldsDone
Activity
sergey-miryanov commentedon Jun 5, 2026
@serhiy-storchaka working on this too #84649 (comment)
vstinner commentedon Jun 5, 2026
It seems like the test_logging regression was introduced by the change commit ac3694b:
vstinner commentedon Jun 5, 2026
The test fails randomly.
python -m test -v test_logging -m test_rollover_based_on_st_birthtime_only -Fcan be used to reproduce the bug (it may take a few iterations before hitting the bug).serhiy-storchaka commentedon Jun 5, 2026
#150954 fixes it. Before it, the test failed after 5-10 iterations, with it, it did not fail after more than a hundred.
vstinner commentedon Jun 5, 2026
I confirm that I fail to reproduce the issue after 1000 iterations of
python -m test -v test_logging -m test_rollover_based_on_st_birthtime_only -Fon Windows and FreeBSD.