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

fix: tests on MacOS 13.3.1 (a) (22E772610a) #9

Closed
metaist opened this issue May 17, 2023 · 4 comments
Closed

fix: tests on MacOS 13.3.1 (a) (22E772610a) #9

metaist opened this issue May 17, 2023 · 4 comments

Comments

@metaist
Copy link
Owner

metaist commented May 17, 2023

Although this is isn't one of my preferred platforms, it'd be nice to let people know what's happening.

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/homebrew/Cellar/[email protected]/3.10.6_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/opt/homebrew/Cellar/[email protected]/3.10.6_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/spawn.py", line 126, in _main
    self = reduction.pickle.load(from_parent)
  File "/ezq/src/ezq/__init__.py", line 197, in __getattr__
    return getattr(self.q, name)
  File "/ezq/src/ezq/__init__.py", line 197, in __getattr__
    return getattr(self.q, name)
  File "/ezq/src/ezq/__init__.py", line 197, in __getattr__
    return getattr(self.q, name)
  [Previous line repeated 993 more times]
RecursionError: maximum recursion depth exceeded in comparison
@metaist
Copy link
Owner Author

metaist commented May 18, 2023

FAILED test/test_ezq.py::test_run_processes - AssertionError: expect sum of 499500 from processes
FAILED test/test_ezq.py::test_map - AttributeError: Can't pickle local object 'map.<locals>.worker'
FAILED test/test_iter.py::test_iter_q - NotImplementedError

@metaist
Copy link
Owner Author

metaist commented May 18, 2023

Ok, well the NotImplementedError comes from here:

# multiprocessing.queues.Queue
def qsize(self):
        # Raises NotImplementedError on Mac OSX because of broken sem_getvalue()

@metaist
Copy link
Owner Author

metaist commented May 18, 2023

@metaist
Copy link
Owner Author

metaist commented Jun 2, 2023

For future reference, see the relevant python docs:

Changed in version 3.8: On macOS, the spawn start method is now the default. The fork start method should be considered unsafe as it can lead to crashes of the subprocess. See bpo-33725.

This created a whole new set of problems which is why I ultimately adopted multiprocess over multiprocessing.

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