Multiple bugs in `multiprocessing.managers`: pickling, nesting, etc
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dagli entry point di multiprocessing.managers e dal post del blog collegato, quindi confronta i comportamenti riportati con le PR e gli issue citati. Riproduci i casi di pickling, proxy annidati, traceback delle eccezioni e metodi esposti; il lavoro è completo solo dopo aver concordato l’ambito e aver coperto ogni bug selezionato con test di regressione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- distributed-systems
- Tipo di issue
- Bug
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 20/100