Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.12] test_compileall failed in 2038 #124851

Open
bmwiedemann opened this issue Oct 1, 2024 · 3 comments
Open

[3.12] test_compileall failed in 2038 #124851

bmwiedemann opened this issue Oct 1, 2024 · 3 comments
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@bmwiedemann
Copy link
Contributor

bmwiedemann commented Oct 1, 2024

Bug report

Bug description:

While working on reproducible builds for openSUSE (sponsored by the NLnet NGI0 fund), I found that
our python312 package fails to build when the build runs in a VM with
qemu-kvm -rtc base=2038-01-20T00:00:00

# Add a code block here, if required
 ======================================================================
 FAIL: test_import (test.test_compileall.HardlinkDedupTestsNoSourceEpoch.test_import)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/abuild/rpmbuild/BUILD/Python-3.12.6/Lib/test/test_py_compile.py", line 22, in wrapper 
     return fxn(*args, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^
   File "/home/abuild/rpmbuild/BUILD/Python-3.12.6/Lib/test/test_compileall.py", line 1114, in test_import
     self.assertFalse(is_hardlink(pycs[1], pycs[2]))
 AssertionError: True is not false

3.13 seems to not be affected by the issue in test_compileall.

The full log is at https://rb.zq1.de/other/python312-ftbfs2038.log.txt
(there are also some expiring SSL certs)

CPython versions tested on:

3.12

Operating systems tested on:

Linux

@bmwiedemann bmwiedemann added the type-bug An unexpected behavior, bug, or error label Oct 1, 2024
@bmwiedemann
Copy link
Contributor Author

For python 3.13, I found 2037-10-28 as the date when tests start to fail (test.test_asyncio.test_events test_imaplib test_poplib test_ssl)

@picnixz
Copy link
Contributor

picnixz commented Oct 2, 2024

For 2038, isn't it related to Unix max timestamp value? (which is January 19, 2038, at 03:14:07). As for 2037-10-28, could it be because we use some offset in the tests (like a fake delta time)?

@picnixz picnixz added tests Tests in the Lib/test dir 3.12 bugs and security fixes 3.13 bugs and security fixes labels Oct 2, 2024
@bmwiedemann
Copy link
Contributor Author

There are various test certs set to expire in 2037, e.g.:

openssl x509 -text < Python-3.13.0rc2/Lib/test/certdata/pycacert.pem | grep After
            Not After : Oct 28 14:23:16 2037 GMT

The previous compileall 2038 bug from 2018 was https://bugs.python.org/issue34990

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants