python - CoreDumpDirectory isn't working on ubuntu; getting segmentation fault in apache2 error log -
i not able log apache2 crashes in coredumpdirectory on ubuntu 10.10. using django 1.2.3 , apache2 mod_wsgi. followed steps listed in response this question no avail. added - coredumpdirectory /var/cache/apache2/
@ end of apache2.conf file , after executing 'ulimit -c unlimited'
, restarted apache server. replicated condition causes apache error log show- "child pid 27288 exit signal segmentation fault (11)
" there no mention of apache2 logging crash in coredumpdirectory , there nothing in /var/cache/apache2.
edit:
i able solve problem. issue pylucene environment being initialized on run time. executing initvm() call everytime request comes , causing segmentation fault. this link directed should in .wsgi file , after did there no segmentation faults.
i ran problem of mod_wsgi children not dumping core. long story short: need edit /etc/sysctl.conf
, set fs.suid_dumpable=2
.
long story:
linux prevents dumping core processes started root , dropped privileges. (this security feature, suid executables don't leak memory user). setting suid_dumpable=2 means core files owned root, there's no direct security problem there either.
why affects mod_wsgi? apparently mod_wsgi's child processes forked off apache's main process. apache starts root, since needs bind privileged port numbers 80, , drops privileges.
(original bug report: https://code.google.com/p/modwsgi/issues/detail?id=247)
Comments
Post a Comment