This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vilnis.termanis
Recipients vilnis.termanis
Date 2016-10-12.13:03:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1476277427.94.0.954125704246.issue28422@psf.upfronthosting.co.za>
In-reply-to
Content
Accessing some Manager types (e.g. Lock) through a list, dict or Namespace proxy is not possible if both the mutable container (e.g. list) and contained type instance (e.g. Lock) have been created in the same process.

Symptoms:

In accessing process:
multiprocessing.managers.RemoteError on access, e.g.:
Unserializable message: ('#RETURN', <thread.lock object at 0x7fcf40d31370>)

.. and in underlying manager:
_pickle.PicklingError: Can't pickle <class '_thread.lock'>: attribute lookup lock on _thread failed

The provided test script performs:
0) Initialise SyncManager (via multiprocessing.Manager())
1) Create list proxy through manager
2) Insert another proxied type into the list (e.g. Lock)
3) Try to access type instance from (2) via container created in (1)

Note: When step (2) is run in a child process, everything work as expected. When all steps execute in the same process, one gets the aforementioned exception.


See also:
https://mail.python.org/pipermail/python-list/2009-September/552988.html
History
Date User Action Args
2016-10-12 13:03:47vilnis.termanissetrecipients: + vilnis.termanis
2016-10-12 13:03:47vilnis.termanissetmessageid: <1476277427.94.0.954125704246.issue28422@psf.upfronthosting.co.za>
2016-10-12 13:03:47vilnis.termanislinkissue28422 messages
2016-10-12 13:03:47vilnis.termaniscreate