Skip to content

test_timerfd_negative hangs indefinitely, causes system freeze on NetBSD #131263

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

Closed
furkanonder opened this issue Mar 14, 2025 · 4 comments
Closed
Labels
3.13 bugs and security fixes 3.14 bugs and security fixes OS-netbsd tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@furkanonder
Copy link
Contributor

furkanonder commented Mar 14, 2025

Bug report

Bug description:

When running the test_timerfd_negative test from test_os.TimerfdTests, the test process hangs indefinitely, cannot be interrupted with Control-C or Control-D, and eventually causes the entire system to freeze.

Configuration:

./configure --with-pydebug

Test

./python -m test test_os -m test_timerfd_negative -v

Output:

== CPython 3.14.0a6+ (heads/main:26511993e63, Mar 15 2025, 00:00:15) [GCC 10.5.0]
== NetBSD-10.0-amd64-x86_64-64bit-ELF little-endian
== Python build: debug
== cwd: /home/blue/cpython/build/test_python_worker_20759æ
== CPU count: 16
== encodings: locale=UTF-8 FS=utf-8
== resources: all test resources are disabled, use -u option to unskip tests
Using random seed: 886729535
0:00:00 load avg: 0.19 Run 1 test sequentially in a single process
0:00:00 load avg: 0.19 [1/1] test_os
test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) ...
  test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=-1, interval=0) ... FAIL
  test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=1, initial=-1, interval=0) ... FAIL
  test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=3, initial=-1, interval=0) ... FAIL
  test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=1, interval=-1) ... FAIL
  test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=1, initial=1, interval=-1) ... FAIL
  test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=3, initial=1, interval=-1) ... FAIL
  test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=-1, interval=-1) ... FAIL
  test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=1, initial=-1, interval=-1) ... FAIL
  test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=3, initial=-1, interval=-1) ... FAIL
  test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=-0.1, interval=0) ... FAIL
  test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=1, initial=-0.1, interval=0) ... FAIL
  test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=3, initial=-0.1, interval=0) ... FAIL
  test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=1, interval=-0.1) ... FAIL
  test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=1, initial=1, interval=-0.1) ... FAIL
  test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=3, initial=1, interval=-0.1) ... FAIL
  test_timerfd_negative (test.test_os.TimerfdTests.test_timerfd_negative) (flags=0, initial=-0.1, interval=-0.1) ... FAIL

OS: NetBSD-10.0-amd64

CPython versions tested on:

CPython main branch, 3.13, 3.14

Operating systems tested on:

Other

Linked PRs

@furkanonder furkanonder added 3.13 bugs and security fixes 3.14 bugs and security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Mar 14, 2025
@furkanonder furkanonder changed the title NetBSD: test_timerfd_negative hangs indefinitely, causes system freeze test_timerfd_negative hangs indefinitely, causes system freeze on NetBSD Mar 14, 2025
@zware
Copy link
Member

zware commented Mar 15, 2025

That seems like a platform bug; the test is just checking that OSError is raised for nonsensical arguments.

More interestingly, that entire test class is supposed to be skipped except on Linux >=2.6.30, why isn't it?

cc @vstinner, ref gh-108277

@vstinner
Copy link
Member

More interestingly, that entire test class is supposed to be skipped except on Linux >=2.6.30, why isn't it?

@support.requires_linux_version(2, 6, 30) only skips the test on Linux if the kernel is too old.

@vstinner
Copy link
Member

vstinner commented Mar 18, 2025

When running the test_timerfd_negative test from test_os.TimerfdTests, the test process hangs indefinitely, cannot be interrupted with Control-C or Control-D, and eventually causes the entire system to freeze.

I suggest to skip the test on NetBSD with a reference to this issue.

@furkanonder: Do you want to propose a fix?

@furkanonder
Copy link
Contributor Author

When running the test_timerfd_negative test from test_os.TimerfdTests, the test process hangs indefinitely, cannot be interrupted with Control-C or Control-D, and eventually causes the entire system to freeze.

I suggest to skip the test on NetBSD with a reference to this issue.

@furkanonder: Do you want to propose a fix?

I opened a PR to skip the test on NetBSD.

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Mar 19, 2025
…em freeze (pythonGH-131431)

(cherry picked from commit 8ad4646)

Co-authored-by: Furkan Onder <[email protected]>
vstinner pushed a commit that referenced this issue Mar 19, 2025
…tem freeze (GH-131431) (#131451)

gh-131263: Skip test_timerfd_negative on NetBSD to prevent system freeze (GH-131431)
(cherry picked from commit 8ad4646)

Co-authored-by: Furkan Onder <[email protected]>
colesbury pushed a commit to colesbury/cpython that referenced this issue Mar 20, 2025
seehwan pushed a commit to seehwan/cpython that referenced this issue Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes 3.14 bugs and security fixes OS-netbsd 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