Open
Description
How to reproduce
-
Install python 3.8.5
$ curl -O https://files.pythonhosted.org/packages/1d/a1/8813629b38a8d97e8f1eceb6c7da03b37633c93104fbd8e30e09d195425a/fs-2.4.11.tar.gz
$ tar xf fs-2.4.11.tar.gz
$ cd xf fs-2.4.11
$ virtualenv env
$ source env/bin/activate
$ python -m pip install -e .
$ pip install pytest pyftpdlib psutil mock
$ python -m pytest . # fails
Error log:
ERROR at teardown of TestFTPFS.test_writetext ___________________________________________________
cls = <class 'tests.test_ftpfs.TestFTPFS'>
@classmethod
def tearDownClass(cls):
> cls.server.stop()
tests/test_ftpfs.py:166:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
env/lib/python3.8/site-packages/pyftpdlib/test/__init__.py:355: in stop
assert_free_resources()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def assert_free_resources():
ts = threading.enumerate()
assert len(ts) == 1, ts
p = psutil.Process()
children = p.children()
if children:
for p in children:
p.kill()
p.wait(1)
> assert not children, children
E AssertionError: [psutil.Process(pid=8168, status='terminated', exitcode=<Negsignal.SIGKILL: -9>, started='07:30:07')]
env/lib/python3.8/site-packages/pyftpdlib/test/__init__.py:261: AssertionError
Python 3.8.5 error log:
/nix/store/cp9nlaz4a24n8sp9f738ngdnrd19s4rp-python3-3.8.5/lib/python3.8/multiprocessing/resource_tracker.py:96: UserWarning: resource_tracker: process died unexpectedly, relaunching. Some resources might leak.
warnings.warn('resource_tracker: process died unexpectedly, '
Traceback (most recent call last):
File "/nix/store/cp9nlaz4a24n8sp9f738ngdnrd19s4rp-python3-3.8.5/lib/python3.8/multiprocessing/resource_tracker.py", line 201, in main
cache[rtype].remove(name)
KeyError: '/mp-sr7swli_'
Traceback (most recent call last):
File "/nix/store/cp9nlaz4a24n8sp9f738ngdnrd19s4rp-python3-3.8.5/lib/python3.8/multiprocessing/resource_tracker.py", line 201, in main
cache[rtype].remove(name)
KeyError: '/mp-zuko65p_'
Traceback (most recent call last):
File "/nix/store/cp9nlaz4a24n8sp9f738ngdnrd19s4rp-python3-3.8.5/lib/python3.8/multiprocessing/resource_tracker.py", line 201, in main
cache[rtype].remove(name)
KeyError: '/mp-_i63v3_i'
Traceback (most recent call last):
File "/nix/store/cp9nlaz4a24n8sp9f738ngdnrd19s4rp-python3-3.8.5/lib/python3.8/multiprocessing/resource_tracker.py", line 201, in main
cache[rtype].remove(name)
KeyError: '/mp-6yd4e3mj'
Traceback (most recent call last):
File "/nix/store/cp9nlaz4a24n8sp9f738ngdnrd19s4rp-python3-3.8.5/lib/python3.8/multiprocessing/resource_tracker.py", line 201, in main
cache[rtype].remove(name)
KeyError: '/mp-xbyjd_kd'
Traceback (most recent call last):
File "/nix/store/cp9nlaz4a24n8sp9f738ngdnrd19s4rp-python3-3.8.5/lib/python3.8/multiprocessing/resource_tracker.py", line 201, in main
cache[rtype].remove(name)
KeyError: '/mp-u1yjocb0'
The test passes using python 3.7
System Info
- system:
"x86_64-darwin"
- host os:
Darwin 19.6.0, macOS 10.15.6