Skip to content
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

Errors for forkserver and spawn in pypy3 #94

Open
mmckerns opened this issue Oct 12, 2021 · 5 comments
Open

Errors for forkserver and spawn in pypy3 #94

mmckerns opened this issue Oct 12, 2021 · 5 comments

Comments

@mmckerns
Copy link
Member

pypy3 produces several KeyError and, potentially, tries to hash a UserDict (thus throwing an error) when run with a forkserver or by spawn.

Errors are as follows:

Traceback (most recent call last):
386  File "/home/travis/build/uqfoundation/multiprocess/pypy3.6/multiprocess/semaphore_tracker.py", line 132, in main
387    cache.remove(name)
388 KeyError: b'/mp-5qo35sar'

and

Traceback (most recent call last):
426  File "<string>", line 1, in <module>
427  File "/home/travis/build/uqfoundation/multiprocess/pypy3.6/multiprocess/spawn.py", line 105, in spawn_main
428    exitcode = _main(fd)
429  File "/home/travis/build/uqfoundation/multiprocess/pypy3.6/multiprocess/spawn.py", line 115, in _main
430    self = reduction.pickle.load(from_parent)
431  File "/home/travis/virtualenv/pypy3.6-7.3.1/site-packages/dill-0.3.4-py3.6.egg/dill/_dill.py", line 313, in load
432    return Unpickler(file, ignore=ignore, **kwds).load()
433  File "/home/travis/virtualenv/pypy3.6-7.3.1/site-packages/dill-0.3.4-py3.6.egg/dill/_dill.py", line 525, in load
434    obj = StockUnpickler.load(self)
435  File "/opt/python/pypy3.6-7.3.1/lib-python/3/pickle.py", line 1070, in load
436    dispatch[key[0]](self)
437  File "/opt/python/pypy3.6-7.3.1/lib-python/3/pickle.py", line 1418, in load_reduce
438    stack[-1] = func(*args)
439 TypeError: unhashable type: 'UserDict'
@mmckerns
Copy link
Member Author

@mmckerns mmckerns changed the title Errors for fork server and spawn in pypy3 Errors for forkserver and spawn in pypy3 Oct 12, 2021
@mmckerns
Copy link
Member Author

Several KeyError are thrown from the mutiprocess tests for pypy-3.6, pypy-3.7, and pypy-3.8 -- due to semaphore/resource tracking issues. However, these same KeyError are present when testing multiprocessing... so I'm going to ignore them for now.

@mmckerns
Copy link
Member Author

The multiprocessing tests throw errors for pypy-3.8 (specifically, test_preload_resources, test_timeout, test_heap, and several others due to "too many files open"). This is also seen with multiprocess, however, by skipping the three named tests noted, the other failures ('too many files open') disappear. I'll leave this as an issue to be resolved by pypy, and skip the three noted tests for now.

@mmckerns
Copy link
Member Author

It seems that a TypeError that hangs the tests is now thrown "infrequently". Given enough tries, the tests generate a TypeError for pypy-3.6, pypy-3.7, and pypy-3.8. However, it's not always due to a UserDict as seen above. Sometimes, the error is:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/mmckerns/src/pypy3.7-v7.3.7-osx64/site-packages/multiprocess-0.70.13.dev0-py3.7.egg/multiprocess/spawn.py", line 105, in spawn_main
    exitcode = _main(fd)
  File "/Users/mmckerns/src/pypy3.7-v7.3.7-osx64/site-packages/multiprocess-0.70.13.dev0-py3.7.egg/multiprocess/spawn.py", line 115, in _main
    self = reduction.pickle.load(from_parent)
  File "/Users/mmckerns/src/pypy3.7-v7.3.7-osx64/site-packages/dill-0.3.5.dev0-py3.7.egg/dill/_dill.py", line 332, in load
    return Unpickler(file, ignore=ignore, **kwds).load()
  File "/Users/mmckerns/src/pypy3.7-v7.3.7-osx64/site-packages/dill-0.3.5.dev0-py3.7.egg/dill/_dill.py", line 557, in load
    obj = StockUnpickler.load(self)
  File "/Users/mmckerns/src/pypy3.7-v7.3.7-osx64/lib-python/3/pickle.py", line 1101, in load
    dispatch[key[0]](self)
  File "/Users/mmckerns/src/pypy3.7-v7.3.7-osx64/lib-python/3/pickle.py", line 1449, in load_reduce
    stack[-1] = func(*args)
TypeError: weak object has gone away

I'll limit the remainder of this issue to pypy3 infrequently throwing a TypeError.

@mmckerns
Copy link
Member Author

Note that the Traceback for both TypeError experienced are identical... except for the TypeError: message itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant