[Xapian-tickets] [Xapian] #185: Deadlocks with apache mod_python and mod_wsgi

Xapian nobody at xapian.org
Wed May 6 07:51:15 BST 2009


#185: Deadlocks with apache mod_python and mod_wsgi
-----------------------------+----------------------------------------------
 Reporter:  richard          |        Owner:  olly     
     Type:  defect           |       Status:  assigned 
 Priority:  normal           |    Milestone:  1.0.13   
Component:  Xapian-bindings  |      Version:  SVN trunk
 Severity:  normal           |   Resolution:           
 Keywords:                   |    Blockedby:           
 Platform:  All              |     Blocking:           
-----------------------------+----------------------------------------------
Changes (by olly):

  * milestone:  1.1.1 => 1.0.13


Old description:

> = Summary of current known status =
>
> == mod_python ==
>
> Calling any Xapian methods or functions is likely to cause dead-lock
> unless you set this option in the Apache configuration section for all
> mod_python scripts which use Xapian:
>
> {{{
> PythonInterpreter main_interpreter
> }}}
>
> You may also need to use Python >= 2.4 (due to
> [http://issues.apache.org/jira/browse/MODPYTHON-217 problems in Python
> 2.3 with the APIs the code uses).
>
> Even with {{{main_interpreter}}} and Python >= 2.4, calling from Xapian's
> C++ code back to Python code won't work properly (this means that you
> can't subclass Xapian objects in Python).  This is apparently an issue
> with mod_python.
>
> == mod_wsgi ==
>
> You'll need to set:
>
> {{{
> WSGIApplicationGroup %{GLOBAL}
> }}}
>
> For details see:
> http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIApplicationGroup
> and
> http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Python_Simplified_GIL_State_API
>
> The mod_wsgi developers say this should be sufficient, and you should be
> able to subclass Xapian objects in Python.  If you encounter problems,
> please talk to us or the mod_wsgi developers so we can investigate.
>
> ----
>
> Originally reported on the mailing list:
> http://thread.gmane.org/gmane.comp.search.xapian.general/4486

New description:

 = Summary of current known status =

 == mod_python ==

 Calling any Xapian methods or functions is likely to cause dead-lock
 unless you set this option in the Apache configuration section for all
 mod_python scripts which use Xapian:

 {{{
 PythonInterpreter main_interpreter
 }}}

 You may also need to use Python >= 2.4 (due to
 [http://issues.apache.org/jira/browse/MODPYTHON-217 problems in Python 2.3
 with the APIs the code uses).

 == mod_wsgi ==

 You'll need to set:

 {{{
 WSGIApplicationGroup %{GLOBAL}
 }}}

 For details see:
 http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIApplicationGroup
 and
 http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Python_Simplified_GIL_State_API

 The mod_wsgi developers say this should be sufficient, and you should be
 able to subclass Xapian objects in Python.  If you encounter problems,
 please talk to us or the mod_wsgi developers so we can investigate.

 ----

 Originally reported on the mailing list:
 http://thread.gmane.org/gmane.comp.search.xapian.general/4486

--

Comment:

 I've updated the documentation to cover the current status, and to
 document the fix for mod_wsgi - trunk r12635.

 And I've spun off the "use the full threading API" as ticket #364, since I
 don't plan to fix address that issue right now.

 The remaining issues in this ticket are now fixed in trunk.  We should try
 to backport this for 1.0.x (though it isn't totally trivial to do so) so
 setting milestone:1.0.13 now.

 Also updated the summary in the description.

-- 
Ticket URL: <http://trac.xapian.org/ticket/185#comment:39>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list