1

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

skaffman
  • 398,947
  • 96
  • 818
  • 769
Alex
  • 11
  • 2
  • Just a suggetion: check the audit log for selinux getting in the way. I seem to recall occasionally finding segfault issues as a result of selinux prohibition. – MattH Mar 03 '11 at 13:27

1 Answers1

1

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.

Graham Dumpleton
  • 57,726
  • 6
  • 119
  • 134
  • Thanks Graham. I'm using [mod_auth_vas](http://rc.quest.com/topics/mod_auth_vas/) for single sign-on, and the standard [mod_authz_host](http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html) and [mod_authn_anon](http://httpd.apache.org/docs/2.2/mod/mod_authn_anon.html). I've tried disabling these in turn and am still seeing the same Segmentation Fault error. I'm not using mod_php either. Will keep digging. Any other thoughts? – Alex Mar 04 '11 at 09:42
  • Differing versions of SSL libraries if that LDAP client supports use of LDAPS. – Graham Dumpleton Mar 04 '11 at 09:54
  • Perhaps try http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Debugging_Crashes_With_GDB and see if gdb can give stack trace of what code it is crashing in. – Graham Dumpleton Mar 04 '11 at 09:55