Re: Re: Upgrading expat for apache question
wayne collier <[email protected]> Fri, 12 Mar 2010 19:28:49 -0500
| Newsgroups | gmane.comp.python.mod_python |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============1487304634==
Content-type: multipart/alternative;
boundary="Boundary_(ID_wOPddUaG0OEhgC+WJHBpMA)"
This is a multi-part message in MIME format.
--Boundary_(ID_wOPddUaG0OEhgC+WJHBpMA)
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
Okay I am running RH linux and I don't seem to have mod_ldap or
mod_authnz_ldap shared objects loaded in my httpd.conf file. Also I ran
ldd and got the following results:
> *ldd /usr/local/httpd-2.2.11/bin/httpd*
linux-gate.so.1 => (0x00157000)
libm.so.6 => /lib/libm.so.6 (0x00ce8000)
libaprutil-1.so.0 => /usr/local/httpd-2.2.11/lib/libaprutil-1.so.0
(0x00315000)
libexpat.so.0 => /lib/libexpat.so.0 (0x00d70000)
libapr-1.so.0 => /usr/local/httpd-2.2.11/lib/libapr-1.so.0 (0x00844000)
libuuid.so.1 => /lib/libuuid.so.1 (0x002f2000)
librt.so.1 => /lib/librt.so.1 (0x00d65000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x07e07000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00d17000)
libdl.so.2 => /lib/libdl.so.2 (0x00d11000)
libc.so.6 => /lib/libc.so.6 (0x00ba0000)
/lib/ld-linux.so.2 (0x00b82000)
>* ldd /usr/local/httpd-2.2.11/modules/mod_python.so*
linux-gate.so.1 => (0x00aec000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00730000)
libdl.so.2 => /lib/libdl.so.2 (0x0027f000)
libutil.so.1 => /lib/libutil.so.1 (0x00f70000)
libm.so.6 => /lib/libm.so.6 (0x009b1000)
libc.so.6 => /lib/libc.so.6 (0x00110000)
/lib/ld-linux.so.2 (0x00b82000)
I don't seem to have anything with ldap listed. Am I on the right track.?
Wayne
Graham Dumpleton wrote:
> A segmentation fault can occur for other reasons. If it is happening
> when you use LDAP, it could be a conflict in versions of LDAP
> libraries being used by Apache or PHP and Python LDAP module.
>
> You should use the 'ldd' command to determine what LDAP shared library
> is used by mod_authnz_ldap and compare that to the LDAP library being
> used by the C extension module component of the Python module you are
> using to access LDAP. Similarly find any PHP extension modules which
> use LDAP and look at those.
>
> If mod_authnz_ldap is loaded into Apache and you don't need it, then
> don't load it and see if problem goes away. Also try not loading PHP
> if it is being loaded. Narrow down which is in conflict.
>
> As far as I remember, Apache itself doesn't link to LDAP library and
> even possible that mod_authnz_ldap uses an internal LDAP library
> rather than linking external library. All the same even use ldd on
> Apache binary itself to see which LDAP library may be linked.
>
> Graham
>
> On 10 March 2010 04:18, wayne collier <[email protected]> wrote:
>
>> Okay I guess I will look else where. However, I keep getting segmentation
>> faults when try an execute the ldap command
>>
>> t=l.simple_bind_s(dn,pw). It is only line of code that crashes. If the have
>> the classic expat problem, would that mean I would get a segmentation
>> fault problem from the start. Also, ldap script works okay as a stand alone
>> script. Thanks.
>>
>> Wayne
>>
>>
>> Graham Dumpleton wrote:
>>
>> That is not your problem, quoting:
>>
>> http://code.google.com/p/modwsgi/wiki/IssuesWithExpatLibrary
>>
>> which is more up to date in respect of this issue, even if the
>> mod_wsgi variant of that document:
>>
>> """Note that this only applies to Python versions prior to Python 2.5.
>> >From Python 2.5 onwards, the copy of the "expat" library bundled in
>> with Python is name space prefixed, thereby avoid name clashes with an
>> "expat" library which has previously been loaded."""
>>
>> You are using Python 2.6, so you cannot be affected by this problem.
>>
>> Graham
>>
>> On 9 March 2010 05:54, wayne collier <[email protected]> wrote:
>>
>>
>> Hello all. I need some help solving the dreaded segmentation fault that has
>> cropped several time on this board. I have read the link
>> http://www.dscpl.com.au/wiki/ModPython/Articles/ExpatCausingApacheCrash and
>> followed the step and have uncovered the following.
>>
>>
>>
>>
>> ldd /usr/local/httpd-2.2.11/bin/httpd | grep expat
>>
>>
>> libexpat.so.0 => /lib/libexpat.so.0 (0x00d70000)
>>
>>
>>
>> strings /lib/libexpat.so.0 | grep expat_
>>
>>
>> expat_1.95.8
>>
>>
>>
>> ps aux | grep http | head -3
>>
>>
>> webuser 14986 0.0 2.1 54236 19048 ? S Mar04 0:01
>> /usr/local/httpd-2.2.11/bin/httpd -d /usr/local/httpd-2.2.11 -f
>> /usr/local/httpd-2.2.11/conf/httpd.conf
>> webuser 14987 0.0 3.2 144128 29540 ? S Mar04 0:01
>> /usr/local/httpd-2.2.11/bin/httpd -d /usr/local/httpd-2.2.11 -f
>> /usr/local/httpd-2.2.11/conf/httpd.conf
>> webuser 14998 0.0 3.2 144212 29660 ? S Mar04 0:01
>> /usr/local/httpd-2.2.11/bin/httpd -d /usr/local/httpd-2.2.11 -f
>> /usr/local/httpd-2.2.11/conf/httpd.conf
>>
>>
>>
>> /usr/sbin/lsof -p 14986 | grep expat
>>
>>
>> httpd 14986 webuser mem REG 3,5 572313 972637
>> /opt/Python/lib/python2.6/lib-dynload/pyexpat.so
>> httpd 14986 webuser mem REG 3,5 133120 1883791
>> /lib/libexpat.so.0.5.0
>>
>> I am not sure why I get 2 shared libaries here.
>>
>>
>>
>> strings /lib/libexpat.so.0.5.0 | grep expat_
>>
>>
>> expat_1.95.8
>>
>>
>>
>>
>> strings /opt/Python/lib/python2.6/lib-dynload/pyexpat.so | grep expat_
>>
>>
>> pyexpat.expat_CAPI 1.0
>> expat_CAPI
>> expat_2.0.0
>>
>>
>>
>>
>> import pyexpat
>> pyexpat.version_info
>>
>>
>> (2, 0, 0)
>>
>>
>> So it seems like I need get expat_1.95.8 apache is using up to expat_2.0.0.
>> Can I simply try replacing the 1.95.8 library with 2.0.0. Or do I have
>> recompile with Apache? If I do recompile I need to recompile apache with
>> mod_python as well?
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Mod_python mailing list
>> [email protected]
>> http://mailman.modpython.org/mailman/listinfo/mod_python
>>
>>
>>
>>
>
> _______________________________________________
> Mod_python mailing list
> [email protected]
> http://mailman.modpython.org/mailman/listinfo/mod_python
>
>
--Boundary_(ID_wOPddUaG0OEhgC+WJHBpMA)
Content-type: text/html; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Okay I am running RH linux and I don't seem to have mod_ldap or
mod_authnz_ldap shared objects loaded in my httpd.conf file. Also I ran
ldd and got the following results:<br>
<br>
<br>
> <b>ldd /usr/local/httpd-2.2.11/bin/httpd</b><br>
linux-gate.so.1 => (0x00157000)<br>
libm.so.6 => /lib/libm.so.6 (0x00ce8000)<br>
libaprutil-1.so.0 =>
/usr/local/httpd-2.2.11/lib/libaprutil-1.so.0 (0x00315000)<br>
libexpat.so.0 => /lib/libexpat.so.0 (0x00d70000)<br>
libapr-1.so.0 => /usr/local/httpd-2.2.11/lib/libapr-1.so.0
(0x00844000)<br>
libuuid.so.1 => /lib/libuuid.so.1 (0x002f2000)<br>
librt.so.1 => /lib/librt.so.1 (0x00d65000)<br>
libcrypt.so.1 => /lib/libcrypt.so.1 (0x07e07000)<br>
libpthread.so.0 => /lib/libpthread.so.0 (0x00d17000)<br>
libdl.so.2 => /lib/libdl.so.2 (0x00d11000)<br>
libc.so.6 => /lib/libc.so.6 (0x00ba0000)<br>
/lib/ld-linux.so.2 (0x00b82000)<br>
<br>
><b> ldd /usr/local/httpd-2.2.11/modules/mod_python.so</b><br>
linux-gate.so.1 => (0x00aec000)<br>
libpthread.so.0 => /lib/libpthread.so.0 (0x00730000)<br>
libdl.so.2 => /lib/libdl.so.2 (0x0027f000)<br>
libutil.so.1 => /lib/libutil.so.1 (0x00f70000)<br>
libm.so.6 => /lib/libm.so.6 (0x009b1000)<br>
libc.so.6 => /lib/libc.so.6 (0x00110000)<br>
/lib/ld-linux.so.2 (0x00b82000)<br>
<br>
I don't seem to have anything with ldap listed. Am I on the right
track.? <br>
<br>
<br>
Wayne<br>
<br>
Graham Dumpleton wrote:
<blockquote
cite="mid:88e286471003091416w74f87d44w8f4e4d0d0aab4416-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org"
type="cite">
<pre wrap="">A segmentation fault can occur for other reasons. If it is happening
when you use LDAP, it could be a conflict in versions of LDAP
libraries being used by Apache or PHP and Python LDAP module.
You should use the 'ldd' command to determine what LDAP shared library
is used by mod_authnz_ldap and compare that to the LDAP library being
used by the C extension module component of the Python module you are
using to access LDAP. Similarly find any PHP extension modules which
use LDAP and look at those.
If mod_authnz_ldap is loaded into Apache and you don't need it, then
don't load it and see if problem goes away. Also try not loading PHP
if it is being loaded. Narrow down which is in conflict.
As far as I remember, Apache itself doesn't link to LDAP library and
even possible that mod_authnz_ldap uses an internal LDAP library
rather than linking external library. All the same even use ldd on
Apache binary itself to see which LDAP library may be linked.
Graham
On 10 March 2010 04:18, wayne collier <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]"><[email protected]></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Okay I guess I will look else where. However, I keep getting segmentation
faults when try an execute the ldap command
t=l.simple_bind_s(dn,pw). It is only line of code that crashes. If the have
the classic expat problem, would that mean I would get a segmentation
fault problem from the start. Also, ldap script works okay as a stand alone
script. Thanks.
Wayne
Graham Dumpleton wrote:
That is not your problem, quoting:
<a class="moz-txt-link-freetext" href="http://code.google.com/p/modwsgi/wiki/IssuesWithExpatLibrary">http://code.google.com/p/modwsgi/wiki/IssuesWithExpatLibrary</a>
which is more up to date in respect of this issue, even if the
mod_wsgi variant of that document:
"""Note that this only applies to Python versions prior to Python 2.5.
>From Python 2.5 onwards, the copy of the "expat" library bundled in
with Python is name space prefixed, thereby avoid name clashes with an
"expat" library which has previously been loaded."""
You are using Python 2.6, so you cannot be affected by this problem.
Graham
On 9 March 2010 05:54, wayne collier <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]"><[email protected]></a> wrote:
Hello all. I need some help solving the dreaded segmentation fault that has
cropped several time on this board. I have read the link
<a class="moz-txt-link-freetext" href="http://www.dscpl.com.au/wiki/ModPython/Articles/ExpatCausingApacheCrash">http://www.dscpl.com.au/wiki/ModPython/Articles/ExpatCausingApacheCrash</a> and
followed the step and have uncovered the following.
ldd /usr/local/httpd-2.2.11/bin/httpd | grep expat
libexpat.so.0 => /lib/libexpat.so.0 (0x00d70000)
strings /lib/libexpat.so.0 | grep expat_
expat_1.95.8
ps aux | grep http | head -3
webuser 14986 0.0 2.1 54236 19048 ? S Mar04 0:01
/usr/local/httpd-2.2.11/bin/httpd -d /usr/local/httpd-2.2.11 -f
/usr/local/httpd-2.2.11/conf/httpd.conf
webuser 14987 0.0 3.2 144128 29540 ? S Mar04 0:01
/usr/local/httpd-2.2.11/bin/httpd -d /usr/local/httpd-2.2.11 -f
/usr/local/httpd-2.2.11/conf/httpd.conf
webuser 14998 0.0 3.2 144212 29660 ? S Mar04 0:01
/usr/local/httpd-2.2.11/bin/httpd -d /usr/local/httpd-2.2.11 -f
/usr/local/httpd-2.2.11/conf/httpd.conf
/usr/sbin/lsof -p 14986 | grep expat
httpd 14986 webuser mem REG 3,5 572313 972637
/opt/Python/lib/python2.6/lib-dynload/pyexpat.so
httpd 14986 webuser mem REG 3,5 133120 1883791
/lib/libexpat.so.0.5.0
I am not sure why I get 2 shared libaries here.
strings /lib/libexpat.so.0.5.0 | grep expat_
expat_1.95.8
strings /opt/Python/lib/python2.6/lib-dynload/pyexpat.so | grep expat_
pyexpat.expat_CAPI 1.0
expat_CAPI
expat_2.0.0
import pyexpat
pyexpat.version_info
(2, 0, 0)
So it seems like I need get expat_1.95.8 apache is using up to expat_2.0.0.
Can I simply try replacing the 1.95.8 library with 2.0.0. Or do I have
recompile with Apache? If I do recompile I need to recompile apache with
mod_python as well?
_______________________________________________
Mod_python mailing list
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="http://mailman.modpython.org/mailman/listinfo/mod_python">http://mailman.modpython.org/mailman/listinfo/mod_python</a>
</pre>
</blockquote>
<pre wrap=""><!---->
_______________________________________________
Mod_python mailing list
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="http://mailman.modpython.org/mailman/listinfo/mod_python">http://mailman.modpython.org/mailman/listinfo/mod_python</a>
</pre>
</blockquote>
<br>
</body>
</html>
--Boundary_(ID_wOPddUaG0OEhgC+WJHBpMA)--
--===============1487304634==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Mod_python mailing list
[email protected]
http://mailman.modpython.org/mailman/listinfo/mod_python
--===============1487304634==--