Skip to content

The interrupt test can let its own Ctrl-C escape and abort the whole test run #512

Done

Description

@tae898

The in-process interrupt test can let its own Ctrl-C escape, and pytest then stops the whole run, so one badly timed signal turns a leg red with no failed test to point at.

I saw it once, on main at a9a59ea, in the leg Test arcadedb (linux/amd64, Python 3.13) of the second attempt of run 45959878115. The log ends like this (the last test line is cut off after the name):

tests/test_python_function_interrupt.py::test_sigint_during_a_query_that_calls_python_is_a_keyboard_interrupt
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/opt/hostedtoolcache/Python/3.13.18/x64/lib/python3.13/threading.py:359: KeyboardInterrupt
================= 3137 passed, 1 warning in 490.24s (0:08:10) =================
##[error]Process completed with exit code 2.

What I infer from the code (not reproduced): the test starts its signal timer before the try, and the cleanup runs in finally, so a signal that is raised outside the statement itself is not caught. threading.py:359 is the lock wait of Condition.wait, which the test reaches through timer.start().

Expected: every signal the test sends is caught by the test. The loop in the child process of test_sigint_loop_in_a_fresh_process_ends_cleanly has the same shape.

Activity

  1. self-assigned this
    on Nov 27, 2026
  2. added
    bug
    jvm
    on Nov 27, 2026
  3. added
    concurrency
    python
    on Nov 27, 2026
  4. added this to the 26.12.1 milestone on Nov 27, 2026
  5. added
    in progress
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugconcurrencyin progressjvmpython

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions