Closed GoogleCodeExporter closed 8 years ago
I'm getting nothing but segmentation faults. I think the trick to getting the
core dump is to remember that your running a daemon, so it's not the httpd
process owned by apache but some other process - hence the ulimit in the apache
init script is irrelevant. I got core dumps by setting ulimit in the global
profile (/etc/profile on my redhat system).
Original comment by another....@gmail.com
on 20 Mar 2012 at 3:00
> remember that your running a daemon, so it's not the httpd process owned by
apache
> but some other process - hence the ulimit in the apache init script is
irrelevant
Limits are inherited by child processes and I don't see why Apache or mod_wsgi
would need to override them. In fact, they *aren't* changed in the wsgi process:
# cat /proc/5118/limits |grep core
Max core file size unlimited unlimited bytes
Yet no core files appear anywhere.
> I got core dumps by setting ulimit in the global profile (/etc/profile on my
> redhat system).
Well I tried this, still no help. AFAICT this works out to the same effect as
setting it in limits.conf
Original comment by ma...@juffo.org
on 20 Mar 2012 at 3:35
Hmm, here's another report of this problem:
http://stackoverflow.com/questions/5833218/coredumpdirectory-isnt-working-on-ubu
ntu-getting-segmentation-fault-in-apache2
Maybe this is an Ubuntu/Debian problem...
Original comment by ma...@juffo.org
on 20 Mar 2012 at 3:42
Ok, further digging led me to a comment in Apache docs saying "If Apache starts
as root and switches to another user, the Linux kernel disables core dumps even
if the directory is writable for the process"
So I read the core(5) man page and it turns out I have to set sysctl
'fs.suid_dumpable=2', which finally gave me the core file! So turns out this is
not a mod_wsgi bug, but an unexpected side-effect of Apache being launched as
root and hot the way mod_wsgi starts its daemon processes.
Original comment by ma...@juffo.org
on 20 Mar 2012 at 4:13
Closing out old issue. Don't see any specific code change which is required.
Original comment by Graham.Dumpleton@gmail.com
on 12 Nov 2014 at 10:33
Perhaps a documentation change, however?
Original comment by ma...@juffo.org
on 12 Nov 2014 at 11:53
Original issue reported on code.google.com by
ma...@juffo.org
on 30 Sep 2011 at 10:55