Sharing instance of proxy object across processes results in pickle errors

Offen
#101,320 11 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
30/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
python

Rechercherichtung

Beginne mit dem im Bericht beschriebenen Szenario zur gemeinsamen Nutzung von SyncManager-Proxys und lies den verlinkten Issue-Kommentar zu den beobachteten pickle-Fehlern. Reproduziere die Abfolge prozessübergreifend unter Python 3.9 und ermittle anschließend, ob die beschädigten Daten erwartetes Verhalten oder ein Fehler sind, und dokumentiere ein bestätigtes Ergebnis.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

topic-multiprocessing type-bug

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

Vorherrschende Sprache
Python
Sterne
77.2k
Forks
36k
Ø Merge
1 T. 9 Std.
Gemergte PRs (30 T.)
558

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus python/cpython

Alle Issues in python/cpython

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.