jgehrcke / gipc

gevent-cooperative child processes and inter-process communication
https://gehrcke.de/gipc
MIT License
83 stars 13 forks source link

Release 1.6.0 #131

Closed jgehrcke closed 10 months ago

jgehrcke commented 1 year ago

Greenlet 3.0.1 was released on Oct 25. On macos 11 with Python 3.8 and 3.9 (edit: and also all other tested versions up to 3.12) this results in a segfault in gipc's test suite, e.g.:

Python 3.8.18
Darwin Mac-1698851209104.local 20.6.0 Darwin Kernel Version 20.6.0: Thu Jul  6 22:12:47 PDT [202](https://github.com/jgehrcke/gipc/actions/runs/6721881024/job/18268581625?pr=131#step:5:203)3; root:xnu-7195.141.49.702.12~1/RELEASE_X86_64 x86_64
Package                       Version
----------------------------- ------------
alabaster                     0.7.13
attrs                         23.1.0
Babel                         2.13.1
certifi                       2023.7.22
charset-normalizer            3.3.2
coverage                      7.3.2
docutils                      0.17.1
flake8                        6.1.0
Genshi                        0.7.7
gevent                        23.9.1
gipc                          1.5.0
greenlet                      3.0.1

...

Run pytest -vv test/
============================= test session starts ==============================
platform darwin -- Python 3.8.18, pytest-[6](https://github.com/jgehrcke/gipc/actions/runs/6721881024/job/18268581625?pr=131#step:6:7).2.5, py-1.11.0, pluggy-1.3.0 -- /Users/runner/hostedtoolcache/Python/3.8.18/x64/bin/python
cachedir: .pytest_cache
rootdir: /Users/runner/work/gipc/gipc
plugins: cov-3.0.0
collecting ... collected 82 items

test/test_gipc.py::TestComm::test_singlemsg_short_bin PASSED             [  1%]
test/test_gipc.py::TestComm::test_singlemsg_short_list PASSED            [  2%]
test/test_gipc.py::TestComm::test_singlemsg_short_list_commontypes PASSED [  3%]
test/test_gipc.py::TestComm::test_singlemsg_long_bin PASSED              [  4%]
test/test_gipc.py::TestComm::test_singlemsg_long_list PASSED             [  6%]
test/test_gipc.py::TestComm::test_singlemsg_between_greenlets PASSED     [  [7](https://github.com/jgehrcke/gipc/actions/runs/6721881024/job/18268581625?pr=131#step:6:8)%]
test/test_gipc.py::TestComm::test_onewriter_two_readers PASSED           [  [8](https://github.com/jgehrcke/gipc/actions/runs/6721881024/job/18268581625?pr=131#step:6:9)%]
test/test_gipc.py::TestComm::test_twowriters_one_reader PASSED           [  [9](https://github.com/jgehrcke/gipc/actions/runs/6721881024/job/18268581625?pr=131#step:6:10)%]
test/test_gipc.py::TestComm::test_all_handles_length PASSED              [ [10](https://github.com/jgehrcke/gipc/actions/runs/6721881024/job/18268581625?pr=131#step:6:11)%]
test/test_gipc.py::TestClose::test_twoclose PASSED                       [ 12%]
test/test_gipc.py::TestClose::test_closewrite PASSED                     [ 13%]
test/test_gipc.py::TestClose::test_closeread PASSED                      [ 14%]
Fatal Python error: Segmentation fault

test/test_gipc.py::TestClose::test_readclose_whileread 
Current thread 0x00000001082fbe00 (most recent call first):
  File "/Users/runner/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/gevent/os.py", line 107 in nb_read
  File "/Users/runner/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/gipc/gipc.py", line 934 in _recv_in_buffer
  File "/Users/runner/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/gipc/gipc.py", line 984 in get
  File "/Users/runner/work/gipc/gipc/test/test_gipc.py", line 193 in <lambda>
/Users/runner/work/_temp/4fe5bd4c-c019-470f-9e76-713a8e66777f.sh: line 1:  2074 Segmentation fault: [11](https://github.com/jgehrcke/gipc/actions/runs/6721881024/job/18268581625?pr=131#step:6:12)  pytest -vv test/
Error: Process completed with exit code [13](https://github.com/jgehrcke/gipc/actions/runs/6721881024/job/18268581625?pr=131#step:6:14)9.

This seems related to https://github.com/python-greenlet/greenlet/issues/382.

Looking for now into pinning greenlet to 2.0.2 for Python versions smaller than 3.12.

Edit:

Looking for now into pinning greenlet to 2.0.2 for Python versions smaller than 3.12.

Not the right solution. It's the specific binary build of 3.0.1 for darwin which is broken currently on PyPI. Temporary workaround is to switch in CI to use source builds. That will leave users affected until a new binary wheel is published by greenlet maintainers (helloooo Jason :-)).

madhavajay commented 12 months ago

I think by pinning greenlet==2.0.2 this seems to fix the gevent problems for now as we can upgrade to gevent==23.9.0.post1. Perhaps its worth doing a point release and then another one once this whole gevent bug issue is resolved?