On 6 Apr 2016, at 10:57, Phil Mayers <p.mayers@imperial.ac.uk> wrote:
On 06/04/16 15:31, Arran Cudbard-Bell wrote:
Spent some time poking at it in v3.1.x.
It seems to work OK with multiple threads now, and i've reworked the code to use separate interpreters for each module instance for cleanliness.
This is a bit of a minefield.
C extension modules which are using the "simplified" GIL API will deadlock if accessed in anything other than the first interpreter, IIRC.
Wow...
I also think you can run into problems with C extension modules and unloading if you destroy interpreters.
The mod_wsgi docs contain a few of the pitfalls:
https://code.google.com/archive/p/modwsgi/wikis/ApplicationIssues.wiki
Ew OK.
It'll probably be fine for pure python, but it's very chancy with any C extension modules (which are the most interesting bits).
Do you have an example of using a C extension module that's likely to crash/deadlock? Thanks, -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2