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

test_os.TimerfdTests fail on Gentoo #126112

Open
pepoluan opened this issue Oct 29, 2024 · 3 comments
Open

test_os.TimerfdTests fail on Gentoo #126112

pepoluan opened this issue Oct 29, 2024 · 3 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@pepoluan
Copy link
Contributor

pepoluan commented Oct 29, 2024

Bug report

Bug description:

When compiling dev-lang/python-3.13.0 on Gentoo, the following tests failed:

======================================================================
FAIL: test_timerfd_interval (test.test_os.TimerfdTests.test_timerfd_interval)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-3.13.0/work/Python-3.13.0/Lib/test/test_os.py", line 4238, in test_timerfd_interval
    self.assertEqual(self.read_count_signaled(fd), 1)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 4 != 1

======================================================================
FAIL: test_timerfd_ns_select (test.test_os.TimerfdTests.test_timerfd_ns_select)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-3.13.0/work/Python-3.13.0/Lib/test/test_os.py", line 4457, in test_timerfd_ns_select
    self.assertEqual(self.read_count_signaled(fd), 1)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 2 != 1

======================================================================
FAIL: test_timerfd_poll (test.test_os.TimerfdTests.test_timerfd_poll)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-3.13.0/work/Python-3.13.0/Lib/test/test_os.py", line 4349, in test_timerfd_poll
    self.check_timerfd_poll(False)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
  File "/var/tmp/portage/dev-lang/python-3.13.0/work/Python-3.13.0/Lib/test/test_os.py", line 4337, in check_timerfd_poll
    self.assertEqual(self.read_count_signaled(fd), 1)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 2 != 1

======================================================================
FAIL: test_timerfd_select (test.test_os.TimerfdTests.test_timerfd_select)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-3.13.0/work/Python-3.13.0/Lib/test/test_os.py", line 4292, in test_timerfd_select
    self.assertEqual(self.read_count_signaled(fd), 1)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 5 != 1

----------------------------------------------------------------------
Ran 366 tests in 32.208s

FAILED (failures=4, skipped=62)
test test_os failed

USE flags used are:

USE="ensurepip gdbm ncurses pgo readline sqlite ssl -bluetooth -build -debug -examples (-jit) -libedit* -test -tk -valgrind -verify-sig"

which resulted in the following ./configure invocation:

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --datarootdir=/usr/share --docdir=/usr/share/doc/python-3.13.0 --htmldir=/usr/share/doc/python-3.13.0/html --libdir=/usr/lib64 ac_cv_header_stropts_h=no --enable-shared --without-static-libpython --enable-ipv6 --infodir=${prefix}/share/info --mandir=${prefix}/share/man --with-computed-gotos --with-dbmliborder=gdbm --with-libc= --enable-loadable-sqlite-extensions --without-ensurepip --without-lto --with-system-expat --with-system-libmpdec --with-platlibdir=lib --with-pkg-config=yes --with-wheel-pkg-dir=/usr/lib/python/ensurepip --enable-gil --without-assertions --disable-experimental-jit --enable-optimizations --with-readline=readline --without-valgrind --with-lto

CPython versions tested on:

3.13.0, 3.13.1

Operating systems tested on:

Linux (Gentoo)

@pepoluan pepoluan added the type-bug An unexpected behavior, bug, or error label Oct 29, 2024
@picnixz picnixz added the tests Tests in the Lib/test dir label Oct 29, 2024
@pepoluan
Copy link
Contributor Author

I think this bug is similar to #124873 , though that one was on Android, while this one is on a (heavily-customized) Gentoo Linux.

@pepoluan
Copy link
Contributor Author

Update:

Upgrading to 3.13.1 still resulted in a similar error:


======================================================================
FAIL: test_timerfd_TFD_TIMER_ABSTIME (test.test_os.TimerfdTests.test_timerfd_TFD_TIMER_ABSTIME)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-3.13.1/work/Python-3.13.1/Lib/test/test_os.py", line 4266, in test_timerfd_TFD_TIMER_ABSTIME
    self.assertAlmostEqual(next_expiration, offset, places=self.CLOCK_RES_PLACES)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 0.99945497 != 1 within 3 places (0.0005450299999999464 difference)

======================================================================
FAIL: test_timerfd_ns_poll (test.test_os.TimerfdTests.test_timerfd_ns_poll)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-3.13.1/work/Python-3.13.1/Lib/test/test_os.py", line 4353, in test_timerfd_ns_poll
    self.check_timerfd_poll(True)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/var/tmp/portage/dev-lang/python-3.13.1/work/Python-3.13.1/Lib/test/test_os.py", line 4338, in check_timerfd_poll
    self.assertEqual(self.read_count_signaled(fd), 1)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 4 != 1

----------------------------------------------------------------------
Ran 366 tests in 34.558s

FAILED (failures=2, skipped=62)
test test_os failed

@mhsmith
Copy link
Member

mhsmith commented Dec 13, 2024

Interesting – I couldn't see how the test could fail this way unless the process had been suspended for 1/8 of a second. This seemed unlikely even on an Android emulator, but possible given Android's heavily customized process management. But if it's failing even on Linux, there's probably some other cause.

@mhsmith mhsmith changed the title test_os.TimerfdTests fail test_os.TimerfdTests fail on Gentoo Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants