Skip to content

test_timerfd_negative hangs indefinitely, causes system freeze on NetBSD #131263

Closed

Description

@furkanonder

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

Activity

  1. added
    3.13only security fixes
    3.14bugs and security fixes
    testsTests in the Lib/test dir
    type-bugAn unexpected behavior, bug, or error
    on Mar 14, 2025
  2. changed the title [-]NetBSD: test_timerfd_negative hangs indefinitely, causes system freeze[/-] [+]test_timerfd_negative hangs indefinitely, causes system freeze on NetBSD[/+] on Mar 14, 2025
  3. zware commented on Mar 15, 2025

    @zware
    Member

    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

  4. vstinner commented on Mar 18, 2025

    @vstinner
    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.

  5. vstinner commented on Mar 18, 2025

    @vstinner
    Member

    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?

  6. furkanonder commented on Mar 18, 2025

    @furkanonder
    ContributorAuthor

    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.

  7. added a commit that references this issue on Mar 19, 2025
  8. added a commit that references this issue on Mar 19, 2025
  9. added a commit that references this issue on Mar 19, 2025
  10. added a commit that references this issue on Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13only security fixes3.14bugs and security fixesOS-netbsdtestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions