Multiple bugs in `multiprocessing.managers`: pickling, nesting, etc
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 36k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
Bug report
Bug description:
I noticed multiple bugs in multiprocessing.mangers and explained them, with fixes, in a blog post: https://zpz.github.io/blog/python-mp-manager-2/
A summary of the bugs are as follows:
- Pickling of
BaseProxyobjects: easily causes object release before unpickling happens in another process - Unable to call proxy-returning methods on a proxy that has been passed to another process. (There is an open PR https://github.com/python/cpython/pull/99598 but my solution appears simpler and cleaner.)
- "Nested proxies" are never released (also reported in this isseu https://github.com/python/cpython/issues/103136)
- A simple enhancement (not exactly a bug): server-side exceptions lose all traceback info when propagated to user (also reported here in this issue https://github.com/python/cpython/issues/78279)
In addition, this issue
- The specification of
exposedis a mess. (See https://zpz.github.io/blog/python-mp-manager-2/#exposed-methods)
My package mpservice.multiprocessing.server_process fixes these issues with some additional enhancements and simplifications. The enhancements are covered in another blog post: https://zpz.github.io/blog/python-mp-manager-3/
I hope to engage in some discussions (esp with a core developer) before working on some PR, either local fixes or something a little more holistic.
CPython versions tested on:
3.10, 3.13
Operating systems tested on:
Linux
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với các entry point của multiprocessing.managers và bài blog được liên kết, sau đó so sánh các hành vi được báo cáo với các PR và issue được tham chiếu. Tái hiện các trường hợp pickling, proxy lồng nhau, traceback của exception và phương thức được expose; công việc chỉ hoàn tất sau khi phạm vi đã được thống nhất và mỗi bug được chọn đều có regression coverage.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- distributed-systems
- Loại issue
- Lỗi
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 20/100