Skip to content

test_os.Win32KillTests: test_CTRL_BREAK_EVENT() failed on GHA Windows x64 #109888

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
vstinner opened this issue Sep 26, 2023 · 0 comments
Closed
Labels
OS-windows tests Tests in the Lib/test dir

Comments

@vstinner
Copy link
Member

vstinner commented Sep 26, 2023

Windows x64 failed:

ERROR: test_CTRL_BREAK_EVENT (test.test_os.Win32KillTests.test_CTRL_BREAK_EVENT)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\cpython\cpython\Lib\test\test_os.py", line 2616, in test_CTRL_BREAK_EVENT
    self._kill_with_event(signal.CTRL_BREAK_EVENT, "CTRL_BREAK_EVENT")
  File "D:\a\cpython\cpython\Lib\test\test_os.py", line 2591, in _kill_with_event
    os.kill(proc.pid, signal.SIGINT)
PermissionError: [WinError 5] Access is denied

Test passed when re-run:

test_CTRL_BREAK_EVENT (test.test_os.Win32KillTests.test_CTRL_BREAK_EVENT) ... ok

build: https://github.com/python/cpython/actions/runs/6309792803/job/17130459509?pr=109887

Linked PRs

@vstinner vstinner added the tests Tests in the Lib/test dir label Sep 26, 2023
vstinner added a commit to vstinner/cpython that referenced this issue Oct 5, 2023
Replace os.kill() with proc.kill() which catchs PermissionError.

Rewrite _kill_with_event():

* Use subprocess context manager ("with proc:").
* Use sleeping_retry() to wait until the child process is ready.
* Replace SIGINT with proc.kill() on error.
* Replace 0.5 seconds with SHORT_TIMEOUT.
vstinner added a commit to vstinner/cpython that referenced this issue Oct 5, 2023
Replace os.kill() with proc.kill() which catchs PermissionError.

Rewrite _kill_with_event():

* Use subprocess context manager ("with proc:").
* Use sleeping_retry() to wait until the child process is ready.
* Replace SIGINT with proc.kill() on error.
* Replace 0.5 seconds with SHORT_TIMEOUT.
vstinner added a commit to vstinner/cpython that referenced this issue Oct 5, 2023
Replace os.kill() with proc.kill() which catchs PermissionError.

Rewrite _kill_with_event():

* Use subprocess context manager ("with proc:").
* Use sleeping_retry() to wait until the child process is ready.
* Replace SIGINT with proc.kill() on error.
* Replace 10 seconds with SHORT_TIMEOUT to wait until the process is
  ready.
* Replace 0.5 seconds with SHORT_TIMEOUT to wait for the process
  exit.
vstinner added a commit that referenced this issue Oct 5, 2023
Replace os.kill() with proc.kill() which catchs PermissionError.

Rewrite _kill_with_event():

* Use subprocess context manager ("with proc:").
* Use sleeping_retry() to wait until the child process is ready.
* Replace SIGINT with proc.kill() on error.
* Replace 10 seconds with SHORT_TIMEOUT to wait until the process is
  ready.
* Replace 0.5 seconds with SHORT_TIMEOUT to wait for the process
  exit.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 5, 2023
…110421)

Replace os.kill() with proc.kill() which catchs PermissionError.

Rewrite _kill_with_event():

* Use subprocess context manager ("with proc:").
* Use sleeping_retry() to wait until the child process is ready.
* Replace SIGINT with proc.kill() on error.
* Replace 10 seconds with SHORT_TIMEOUT to wait until the process is
  ready.
* Replace 0.5 seconds with SHORT_TIMEOUT to wait for the process
  exit.
(cherry picked from commit aaf297c)

Co-authored-by: Victor Stinner <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 5, 2023
…110421)

Replace os.kill() with proc.kill() which catchs PermissionError.

Rewrite _kill_with_event():

* Use subprocess context manager ("with proc:").
* Use sleeping_retry() to wait until the child process is ready.
* Replace SIGINT with proc.kill() on error.
* Replace 10 seconds with SHORT_TIMEOUT to wait until the process is
  ready.
* Replace 0.5 seconds with SHORT_TIMEOUT to wait for the process
  exit.
(cherry picked from commit aaf297c)

Co-authored-by: Victor Stinner <[email protected]>
vstinner added a commit that referenced this issue Oct 5, 2023
… (#110443)

gh-109888: Fix test_os _kill_with_event() on Windows (GH-110421)

Replace os.kill() with proc.kill() which catchs PermissionError.

Rewrite _kill_with_event():

* Use subprocess context manager ("with proc:").
* Use sleeping_retry() to wait until the child process is ready.
* Replace SIGINT with proc.kill() on error.
* Replace 10 seconds with SHORT_TIMEOUT to wait until the process is
  ready.
* Replace 0.5 seconds with SHORT_TIMEOUT to wait for the process
  exit.
(cherry picked from commit aaf297c)

Co-authored-by: Victor Stinner <[email protected]>
vstinner added a commit that referenced this issue Oct 5, 2023
… (#110442)

gh-109888: Fix test_os _kill_with_event() on Windows (GH-110421)

Replace os.kill() with proc.kill() which catchs PermissionError.

Rewrite _kill_with_event():

* Use subprocess context manager ("with proc:").
* Use sleeping_retry() to wait until the child process is ready.
* Replace SIGINT with proc.kill() on error.
* Replace 10 seconds with SHORT_TIMEOUT to wait until the process is
  ready.
* Replace 0.5 seconds with SHORT_TIMEOUT to wait for the process
  exit.
(cherry picked from commit aaf297c)

Co-authored-by: Victor Stinner <[email protected]>
Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
…0421)

Replace os.kill() with proc.kill() which catchs PermissionError.

Rewrite _kill_with_event():

* Use subprocess context manager ("with proc:").
* Use sleeping_retry() to wait until the child process is ready.
* Replace SIGINT with proc.kill() on error.
* Replace 10 seconds with SHORT_TIMEOUT to wait until the process is
  ready.
* Replace 0.5 seconds with SHORT_TIMEOUT to wait for the process
  exit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-windows tests Tests in the Lib/test dir
Projects
None yet
Development

No branches or pull requests

2 participants