Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#11422 - enable mod_mem_cache when using trac causes apache to crash

Attached to Project: Arch Linux
Opened by Alper KANAT (T-u-N-i-X) - Sunday, 07 September 2008, 19:50 GMT-5
Last edited by Allan McRae (Allan) - Wednesday, 24 December 2008, 11:01 GMT-5
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Pierre Schmitz (Pierre)
Douglas Soares de Andrade (dsa)
Architecture All
Severity Medium
Priority Normal
Reported Version 2008.06
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Edit: changed title to better reflect the current understanding of the problem.

--Original Report--

All necessary information are detailed here: http://www.dscpl.com.au/wiki/ModPython/Articles/ExpatCausingApacheCrash

Here's the version information on my Arch Linux box:

[02:48] (tunix@raptiye ~)$ strings /usr/lib/libexpat.so.1.5.2 |grep expat_
expat_2.0.1

[02:49] (tunix@raptiye ~)$ python
Python 2.5.2 (r252:60911, Jul 8 2008, 21:11:16)
[GCC 4.3.2 20080626 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyexpat
>>> pyexpat.version_info
(2, 0, 0)

Apache on my production server crashes immediately when I use Trac and some Django apps using sqlite3..
This task depends upon

Comment by Roman Kyrylych (Romashka) - Tuesday, 09 September 2008, 16:28 GMT-5
looks like pyexpat needs to be updated to use the latest expat version.
@ Alper: you haven't indicated which package contains pyexpat, so...
@ Allan: I'm assigning to you as python maintainer ;)
Comment by Alper KANAT (T-u-N-i-X) - Tuesday, 09 September 2008, 16:45 GMT-5
pyexpat is included within the python package :)
Comment by Allan McRae (Allan) - Wednesday, 10 September 2008, 02:34 GMT-5
Can you try building python with this PKGBUILD + patch? You will require the other files from ABS.

It should make python use the system expat library and my quick test with "pyexpat.version_info" looks good but I don't have apache + mod_python setup anywhere to test.
Comment by Alper KANAT (T-u-N-i-X) - Wednesday, 10 September 2008, 07:16 GMT-5
as far as i see, python and strings shows the same version now.. but i still get

[Wed Sep 10 14:15:39 2008] [notice] child pid 23962 exit signal Segmentation fault (11)

errors when i try to reach a mod_python page despite i've restarted apache.. :S
Comment by Allan McRae (Allan) - Wednesday, 10 September 2008, 08:18 GMT-5
Perhaps this is a sqlite3 library version issue rather that an expat issue. However, I have check python, php, mod_python and the all seem to be linked to the system library. Any chance you can try to confirm it is indeed an expat issue and not a sqlite issue? Can you try removing modules from your httpd.conf and see if you can limit this further?
Comment by Alper KANAT (T-u-N-i-X) - Wednesday, 10 September 2008, 17:34 GMT-5
i've just added some part of the apache log... it gives an exception about mod_python.. hope it gives information..
   error.log (52.3 KiB)
Comment by Allan McRae (Allan) - Wednesday, 10 September 2008, 23:12 GMT-5
Looks like a sqlite3 version mismatch to me... Can you tell me exactly what modules you load in your httpd.conf so I can figure out what the clash is?
Comment by Allan McRae (Allan) - Wednesday, 10 September 2008, 23:16 GMT-5
Adding Pierre and dsa to assignees. I currently guessing this is a apache + php + mod_python clash of some variety...
Comment by Alper KANAT (T-u-N-i-X) - Thursday, 11 September 2008, 09:21 GMT-5
here is my httpd.conf (http://rafb.net/p/isJdp882.html)..

i'm not using php btw.. generally i have problem on trac and some django apps that use sqlite3 backend.. i can use those apps with other db engines..
Comment by Allan McRae (Allan) - Sunday, 14 September 2008, 20:29 GMT-5
Can you put the http.conf as an attachment. The URL you provided seems to no longer work.

From what I saw earlier, you load a lot of modules. Can you try disabling various modules until you figure out what the clash is?
Comment by Alper KANAT (T-u-N-i-X) - Monday, 15 September 2008, 03:43 GMT-5
here is my httpd.conf.. i can't remove some modules because this is my production server..
Comment by Tim Flink (trflink) - Sunday, 05 October 2008, 16:08 GMT-5
I found the same problem when I tried to get trac running with mod_python. At first, the expat versions didn't match. They did match after rebuilding the python package using the above fix.

Since httpd was still having the same problems, I started disabling modules in my httpd.conf until I stopped getting the segmentation fault messages. I found that if I disabled mod_mem_cache, trac worked without any problems. I re-enabled all other modules, and trac still works. My other php based app does, too (using mod_php).

I attached my current httpd.conf and my imported conf for trac to this post.
Comment by Allan McRae (Allan) - Friday, 17 October 2008, 21:48 GMT-5
@ Alper - can you confirm if removing mod_mem_cache fixes this for you?
Comment by Allan McRae (Allan) - Sunday, 19 October 2008, 00:26 GMT-5
Are you two using the SQL back-end for trac? If so, can you try this PKGBUILD for python-pysqlite? It may do nothing but I am running out of ideas...
Comment by Allan McRae (Allan) - Sunday, 19 October 2008, 02:13 GMT-5
@ Tim: Now you have found a work-around, can you also confirm whether the expat library difference has any effect at all?
Comment by Alper KANAT (T-u-N-i-X) - Sunday, 19 October 2008, 20:01 GMT-5
Sorry, but I changed my production and test servers to nginx and don't have any Apache installed.. But glad that someone found the module that caused the problem..
Comment by Tim Flink (trflink) - Thursday, 30 October 2008, 22:42 GMT-5
Sorry for the delay. I've been busy as of late and haven't made the time to try your fix.

I built and installed python-pysqlite using that PKGBUILD, re-enabled mod_mem_cache and trac causes a segfault again.

I re-disabled mod_mem_cache and installed python from core. Trac seems to be working fine. I checked the versions as listed in the original issue and found the same mismatch (2.0.1 in apache, 2.0.0 in pyexpat).
Comment by Allan McRae (Allan) - Thursday, 30 October 2008, 22:50 GMT-5
Thanks, so this is definitely not and expat/pyexpat problem. Rather something used for mod_mem_cache and trac is causing problems...
Comment by Glenn Matthys (RedShift) - Friday, 05 December 2008, 16:19 GMT-5
What's the status of this issue?
Comment by Allan McRae (Allan) - Wednesday, 24 December 2008, 11:01 GMT-5
Even though this was established not to be the problem, the python package now links to the internal expat library.

Loading...