Sharing instance of proxy object across processes results in pickle errors
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 36k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 558
Description
Hello
I'm trying to understand if a SyncManager proxy object instances are supposed to be shareable accoss processes, and if so, how
Bug report
See https://github.com/python/cpython/issues/101320#issuecomment-1404187868 below
What I'm doing is the following:
- create a new sync manager, and use it to populate a proxy dictionary from the initial process
- in another process, connect to the sync manage, and read in a load the data from the proxy dictionary
- we read corrupted data out of the connection to the manager
Is this a bug or something that should be possible to do in python ?
I assume that the objects in syncmanager can be accessed through several processes, is it true ?
If so, what is the proper way to do it ? (I think that just using the same reference of proxy object accross forked processes is not supposed to work)
Your environment
python 3.9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the SyncManager proxy-sharing scenario described in the report and read the linked issue comment for the observed pickle errors. Reproduce the sequence across processes on Python 3.9, then determine whether the corrupted data is expected behavior or a defect and document a confirmed outcome.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100