Repository navigation
Done
Labels
Description
Bug report
First failing build: https://buildbot.python.org/#/builders/1857/builds/1300
0:14:45 load avg: 2.62 mem: 91.0 MiB [1/1/1] test_logging failed (3 failures)
Re-running test_logging in verbose mode (matching: test_compute_rollover_W6_local, test_compute_rollover_W6_local_interval, test_rollover_delayed_dst)
test_compute_rollover_W6_local (test.test_logging.TimedRotatingFileHandlerTest.test_compute_rollover_W6_local) ... FAIL
Warning -- Unraisable exception
Exception ignored while finalizing file <_io.FileIO name='/tmp/test_python_fytgriaa/test_logging-2-p5zcq3ak.log' mode='ab' closefd=True>:
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.opsec-fbsd16/build/Lib/unittest/case.py", line 690, in run
with outcome.testPartExecutor(self):
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/test_python_fytgriaa/test_logging-2-p5zcq3ak.log' mode='a' encoding='utf-8'>
test_compute_rollover_W6_local_interval (test.test_logging.TimedRotatingFileHandlerTest.test_compute_rollover_W6_local_interval) ... FAIL
Warning -- Unraisable exception
Exception ignored while finalizing file <_io.FileIO name='/tmp/test_python_fytgriaa/test_logging-2-7ie4uyl3.log' mode='ab' closefd=True>:
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.opsec-fbsd16/build/Lib/unittest/case.py", line 690, in run
with outcome.testPartExecutor(self):
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/test_python_fytgriaa/test_logging-2-7ie4uyl3.log' mode='a' encoding='utf-8'>
test_rollover_delayed_dst (test.test_logging.TimedRotatingFileHandlerTest.test_rollover_delayed_dst) ...
test_rollover_delayed_dst (test.test_logging.TimedRotatingFileHandlerTest.test_rollover_delayed_dst) (when='W6', atTime=None, utc=False) ... FAIL
======================================================================
FAIL: test_compute_rollover_W6_local (test.est_logging.TimedRotatingFileHandlerTest.test_compute_rollover_W6_local)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.opsec-fbsd16/build/Lib/test/support/__init__.py", line 1256, in inner
return func(*args, **kwds)
File "/home/buildbot/buildarea/3.x.opsec-fbsd16/build/Lib/test/test_logging.py", line 7382, in test_compute_rollover_W6_local
test(DT(2012, 3, 4, 23, 59, 59), DT(2012, 3, 5, 0, 0))
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.opsec-fbsd16/build/Lib/test/test_logging.py", line 7377, in test
self.assertEqual(diff, 0, datetime.timedelta(seconds=diff))
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 172800.0 != 0 : 2 days, 0:00:00
======================================================================
FAIL: test_compute_rollover_W6_local_interval (test.test_logging.TimedRotatingFileHandlerTest.test_compute_rollover_W6_local_interval)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.opsec-fbsd16/build/Lib/test/support/__init__.py", line 1256, in inner
return func(*args, **kwds)
File "/home/buildbot/buildarea/3.x.opsec-fbsd16/build/Lib/test/test_logging.py", line 7559, in test_compute_rollover_W6_local_interval
test(DT(2012, 2, 19, 23, 59, 59), DT(2012, 3, 5, 0, 0))
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.opsec-fbsd16/build/Lib/test/test_logging.py", line 7554, in test
self.assertEqual(diff, 0, datetime.timedelta(seconds=diff))
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 172800.0 != 0 : 2 days, 0:00:00
======================================================================
FAIL: test_rollover_delayed_dst (test.test_logging.TimedRotatingFileHandlerTest.test_rollover_delayed_dst) (when='W6', atTime=None, utc=False)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.opsec-fbsd16/build/Lib/test/test_logging.py", line 6797, in test_rollover_delayed_dst
self.assert_rollover_contents(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
when, timestamps, expected, atTime=at_time, utc=utc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.opsec-fbsd16/build/Lib/test/test_logging.py", line 6746, in assert_rollover_contents
self.assertEqual(actual, expected)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
AssertionError: {'': ['1', '2'], '.2026-10-21': ['0']} != {'.2026-10-19': ['0'], '.2026-10-26': ['1'], '': ['2']}
- {'': ['1', '2'], '.2026-10-21': ['0']}
+ {'': ['2'], '.2026-10-19': ['0'], '.2026-10-26': ['1']}
----------------------------------------------------------------------
Ran 3 tests in 0.083s
FAILED (failures=3)
test test_logging failed
1 test failed again:
test_loggingIt seems like the FreeBSD 16 was upgraded in build 1300.
Significant differences on test.pythoninfo between build 1298 (success) and build 1300 (fail):
-lzma.LZMA_VERSION: 5.8.3
-lzma.lzma_version: 5.8.3
+lzma.LZMA_VERSION: 5.8.4
+lzma.lzma_version: 5.8.4
-os.uname: os.uname_result(sysname='FreeBSD', nodename='py16bb.opsec.eu', release='16.0-CURRENT', version='FreeBSD 16.0-CURRENT main-n287972-4c03feacd171 GENERIC', machine='amd64')
+os.uname: os.uname_result(sysname='FreeBSD', nodename='py16bb.opsec.eu', release='16.0-CURRENT', version='FreeBSD 16.0-CURRENT main-n291503-2cc3f14701c9 GENERIC', machine='amd64')
resource.RLIMIT_KQUEUES: (9223372036854775807, 9223372036854775807)
-resource.RLIMIT_MEMLOCK: (65536, 65536)
+resource.RLIMIT_MEMLOCK: (262144, 262144)
-ssl.OPENSSL_API_VERSION_INFO: ssl.OPENSSL_VERSION_INFO(major=3, minor=5, fix=0, patch=7, status=0)
-ssl.OPENSSL_VERSION: OpenSSL 3.5.7 9 Jun 2026
-ssl.OPENSSL_VERSION_INFO: ssl.OPENSSL_VERSION_INFO(major=3, minor=5, fix=0, patch=7, status=0)
+ssl.OPENSSL_API_VERSION_INFO: ssl.OPENSSL_VERSION_INFO(major=3, minor=5, fix=0, patch=9, status=0)
+ssl.OPENSSL_VERSION: OpenSSL 3.5.9 29 Sep 2026
+ssl.OPENSSL_VERSION_INFO: ssl.OPENSSL_VERSION_INFO(major=3, minor=5, fix=0, patch=9, status=0)
-system.uptime: 16 days, 21:42:12
+system.uptime: 0:06:58
-zlib.ZLIB_VERSION: 1.3.2
-zlib.zlib_version: 1.3.2
+zlib.ZLIB_VERSION: 1.4
+zlib.zlib_version: 1.4CPython versions tested on:
CPython main branch
Operating systems tested on:
Other
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
Activity
vstinner commentedon Nov 24, 2026
I can reproduce the issue on my FreeBSD 16 VM, but I cannot reproduce it on FreeBSD 15 VM nor on my FreeBSD 14 VM.
Reproducer:
Output on Linux, FreeBSD 15 and FreeBSD 14: tm_wday=6
Output on FreeBSD 16: tm_wday=4
zoneinfo package version: result of
pkg which /usr/share/zoneinfo/EST5EDTvstinner commentedon Nov 24, 2026
Ah, the issue affects all Python versions (test_logging fails at least on 3.14, 3.15 and main branches).
On Fedora 45,
/usr/share/zoneinfo/EST5EDTis provided by tzdata package which has the versiontzdata-2026f-1.fc45.noarchor just "2026f" in short.For FreeBSD, I found https://www.freshports.org/misc/zoneinfo/ package but I'm not sure if it's the same as "FreeBSD-zoneinfo". Latest misc/zoneinfo update was at Nov 8th, 2026 (two weeks ago): "misc/zoneinfo: Update to 2026f" which points to https://data.iana.org/time-zones/tzdb/NEWS. This link describes "Release 2026f - 2026-10-27 23:16:49 -0700" as "Briefly: Cuba will not fall back 2026-11-01; stays on -04 through 2027-11-07. (...)".
@opsec: Would you mind to have a look at this issue which only occurs on FreeBSD 16?
vstinner commentedon Nov 24, 2026
test_compute_rollover_W6_local() was added in 2024 to test_logging by commit fee86fd of PR GH-116191:
test_rollover_delayed_dst() which also fails was added last month by commit 457ba33 of PR GH-160564:
[-]test_logging: rollover tests fail on AMD64 FreeBSD16 3.x buildbot[/-][+]test_logging: rollover tests fail on FreeBSD16[/+]hugovk commentedon Nov 24, 2026
This is a bug in tzcode 2026d, that is now in FreeBSD, and this buildbot has just been updated to include it.
Here's a FreeBSD report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300977
Perl also ran into it: Perl/perl5#25089
I reported this to tzcode with a fix earlier:
https://lists.iana.org/hyperkitty/list/tz@iana.org/thread/I7KQYKHBNCIC6FW7JMP4LPBPSECDKDE2/
And as it happens, whilst my email was in moderation, an earlier mail in moderation posted the bug with a similar fix :)
https://lists.iana.org/hyperkitty/list/tz@iana.org/thread/O3RZGBKSO5GXBFDZKW2JXO3OQIIGYBF3/
vstinner commentedon Nov 25, 2026
Oh great! You went deeper into debugging than me! I failed to find the exact zoneinfo version on FreeBSD. It's not something like 2026 + letter.
On Linux, I'm using 2026f but I'm not affected. Is it because localtime() has a different implementation on Linux glibc and on FreeBSD libc?
I suppose that you mean 2026d. Your email says "2026c is good; 2026d- 2026f and main are bad".
hugovk commentedon Nov 25, 2026
Yes, I meant 2026d, fixed above :)
vstinner commentedon Nov 25, 2026
I commented the FreeBSD issue.
vstinner commentedon Nov 25, 2026
Oh, it seems like FreeBSD 15 got updated: test_logging now also fails on FreeBSD 15 buildbot: https://buildbot.python.org/#/builders/2103/builds/397
[-]test_logging: rollover tests fail on FreeBSD16[/-][+]test_logging: rollover tests fail on FreeBSD[/+]hugovk commentedon Nov 25, 2026
https://buildbot.python.org/#/builders/2103/builds/397 is FreeBSD 16: AMD64 FreeBSD16 3.15 builder on opsec-fbsd16 worker.
vstinner commentedon Nov 25, 2026
Oh right! I was confused between Python 3.15 branch and FreeBSD 15 😁
[-]test_logging: rollover tests fail on FreeBSD[/-][+]test_logging: rollover tests fail on FreeBSD 16[/+]emaste commentedon Nov 26, 2026
I have a FreeBSD patch in review, waiting on feedback from upstream, FreeBSD's tzcode maintainer, or the release engineering team. We're tracking this issue for the 15.2 release.
emaste commentedon Nov 26, 2026
@vstinner and everyone else thanks for digging into this and for comments in FreeBSD bug 300977. I have committed the patch from the review and will cherry-pick it soon. FreeBSD 15.2 will either have this change, or a variation if something different gets committed upstream to tzcode in time.
vstinner commentedon Nov 27, 2026
@emaste: Sorry, I'm not used to the FreeBSD workflow. Does it mean that FreeBSD 16 will get an update soon with the fix?
opsec commentedon Nov 27, 2026
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300977 has three (ups: four) commits: one to main, one to 15/stable and one to 15.2. 'main' maps to 16.0, so yes, it will receive it sooner or later. I'm not sure which package contains the fix and if that has already been rebuild. I just updated the py16 buildbot from the FreeBSD-base package repo and we'll see if the fix already made it into the packages.
hugovk commentedon Nov 27, 2026
I rebuilt "AMD64 FreeBSD16 3.x" and it passed now, thanks!
https://buildbot.python.org/#/builders/1857/builds/1360
hugovk commentedon Nov 27, 2026
Oops, I just realised I forgot to attach my patch to my email to the tz mailing list :) Anyway, it was the same as @emaste's FreeBSD patch 👍
Anyway, Paul Eggert has replied to the other email with another fix:
https://lists.iana.org/hyperkitty/list/tz@iana.org/thread/O3RZGBKSO5GXBFDZKW2JXO3OQIIGYBF3/
Which is also committed: eggert/tz@9bbda32
Slightly different, but works just as well.
vstinner commentedon Nov 27, 2026
Since the Python buildbot is back to green, I close the issue.
The bug is tracked in FreeBSD and tz bug tracker/mailing list anyway. Thanks everybody for that quick fix!