Issue 2951: ElementTree parsing bus error (but only from mod_python) (original) (raw)

Created on 2008-05-23 17:59 by kathyvs, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg67259 - (view) Author: Kathy Van Stone (kathyvs) Date: 2008-05-23 17:59
The follow code works fine when run directly. It crashes (with a bus error) if used as a mod_python handler. It doesn't crash if ElementTree is replaced with cElementTree. from xml.etree import ElementTree as eltree def handler(req): body = """ Service_offerings query at 2008-05-23 12:47:28.038233 """ response_elem = eltree.XML(body) return 0 I don't know if this a mod_python or ElementTree issue, but it looks more like an ElementTree problem.
msg70045 - (view) Author: nicodotti (nicodotti) Date: 2008-07-19 18:39
Thanks for logging this bug Kathy I had the same problem for 2 days! I used the cElementTree as you mentioned and it worked fine
msg70046 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-07-19 19:02
This is probably a mod_python problem.
msg70047 - (view) Author: Kathy Van Stone (kathyvs) Date: 2008-07-19 19:07
Does ElementTree do anything unusual in importing? That is one area where mod_python is different from standard python.
msg70592 - (view) Author: Jack Diederich (jackdied) * (Python committer) Date: 2008-08-01 21:01
It is a common apache problem. Elementree imports an expat parser (presumably cElementree doesn't) and different versions of expat play together very poorly. Lots of apache modules load one xml lib version or another and they tend to step on each others toes .. and then segfault. IIRC the only way to resolve this is to figure out which loaded apache modules are using expat and recompile them all against the same version. Not fun.
History
Date User Action Args
2022-04-11 14:56:34 admin set github: 47200
2008-08-01 21:01:17 jackdied set status: open -> closedresolution: not a bugmessages: + nosy: + jackdied
2008-07-19 19:07:54 kathyvs set messages: +
2008-07-19 19:02:10 benjamin.peterson set nosy: + benjamin.petersonmessages: +
2008-07-19 18:39:08 nicodotti set nosy: + nicodottimessages: +
2008-05-23 17:59:38 kathyvs create