[pypy-issue] Issue #1999: cffi must use file locks (pypy/pypy)
issues-reply at bitbucket.org
Tue Mar 17 08:59:21 CET 2015
New issue 1999: cffi must use file locks
Please read [GitHub/Pillow issue 1135](https://github.com/python-pillow/Pillow/issues/1135) first.
The problem is, some packages are compiled with cffi lazily, during the very first import. Doing so in multiple processes at the same time can lead to permanent (and silent!) deadlock. This is what's happening with Pillow or any other similar package.
I suggest pypy's cffi to acquire a file lock and fail / wait until it's deleted, if it exists. The behavior is similar to Debian's apt or git index locks.
More information about the pypy-issue