Segmentation Fault (11) on httpd when python-ldap is initialized

1.2k views Asked by At

I'm using mod_wsgi for a Django application (OSQA) on RHEL 5 with Python 2.43 (cannot upgrade).

I had the site set up and working fine, and then tried to integrate the authentication with python-ldap for accessing Active Directory attributes e.g. a user's name, email address etc.

Apache httpd crashes with the following message:

[notice] child pid 18705 exit signal Segmentation fault (11)

I originally thought this was due to inconsisten expat libraries between Apache and Python, but I have since upgraded the libexpat.so module to match the Python version of pyexpat (1.95.8).

From heavy logging in the django log, I can see the seg fault occurs when this line is executed:

con = ldap.initialize(AD_LDAP_URL)

Is there something specific with python-ldap causing this issue? Any other thoughts on how to debug?

Thanks

1

There are 1 answers

3
Graham Dumpleton On

Try disabling any Apache modules for auth which use LDAP. Also try disabling mod_php if being used and it is loading a LDAP extension. In short, library version conflict may be because of LDAP libraries rather than expat, so disable the other Apache modules and see if problem goes away. That will narrow it down.