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 André Neto
Recipients André Neto
Date 2018-01-03.09:44:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1514972661.4.0.467229070634.issue32485@psf.upfronthosting.co.za>
In-reply-to
Content
I'm working on a project where I need to share state between several processes (forked using gunicorn). I'm using dictionaries obtained from a multiprocessing SyncManager to achieve this.

The issue is that if I have multiple forked processes concurrently accessing to different dictionaries created by the same SyncManager, the code will randomly crash while accessing (read-only and read-write) to any of the dictionaries. This behaviour is independent of the way I access the dictionary (i.e. it happens both using the dictionary functions (e.g. has_key) or the built-in keywords (e.g. key in dict).

The attached snippet demonstrates the issue (tested only in python2.7): the function test_manyForkedProcessesSingleThreaded will crash.

The issue is also being discussed here: https://stackoverflow.com/questions/48052148/python-multiprocessing-dict-sharing-between-processes
History
Date User Action Args
2018-01-03 09:44:21André Netosetrecipients: + André Neto
2018-01-03 09:44:21André Netosetmessageid: <1514972661.4.0.467229070634.issue32485@psf.upfronthosting.co.za>
2018-01-03 09:44:21André Netolinkissue32485 messages
2018-01-03 09:44:20André Netocreate