With Python 3.11, the test suite will fail to terminate some server.py instances because they left behind zombie children, which will be returned by psutil.wait_procs
as "alive" and thereby cause XProcessInfo.terminate
to return failure.
============================= test session starts ==============================
platform linux -- Python 3.11.1, pytest-7.2.0, pluggy-1.0.0+repack -- /usr/bin/python3.11
cachedir: .pytest_cache
rootdir: /<<PKGBUILDDIR>>, configfile: tox.ini
plugins: xprocess-0.21.0
collecting ... collected 45 items / 2 deselected / 43 selected
tests/test_callback.py::test_callback_success[s1] PASSED [ 2%]
tests/test_callback.py::test_callback_success[s2] PASSED [ 4%]
tests/test_callback.py::test_callback_success[s3] PASSED [ 6%]
tests/test_callback.py::test_callback_fail[s1] PASSED [ 9%]
tests/test_callback.py::test_callback_fail[s2] PASSED [ 11%]
tests/test_callback.py::test_callback_fail[s3] PASSED [ 13%]
tests/test_functional_workflow.py::test_functional_work_flow FAILED [ 16%]
tests/test_process_initialization.py::test_servers_start[s1] PASSED [ 18%]
tests/test_process_initialization.py::test_servers_start[s2] PASSED [ 20%]
tests/test_process_initialization.py::test_servers_start[s3] PASSED [ 23%]
tests/test_process_initialization.py::test_ensure_not_restart[s1] PASSED [ 25%]
tests/test_process_initialization.py::test_ensure_not_restart[s2] PASSED [ 27%]
tests/test_process_initialization.py::test_ensure_not_restart[s3] PASSED [ 30%]
tests/test_process_initialization.py::test_startup_detection_max_read_lines[s1-started-20] PASSED [ 32%]
tests/test_process_initialization.py::test_startup_detection_max_read_lines[s2-spam, bacon, eggs-30] PASSED [ 34%]
tests/test_process_initialization.py::test_startup_detection_max_read_lines[s3-finally started-62] PASSED [ 37%]
tests/test_process_initialization.py::test_runtime_error_on_start_fail[s1] PASSED [ 39%]
tests/test_process_initialization.py::test_runtime_error_on_start_fail[s2] PASSED [ 41%]
tests/test_process_initialization.py::test_runtime_error_on_start_fail[s3] PASSED [ 44%]
tests/test_process_initialization.py::test_popen_kwargs[s1] PASSED [ 46%]
tests/test_process_initialization.py::test_popen_kwargs[s2] PASSED [ 48%]
tests/test_process_initialization.py::test_popen_kwargs[s3] PASSED [ 51%]
tests/test_process_termination.py::test_clean_shutdown[s1] FAILED [ 53%]
tests/test_process_termination.py::test_clean_shutdown[s2] FAILED [ 55%]
tests/test_process_termination.py::test_clean_shutdown[s3] FAILED [ 58%]
tests/test_process_termination.py::test_terminate_no_pid[s1] PASSED [ 60%]
tests/test_process_termination.py::test_terminate_no_pid[s2] PASSED [ 62%]
tests/test_process_termination.py::test_terminate_no_pid[s3] PASSED [ 65%]
tests/test_process_termination.py::test_terminate_only_parent[s1] PASSED [ 67%]
tests/test_process_termination.py::test_terminate_only_parent[s2] PASSED [ 69%]
tests/test_process_termination.py::test_terminate_only_parent[s3] PASSED [ 72%]
tests/test_process_termination.py::test_sigkill_after_failed_sigterm[s1] FAILED [ 74%]
tests/test_process_termination.py::test_sigkill_after_failed_sigterm[s2] FAILED [ 76%]
tests/test_process_termination.py::test_sigkill_after_failed_sigterm[s3] FAILED [ 79%]
tests/test_process_termination.py::test_return_value_on_failure[s1] PASSED [ 81%]
tests/test_process_termination.py::test_return_value_on_failure[s2] PASSED [ 83%]
tests/test_process_termination.py::test_return_value_on_failure[s3] PASSED [ 86%]
tests/test_resource_cleanup.py::test_0 PASSED [ 88%]
tests/test_resource_cleanup.py::test_1 PASSED [ 90%]
tests/test_resource_cleanup.py::test_2 PASSED [ 93%]
tests/test_startup_timeout.py::test_timeout_raise_exception[s1] PASSED [ 95%]
tests/test_startup_timeout.py::test_timeout_raise_exception[s2] PASSED [ 97%]
tests/test_startup_timeout.py::test_timeout_raise_exception[s3] PASSED [100%]
=================================== FAILURES ===================================
__________________________ test_functional_work_flow ___________________________
testdir = <Testdir local('/tmp/pytest-of-roehling/pytest-0/test_functional_work_flow0')>
tcp_port = 47033
def test_functional_work_flow(testdir, tcp_port):
server_path = Path(__file__).parent.joinpath("server.py").absolute()
testdir.makepyfile(
"""
import sys
import socket
from xprocess import ProcessStarter
def test_server(request, xprocess):
port = %r
data = "spam\\n"
server_path = %r
class Starter(ProcessStarter):
pattern = "started"
max_read_lines = 200
args = [sys.executable, server_path, port]
# required so test won't hang on pytest_unconfigure
xprocess.proc_wait_timeout = 1
xprocess.ensure("server_workflow_test", Starter)
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
sock.connect(("localhost", port))
sock.sendall(bytes(data, "utf-8"))
received = str(sock.recv(1024), "utf-8")
assert received == data.upper()
"""
% (tcp_port, str(server_path))
)
result = testdir.runpytest()
result.stdout.fnmatch_lines("*1 passed*")
result = testdir.runpytest("--xshow")
result.stdout.fnmatch_lines("*LIVE*")
result = testdir.runpytest("--xkill")
> result.stdout.fnmatch_lines("*TERMINATED*")
E Failed: nomatch: '*TERMINATED*'
E and: "could not terminated process [psutil.Process(pid=175, name='python3.11', status='zombie', started='20:21:21'), psutil.Process(pid=176, name='python3.11', status='zombie', started='20:21:21'), psutil.Process(pid=177, name='python3.11', status='zombie', started='20:21:21')]"
E and: '174 server_workflow_test FAILED TO TERMINATE'
E remains unmatched: '*TERMINATED*'
/<<PKGBUILDDIR>>/tests/test_functional_workflow.py:40: Failed
----------------------------- Captured stdout call -----------------------------
============================= test session starts ==============================
platform linux -- Python 3.11.1, pytest-7.2.0, pluggy-1.0.0+repack
rootdir: /tmp/pytest-of-roehling/pytest-0/test_functional_work_flow0
plugins: xprocess-0.21.0
collected 1 item
test_functional_work_flow.py . [100%]
============================== 1 passed in 0.23s ===============================
174 server_workflow_test LIVE /tmp/pytest-of-roehling/pytest-0/test_functional_work_flow0/.pytest_cache/d/.xprocess/server_workflow_test/xprocess.log
could not terminated process [psutil.Process(pid=175, name='python3.11', status='zombie', started='20:21:21'), psutil.Process(pid=176, name='python3.11', status='zombie', started='20:21:21'), psutil.Process(pid=177, name='python3.11', status='zombie', started='20:21:21')]
174 server_workflow_test FAILED TO TERMINATE
___________________________ test_clean_shutdown[s1] ____________________________
tcp_port = 47401, proc_name = 's1'
xprocess = <xprocess.xprocess.XProcess object at 0x7f3690b60850>
@pytest.mark.parametrize("proc_name", ["s1", "s2", "s3"])
def test_clean_shutdown(tcp_port, proc_name, xprocess):
class Starter(ProcessStarter):
pattern = "started"
args = [sys.executable, server_path, tcp_port]
xprocess.ensure(proc_name, Starter)
info = xprocess.getinfo(proc_name)
assert info.isrunning()
children = psutil.Process(info.pid).children()
> assert info.terminate() == 1
E assert -1 == 1
E + where -1 = <bound method XProcessInfo.terminate of <xprocess.xprocess.XProcessInfo object at 0x7f369090b310>>()
E + where <bound method XProcessInfo.terminate of <xprocess.xprocess.XProcessInfo object at 0x7f369090b310>> = <xprocess.xprocess.XProcessInfo object at 0x7f369090b310>.terminate
tests/test_process_termination.py:22: AssertionError
----------------------------- Captured stdout call -----------------------------
/<<PKGBUILDDIR>>/.pytest_cache/d/.xprocess/s1$ /usr/bin/python3.11 /<<PKGBUILDDIR>>/tests/server.py 47401
process 's1' started pid=193
0 , % /.%,@%@._%%# #/%/ %
1 , % /.%,@%@._%%# #/%/ %
2 , % /.%,@%@._%%# #/%/ %
3 , % /.%,@%@._%%# #/%/ %
4 , % /.%,@%@._%%# #/%/ %
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
started
s1 process startup detected
could not terminated process [psutil.Process(pid=194, name='python3.11', status='zombie', started='20:22:05'), psutil.Process(pid=195, name='python3.11', status='zombie', started='20:22:05'), psutil.Process(pid=196, name='python3.11', status='zombie', started='20:22:05')]
___________________________ test_clean_shutdown[s2] ____________________________
tcp_port = 44317, proc_name = 's2'
xprocess = <xprocess.xprocess.XProcess object at 0x7f3690b60850>
@pytest.mark.parametrize("proc_name", ["s1", "s2", "s3"])
def test_clean_shutdown(tcp_port, proc_name, xprocess):
class Starter(ProcessStarter):
pattern = "started"
args = [sys.executable, server_path, tcp_port]
xprocess.ensure(proc_name, Starter)
info = xprocess.getinfo(proc_name)
assert info.isrunning()
children = psutil.Process(info.pid).children()
> assert info.terminate() == 1
E assert -1 == 1
E + where -1 = <bound method XProcessInfo.terminate of <xprocess.xprocess.XProcessInfo object at 0x7f3690908250>>()
E + where <bound method XProcessInfo.terminate of <xprocess.xprocess.XProcessInfo object at 0x7f3690908250>> = <xprocess.xprocess.XProcessInfo object at 0x7f3690908250>.terminate
tests/test_process_termination.py:22: AssertionError
----------------------------- Captured stdout call -----------------------------
/<<PKGBUILDDIR>>/.pytest_cache/d/.xprocess/s2$ /usr/bin/python3.11 /<<PKGBUILDDIR>>/tests/server.py 44317
process 's2' started pid=197
0 , % /.%,@%@._%%# #/%/ %
1 , % /.%,@%@._%%# #/%/ %
2 , % /.%,@%@._%%# #/%/ %
3 , % /.%,@%@._%%# #/%/ %
4 , % /.%,@%@._%%# #/%/ %
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
started
s2 process startup detected
could not terminated process [psutil.Process(pid=199, name='python3.11', status='zombie', started='20:22:46'), psutil.Process(pid=200, name='python3.11', status='zombie', started='20:22:46'), psutil.Process(pid=198, name='python3.11', status='zombie', started='20:22:46')]
___________________________ test_clean_shutdown[s3] ____________________________
tcp_port = 37985, proc_name = 's3'
xprocess = <xprocess.xprocess.XProcess object at 0x7f3690b60850>
@pytest.mark.parametrize("proc_name", ["s1", "s2", "s3"])
def test_clean_shutdown(tcp_port, proc_name, xprocess):
class Starter(ProcessStarter):
pattern = "started"
args = [sys.executable, server_path, tcp_port]
xprocess.ensure(proc_name, Starter)
info = xprocess.getinfo(proc_name)
assert info.isrunning()
children = psutil.Process(info.pid).children()
> assert info.terminate() == 1
E assert -1 == 1
E + where -1 = <bound method XProcessInfo.terminate of <xprocess.xprocess.XProcessInfo object at 0x7f3690903bd0>>()
E + where <bound method XProcessInfo.terminate of <xprocess.xprocess.XProcessInfo object at 0x7f3690903bd0>> = <xprocess.xprocess.XProcessInfo object at 0x7f3690903bd0>.terminate
tests/test_process_termination.py:22: AssertionError
----------------------------- Captured stdout call -----------------------------
/<<PKGBUILDDIR>>/.pytest_cache/d/.xprocess/s3$ /usr/bin/python3.11 /<<PKGBUILDDIR>>/tests/server.py 37985
process 's3' started pid=201
0 , % /.%,@%@._%%# #/%/ %
1 , % /.%,@%@._%%# #/%/ %
2 , % /.%,@%@._%%# #/%/ %
3 , % /.%,@%@._%%# #/%/ %
4 , % /.%,@%@._%%# #/%/ %
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
started
s3 process startup detected
could not terminated process [psutil.Process(pid=204, name='python3.11', status='zombie', started='20:23:26'), psutil.Process(pid=202, name='python3.11', status='zombie', started='20:23:26'), psutil.Process(pid=203, name='python3.11', status='zombie', started='20:23:26')]
____________________ test_sigkill_after_failed_sigterm[s1] _____________________
self = <psutil._pslinux.Process object at 0x7f36908f34c0>
@functools.wraps(fun)
def wrapper(self):
try:
# case 1: we previously entered oneshot() ctx
> ret = self._cache[fun]
E AttributeError: 'Process' object has no attribute '_cache'
/usr/lib/python3/dist-packages/psutil/_common.py:443: AttributeError
During handling of the above exception, another exception occurred:
self = <psutil._pslinux.Process object at 0x7f36908f34c0>, args = ()
kwargs = {}
@functools.wraps(fun)
def wrapper(self, *args, **kwargs):
try:
> return fun(self, *args, **kwargs)
/usr/lib/python3/dist-packages/psutil/_pslinux.py:1645:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <psutil._pslinux.Process object at 0x7f36908f34c0>
@functools.wraps(fun)
def wrapper(self):
try:
# case 1: we previously entered oneshot() ctx
ret = self._cache[fun]
except AttributeError:
# case 2: we never entered oneshot() ctx
> return fun(self)
/usr/lib/python3/dist-packages/psutil/_common.py:446:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <psutil._pslinux.Process object at 0x7f36908f34c0>
@wrap_exceptions
@memoize_when_activated
def _parse_stat_file(self):
"""Parse /proc/{pid}/stat file and return a dict with various
process info.
Using "man proc" as a reference: where "man proc" refers to
position N always subtract 3 (e.g ppid position 4 in
'man proc' == position 1 in here).
The return value is cached in case oneshot() ctx manager is
in use.
"""
> data = bcat("%s/%s/stat" % (self._procfs_path, self.pid))
/usr/lib/python3/dist-packages/psutil/_pslinux.py:1687:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fname = '/proc/229/stat', fallback = <object object at 0x7f36917e8d80>
def bcat(fname, fallback=_DEFAULT):
"""Same as above but opens file in binary mode."""
> return cat(fname, fallback=fallback, _open=open_binary)
/usr/lib/python3/dist-packages/psutil/_common.py:776:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fname = '/proc/229/stat', fallback = <object object at 0x7f36917e8d80>
_open = <function open_binary at 0x7f3690af3a60>
def cat(fname, fallback=_DEFAULT, _open=open_text):
"""Read entire file content and return it as a string. File is
opened in text mode. If specified, `fallback` is the value
returned in case of error, either if the file does not exist or
it can't be read().
"""
if fallback is _DEFAULT:
> with _open(fname) as f:
/usr/lib/python3/dist-packages/psutil/_common.py:764:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fname = '/proc/229/stat'
def open_binary(fname):
> return open(fname, "rb", buffering=FILE_READ_BUFFER_SIZE)
E FileNotFoundError: [Errno 2] No such file or directory: '/proc/229/stat'
/usr/lib/python3/dist-packages/psutil/_common.py:728: FileNotFoundError
During handling of the above exception, another exception occurred:
self = psutil.Process(pid=229, status='terminated'), pid = 229
_ignore_nsp = False
def _init(self, pid, _ignore_nsp=False):
if pid is None:
pid = os.getpid()
else:
if not _PY3 and not isinstance(pid, (int, long)):
raise TypeError('pid must be an integer (got %r)' % pid)
if pid < 0:
raise ValueError('pid must be a positive integer (got %s)'
% pid)
self._pid = pid
self._name = None
self._exe = None
self._create_time = None
self._gone = False
self._pid_reused = False
self._hash = None
self._lock = threading.RLock()
# used for caching on Windows only (on POSIX ppid may change)
self._ppid = None
# platform-specific modules define an _psplatform.Process
# implementation class
self._proc = _psplatform.Process(pid)
self._last_sys_cpu_times = None
self._last_proc_cpu_times = None
self._exitcode = _SENTINEL
# cache creation time for later use in is_running() method
try:
> self.create_time()
/usr/lib/python3/dist-packages/psutil/__init__.py:361:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = psutil.Process(pid=229, status='terminated')
def create_time(self):
"""The process creation time as a floating point number
expressed in seconds since the epoch.
The return value is cached after first call.
"""
if self._create_time is None:
> self._create_time = self._proc.create_time()
/usr/lib/python3/dist-packages/psutil/__init__.py:714:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <psutil._pslinux.Process object at 0x7f36908f34c0>, args = ()
kwargs = {}
@functools.wraps(fun)
def wrapper(self, *args, **kwargs):
try:
> return fun(self, *args, **kwargs)
/usr/lib/python3/dist-packages/psutil/_pslinux.py:1645:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <psutil._pslinux.Process object at 0x7f36908f34c0>
@wrap_exceptions
def create_time(self):
> ctime = float(self._parse_stat_file()['create_time'])
/usr/lib/python3/dist-packages/psutil/_pslinux.py:1855:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <psutil._pslinux.Process object at 0x7f36908f34c0>, args = ()
kwargs = {}
@functools.wraps(fun)
def wrapper(self, *args, **kwargs):
try:
return fun(self, *args, **kwargs)
except PermissionError:
raise AccessDenied(self.pid, self._name)
except ProcessLookupError:
raise NoSuchProcess(self.pid, self._name)
except FileNotFoundError:
if not os.path.exists("%s/%s" % (self._procfs_path, self.pid)):
> raise NoSuchProcess(self.pid, self._name)
E psutil.NoSuchProcess: process no longer exists (pid=229)
/usr/lib/python3/dist-packages/psutil/_pslinux.py:1652: NoSuchProcess
During handling of the above exception, another exception occurred:
tcp_port = 39609, proc_name = 's1'
xprocess = <xprocess.xprocess.XProcess object at 0x7f3690b60850>
@pytest.mark.skipif(
sys.platform == "win32",
reason="on windows SIGTERM is treated as an alias for kill()",
)
@pytest.mark.parametrize("proc_name", ["s1", "s2", "s3"])
def test_sigkill_after_failed_sigterm(tcp_port, proc_name, xprocess):
# explicitly tell xprocess_starter fixture to make
# server instance ignore SIGTERM
class Starter(ProcessStarter):
pattern = "started"
args = [sys.executable, server_path, tcp_port, "--ignore-sigterm"]
xprocess.ensure(proc_name, Starter)
info = xprocess.getinfo(proc_name)
# since terminate with sigterm will fail, set a lower
# timeout before sending sigkill so tests won't take too long
> assert (
info.terminate(timeout=2) == 1
or psutil.Process(info.pid).status() == psutil.STATUS_ZOMBIE
)
tests/test_process_termination.py:77:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/psutil/__init__.py:332: in __init__
self._init(pid)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = psutil.Process(pid=229, status='terminated'), pid = 229
_ignore_nsp = False
def _init(self, pid, _ignore_nsp=False):
if pid is None:
pid = os.getpid()
else:
if not _PY3 and not isinstance(pid, (int, long)):
raise TypeError('pid must be an integer (got %r)' % pid)
if pid < 0:
raise ValueError('pid must be a positive integer (got %s)'
% pid)
self._pid = pid
self._name = None
self._exe = None
self._create_time = None
self._gone = False
self._pid_reused = False
self._hash = None
self._lock = threading.RLock()
# used for caching on Windows only (on POSIX ppid may change)
self._ppid = None
# platform-specific modules define an _psplatform.Process
# implementation class
self._proc = _psplatform.Process(pid)
self._last_sys_cpu_times = None
self._last_proc_cpu_times = None
self._exitcode = _SENTINEL
# cache creation time for later use in is_running() method
try:
self.create_time()
except AccessDenied:
# We should never get here as AFAIK we're able to get
# process creation time on all platforms even as a
# limited user.
pass
except ZombieProcess:
# Zombies can still be queried by this class (although
# not always) and pids() return them so just go on.
pass
except NoSuchProcess:
if not _ignore_nsp:
> raise NoSuchProcess(pid, msg='process PID not found')
E psutil.NoSuchProcess: process PID not found (pid=229)
/usr/lib/python3/dist-packages/psutil/__init__.py:373: NoSuchProcess
----------------------------- Captured stdout call -----------------------------
/<<PKGBUILDDIR>>/.pytest_cache/d/.xprocess/s1$ /usr/bin/python3.11 /<<PKGBUILDDIR>>/tests/server.py 39609 --ignore-sigterm
process 's1' started pid=229
0 , % /.%,@%@._%%# #/%/ %
1 , % /.%,@%@._%%# #/%/ %
2 , % /.%,@%@._%%# #/%/ %
3 , % /.%,@%@._%%# #/%/ %
4 , % /.%,@%@._%%# #/%/ %
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
started
s1 process startup detected
could not terminated process [psutil.Process(pid=232, name='python3.11', status='zombie', started='20:26:08'), psutil.Process(pid=230, name='python3.11', status='zombie', started='20:26:08'), psutil.Process(pid=231, name='python3.11', status='zombie', started='20:26:08')]
____________________ test_sigkill_after_failed_sigterm[s2] _____________________
self = <psutil._pslinux.Process object at 0x7f36908f1990>
@functools.wraps(fun)
def wrapper(self):
try:
# case 1: we previously entered oneshot() ctx
> ret = self._cache[fun]
E AttributeError: 'Process' object has no attribute '_cache'
/usr/lib/python3/dist-packages/psutil/_common.py:443: AttributeError
During handling of the above exception, another exception occurred:
self = <psutil._pslinux.Process object at 0x7f36908f1990>, args = ()
kwargs = {}
@functools.wraps(fun)
def wrapper(self, *args, **kwargs):
try:
> return fun(self, *args, **kwargs)
/usr/lib/python3/dist-packages/psutil/_pslinux.py:1645:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <psutil._pslinux.Process object at 0x7f36908f1990>
@functools.wraps(fun)
def wrapper(self):
try:
# case 1: we previously entered oneshot() ctx
ret = self._cache[fun]
except AttributeError:
# case 2: we never entered oneshot() ctx
> return fun(self)
/usr/lib/python3/dist-packages/psutil/_common.py:446:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <psutil._pslinux.Process object at 0x7f36908f1990>
@wrap_exceptions
@memoize_when_activated
def _parse_stat_file(self):
"""Parse /proc/{pid}/stat file and return a dict with various
process info.
Using "man proc" as a reference: where "man proc" refers to
position N always subtract 3 (e.g ppid position 4 in
'man proc' == position 1 in here).
The return value is cached in case oneshot() ctx manager is
in use.
"""
> data = bcat("%s/%s/stat" % (self._procfs_path, self.pid))
/usr/lib/python3/dist-packages/psutil/_pslinux.py:1687:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fname = '/proc/233/stat', fallback = <object object at 0x7f36917e8d80>
def bcat(fname, fallback=_DEFAULT):
"""Same as above but opens file in binary mode."""
> return cat(fname, fallback=fallback, _open=open_binary)
/usr/lib/python3/dist-packages/psutil/_common.py:776:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fname = '/proc/233/stat', fallback = <object object at 0x7f36917e8d80>
_open = <function open_binary at 0x7f3690af3a60>
def cat(fname, fallback=_DEFAULT, _open=open_text):
"""Read entire file content and return it as a string. File is
opened in text mode. If specified, `fallback` is the value
returned in case of error, either if the file does not exist or
it can't be read().
"""
if fallback is _DEFAULT:
> with _open(fname) as f:
/usr/lib/python3/dist-packages/psutil/_common.py:764:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fname = '/proc/233/stat'
def open_binary(fname):
> return open(fname, "rb", buffering=FILE_READ_BUFFER_SIZE)
E FileNotFoundError: [Errno 2] No such file or directory: '/proc/233/stat'
/usr/lib/python3/dist-packages/psutil/_common.py:728: FileNotFoundError
During handling of the above exception, another exception occurred:
self = psutil.Process(pid=233, status='terminated'), pid = 233
_ignore_nsp = False
def _init(self, pid, _ignore_nsp=False):
if pid is None:
pid = os.getpid()
else:
if not _PY3 and not isinstance(pid, (int, long)):
raise TypeError('pid must be an integer (got %r)' % pid)
if pid < 0:
raise ValueError('pid must be a positive integer (got %s)'
% pid)
self._pid = pid
self._name = None
self._exe = None
self._create_time = None
self._gone = False
self._pid_reused = False
self._hash = None
self._lock = threading.RLock()
# used for caching on Windows only (on POSIX ppid may change)
self._ppid = None
# platform-specific modules define an _psplatform.Process
# implementation class
self._proc = _psplatform.Process(pid)
self._last_sys_cpu_times = None
self._last_proc_cpu_times = None
self._exitcode = _SENTINEL
# cache creation time for later use in is_running() method
try:
> self.create_time()
/usr/lib/python3/dist-packages/psutil/__init__.py:361:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = psutil.Process(pid=233, status='terminated')
def create_time(self):
"""The process creation time as a floating point number
expressed in seconds since the epoch.
The return value is cached after first call.
"""
if self._create_time is None:
> self._create_time = self._proc.create_time()
/usr/lib/python3/dist-packages/psutil/__init__.py:714:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <psutil._pslinux.Process object at 0x7f36908f1990>, args = ()
kwargs = {}
@functools.wraps(fun)
def wrapper(self, *args, **kwargs):
try:
> return fun(self, *args, **kwargs)
/usr/lib/python3/dist-packages/psutil/_pslinux.py:1645:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <psutil._pslinux.Process object at 0x7f36908f1990>
@wrap_exceptions
def create_time(self):
> ctime = float(self._parse_stat_file()['create_time'])
/usr/lib/python3/dist-packages/psutil/_pslinux.py:1855:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <psutil._pslinux.Process object at 0x7f36908f1990>, args = ()
kwargs = {}
@functools.wraps(fun)
def wrapper(self, *args, **kwargs):
try:
return fun(self, *args, **kwargs)
except PermissionError:
raise AccessDenied(self.pid, self._name)
except ProcessLookupError:
raise NoSuchProcess(self.pid, self._name)
except FileNotFoundError:
if not os.path.exists("%s/%s" % (self._procfs_path, self.pid)):
> raise NoSuchProcess(self.pid, self._name)
E psutil.NoSuchProcess: process no longer exists (pid=233)
/usr/lib/python3/dist-packages/psutil/_pslinux.py:1652: NoSuchProcess
During handling of the above exception, another exception occurred:
tcp_port = 57689, proc_name = 's2'
xprocess = <xprocess.xprocess.XProcess object at 0x7f3690b60850>
@pytest.mark.skipif(
sys.platform == "win32",
reason="on windows SIGTERM is treated as an alias for kill()",
)
@pytest.mark.parametrize("proc_name", ["s1", "s2", "s3"])
def test_sigkill_after_failed_sigterm(tcp_port, proc_name, xprocess):
# explicitly tell xprocess_starter fixture to make
# server instance ignore SIGTERM
class Starter(ProcessStarter):
pattern = "started"
args = [sys.executable, server_path, tcp_port, "--ignore-sigterm"]
xprocess.ensure(proc_name, Starter)
info = xprocess.getinfo(proc_name)
# since terminate with sigterm will fail, set a lower
# timeout before sending sigkill so tests won't take too long
> assert (
info.terminate(timeout=2) == 1
or psutil.Process(info.pid).status() == psutil.STATUS_ZOMBIE
)
tests/test_process_termination.py:77:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/psutil/__init__.py:332: in __init__
self._init(pid)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = psutil.Process(pid=233, status='terminated'), pid = 233
_ignore_nsp = False
def _init(self, pid, _ignore_nsp=False):
if pid is None:
pid = os.getpid()
else:
if not _PY3 and not isinstance(pid, (int, long)):
raise TypeError('pid must be an integer (got %r)' % pid)
if pid < 0:
raise ValueError('pid must be a positive integer (got %s)'
% pid)
self._pid = pid
self._name = None
self._exe = None
self._create_time = None
self._gone = False
self._pid_reused = False
self._hash = None
self._lock = threading.RLock()
# used for caching on Windows only (on POSIX ppid may change)
self._ppid = None
# platform-specific modules define an _psplatform.Process
# implementation class
self._proc = _psplatform.Process(pid)
self._last_sys_cpu_times = None
self._last_proc_cpu_times = None
self._exitcode = _SENTINEL
# cache creation time for later use in is_running() method
try:
self.create_time()
except AccessDenied:
# We should never get here as AFAIK we're able to get
# process creation time on all platforms even as a
# limited user.
pass
except ZombieProcess:
# Zombies can still be queried by this class (although
# not always) and pids() return them so just go on.
pass
except NoSuchProcess:
if not _ignore_nsp:
> raise NoSuchProcess(pid, msg='process PID not found')
E psutil.NoSuchProcess: process PID not found (pid=233)
/usr/lib/python3/dist-packages/psutil/__init__.py:373: NoSuchProcess
----------------------------- Captured stdout call -----------------------------
/<<PKGBUILDDIR>>/.pytest_cache/d/.xprocess/s2$ /usr/bin/python3.11 /<<PKGBUILDDIR>>/tests/server.py 57689 --ignore-sigterm
process 's2' started pid=233
0 , % /.%,@%@._%%# #/%/ %
1 , % /.%,@%@._%%# #/%/ %
2 , % /.%,@%@._%%# #/%/ %
3 , % /.%,@%@._%%# #/%/ %
4 , % /.%,@%@._%%# #/%/ %
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
started
s2 process startup detected
could not terminated process [psutil.Process(pid=236, name='python3.11', status='zombie', started='20:26:12'), psutil.Process(pid=234, name='python3.11', status='zombie', started='20:26:12'), psutil.Process(pid=235, name='python3.11', status='zombie', started='20:26:12')]
____________________ test_sigkill_after_failed_sigterm[s3] _____________________
self = <psutil._pslinux.Process object at 0x7f36907d5210>
@functools.wraps(fun)
def wrapper(self):
try:
# case 1: we previously entered oneshot() ctx
> ret = self._cache[fun]
E AttributeError: 'Process' object has no attribute '_cache'
/usr/lib/python3/dist-packages/psutil/_common.py:443: AttributeError
During handling of the above exception, another exception occurred:
self = <psutil._pslinux.Process object at 0x7f36907d5210>, args = ()
kwargs = {}
@functools.wraps(fun)
def wrapper(self, *args, **kwargs):
try:
> return fun(self, *args, **kwargs)
/usr/lib/python3/dist-packages/psutil/_pslinux.py:1645:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <psutil._pslinux.Process object at 0x7f36907d5210>
@functools.wraps(fun)
def wrapper(self):
try:
# case 1: we previously entered oneshot() ctx
ret = self._cache[fun]
except AttributeError:
# case 2: we never entered oneshot() ctx
> return fun(self)
/usr/lib/python3/dist-packages/psutil/_common.py:446:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <psutil._pslinux.Process object at 0x7f36907d5210>
@wrap_exceptions
@memoize_when_activated
def _parse_stat_file(self):
"""Parse /proc/{pid}/stat file and return a dict with various
process info.
Using "man proc" as a reference: where "man proc" refers to
position N always subtract 3 (e.g ppid position 4 in
'man proc' == position 1 in here).
The return value is cached in case oneshot() ctx manager is
in use.
"""
> data = bcat("%s/%s/stat" % (self._procfs_path, self.pid))
/usr/lib/python3/dist-packages/psutil/_pslinux.py:1687:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fname = '/proc/237/stat', fallback = <object object at 0x7f36917e8d80>
def bcat(fname, fallback=_DEFAULT):
"""Same as above but opens file in binary mode."""
> return cat(fname, fallback=fallback, _open=open_binary)
/usr/lib/python3/dist-packages/psutil/_common.py:776:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fname = '/proc/237/stat', fallback = <object object at 0x7f36917e8d80>
_open = <function open_binary at 0x7f3690af3a60>
def cat(fname, fallback=_DEFAULT, _open=open_text):
"""Read entire file content and return it as a string. File is
opened in text mode. If specified, `fallback` is the value
returned in case of error, either if the file does not exist or
it can't be read().
"""
if fallback is _DEFAULT:
> with _open(fname) as f:
/usr/lib/python3/dist-packages/psutil/_common.py:764:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fname = '/proc/237/stat'
def open_binary(fname):
> return open(fname, "rb", buffering=FILE_READ_BUFFER_SIZE)
E FileNotFoundError: [Errno 2] No such file or directory: '/proc/237/stat'
/usr/lib/python3/dist-packages/psutil/_common.py:728: FileNotFoundError
During handling of the above exception, another exception occurred:
self = psutil.Process(pid=237, status='terminated'), pid = 237
_ignore_nsp = False
def _init(self, pid, _ignore_nsp=False):
if pid is None:
pid = os.getpid()
else:
if not _PY3 and not isinstance(pid, (int, long)):
raise TypeError('pid must be an integer (got %r)' % pid)
if pid < 0:
raise ValueError('pid must be a positive integer (got %s)'
% pid)
self._pid = pid
self._name = None
self._exe = None
self._create_time = None
self._gone = False
self._pid_reused = False
self._hash = None
self._lock = threading.RLock()
# used for caching on Windows only (on POSIX ppid may change)
self._ppid = None
# platform-specific modules define an _psplatform.Process
# implementation class
self._proc = _psplatform.Process(pid)
self._last_sys_cpu_times = None
self._last_proc_cpu_times = None
self._exitcode = _SENTINEL
# cache creation time for later use in is_running() method
try:
> self.create_time()
/usr/lib/python3/dist-packages/psutil/__init__.py:361:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = psutil.Process(pid=237, status='terminated')
def create_time(self):
"""The process creation time as a floating point number
expressed in seconds since the epoch.
The return value is cached after first call.
"""
if self._create_time is None:
> self._create_time = self._proc.create_time()
/usr/lib/python3/dist-packages/psutil/__init__.py:714:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <psutil._pslinux.Process object at 0x7f36907d5210>, args = ()
kwargs = {}
@functools.wraps(fun)
def wrapper(self, *args, **kwargs):
try:
> return fun(self, *args, **kwargs)
/usr/lib/python3/dist-packages/psutil/_pslinux.py:1645:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <psutil._pslinux.Process object at 0x7f36907d5210>
@wrap_exceptions
def create_time(self):
> ctime = float(self._parse_stat_file()['create_time'])
/usr/lib/python3/dist-packages/psutil/_pslinux.py:1855:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <psutil._pslinux.Process object at 0x7f36907d5210>, args = ()
kwargs = {}
@functools.wraps(fun)
def wrapper(self, *args, **kwargs):
try:
return fun(self, *args, **kwargs)
except PermissionError:
raise AccessDenied(self.pid, self._name)
except ProcessLookupError:
raise NoSuchProcess(self.pid, self._name)
except FileNotFoundError:
if not os.path.exists("%s/%s" % (self._procfs_path, self.pid)):
> raise NoSuchProcess(self.pid, self._name)
E psutil.NoSuchProcess: process no longer exists (pid=237)
/usr/lib/python3/dist-packages/psutil/_pslinux.py:1652: NoSuchProcess
During handling of the above exception, another exception occurred:
tcp_port = 49877, proc_name = 's3'
xprocess = <xprocess.xprocess.XProcess object at 0x7f3690b60850>
@pytest.mark.skipif(
sys.platform == "win32",
reason="on windows SIGTERM is treated as an alias for kill()",
)
@pytest.mark.parametrize("proc_name", ["s1", "s2", "s3"])
def test_sigkill_after_failed_sigterm(tcp_port, proc_name, xprocess):
# explicitly tell xprocess_starter fixture to make
# server instance ignore SIGTERM
class Starter(ProcessStarter):
pattern = "started"
args = [sys.executable, server_path, tcp_port, "--ignore-sigterm"]
xprocess.ensure(proc_name, Starter)
info = xprocess.getinfo(proc_name)
# since terminate with sigterm will fail, set a lower
# timeout before sending sigkill so tests won't take too long
> assert (
info.terminate(timeout=2) == 1
or psutil.Process(info.pid).status() == psutil.STATUS_ZOMBIE
)
tests/test_process_termination.py:77:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/psutil/__init__.py:332: in __init__
self._init(pid)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = psutil.Process(pid=237, status='terminated'), pid = 237
_ignore_nsp = False
def _init(self, pid, _ignore_nsp=False):
if pid is None:
pid = os.getpid()
else:
if not _PY3 and not isinstance(pid, (int, long)):
raise TypeError('pid must be an integer (got %r)' % pid)
if pid < 0:
raise ValueError('pid must be a positive integer (got %s)'
% pid)
self._pid = pid
self._name = None
self._exe = None
self._create_time = None
self._gone = False
self._pid_reused = False
self._hash = None
self._lock = threading.RLock()
# used for caching on Windows only (on POSIX ppid may change)
self._ppid = None
# platform-specific modules define an _psplatform.Process
# implementation class
self._proc = _psplatform.Process(pid)
self._last_sys_cpu_times = None
self._last_proc_cpu_times = None
self._exitcode = _SENTINEL
# cache creation time for later use in is_running() method
try:
self.create_time()
except AccessDenied:
# We should never get here as AFAIK we're able to get
# process creation time on all platforms even as a
# limited user.
pass
except ZombieProcess:
# Zombies can still be queried by this class (although
# not always) and pids() return them so just go on.
pass
except NoSuchProcess:
if not _ignore_nsp:
> raise NoSuchProcess(pid, msg='process PID not found')
E psutil.NoSuchProcess: process PID not found (pid=237)
/usr/lib/python3/dist-packages/psutil/__init__.py:373: NoSuchProcess
----------------------------- Captured stdout call -----------------------------
/<<PKGBUILDDIR>>/.pytest_cache/d/.xprocess/s3$ /usr/bin/python3.11 /<<PKGBUILDDIR>>/tests/server.py 49877 --ignore-sigterm
process 's3' started pid=237
0 , % /.%,@%@._%%# #/%/ %
1 , % /.%,@%@._%%# #/%/ %
2 , % /.%,@%@._%%# #/%/ %
3 , % /.%,@%@._%%# #/%/ %
4 , % /.%,@%@._%%# #/%/ %
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
ร๏ฟฝรฆ๏ฟฝpP๏ฟฝ๏ฟฝรงรฎรถฤ๏ฟฝP๏ฟฝ๏ฟฝadรฅrรกรธลซ
started
s3 process startup detected
could not terminated process [psutil.Process(pid=238, name='python3.11', status='zombie', started='20:26:17'), psutil.Process(pid=239, name='python3.11', status='zombie', started='20:26:17'), psutil.Process(pid=240, name='python3.11', status='zombie', started='20:26:17')]
=========================== short test summary info ============================
FAILED tests/test_functional_workflow.py::test_functional_work_flow - Failed:...
FAILED tests/test_process_termination.py::test_clean_shutdown[s1] - assert -1...
FAILED tests/test_process_termination.py::test_clean_shutdown[s2] - assert -1...
FAILED tests/test_process_termination.py::test_clean_shutdown[s3] - assert -1...
FAILED tests/test_process_termination.py::test_sigkill_after_failed_sigterm[s1]
FAILED tests/test_process_termination.py::test_sigkill_after_failed_sigterm[s2]
FAILED tests/test_process_termination.py::test_sigkill_after_failed_sigterm[s3]
============ 7 failed, 36 passed, 2 deselected in 443.72s (0:07:23) ============