Getting perl to core via mod_cgi
Hi all, I am currently debugging a problem with Moveable Type running under httpd v2.1.6. When mt.cgi is triggered, which is run under perl, perl seems to crash and the following message is logged: [Fri Oct 14 15:22:55 2005] [error] [client 196.31.24.162] *** glibc detected *** free(): invalid next size (normal): 0x0935d8b0 *** I found the docs on how to convince httpd to dump core if httpd crashes, but I have yet to find something that explains how to get _perl_ (or any process run from mod_cgi) to dump core if it crashes. Does anybody have any ideas? Regards, Graham -- smime.p7s Description: S/MIME Cryptographic Signature
Re: Getting perl to core via mod_cgi
I found the docs on how to convince httpd to dump core if httpd crashes, but I have yet to find something that explains how to get _perl_ (or any process run from mod_cgi) to dump core if it crashes. Does anybody have any ideas? What's 'ulimit -c' (bash, under tcsh it's 'limit -c', other shells may differ) for the user under which httpd runs? Joost
Re: Getting perl to core via mod_cgi
Joost de Heer wrote: What's 'ulimit -c' (bash, under tcsh it's 'limit -c', other shells may differ) for the user under which httpd runs? [EMAIL PROTECTED] ~]# ulimit -c unlimited This is for root though, which spawned httpd, which then becomes apache. I am not sure whether the apache user inherits this from root. I can see nothing obvious in the bash man page to make ulimit work for anything other than the current shell, unless I am looking in the wrong place. Regards, Graham -- smime.p7s Description: S/MIME Cryptographic Signature
Re: Getting perl to core via mod_cgi
I can see nothing obvious in the bash man page to make ulimit work for anything other than the current shell, unless I am looking in the wrong place. You can set it worldwide in /etc/initscript. Joost
Re: Getting perl to core via mod_cgi
On 10/14/2005 11:10 PM, Graham Leggett wrote: Joost de Heer wrote: [..cut..] [EMAIL PROTECTED] ~]# ulimit -c unlimited This is for root though, which spawned httpd, which then becomes apache. I am not sure whether the apache user inherits this from root. Normally it should, provided that it is not changed after fork and before exec, but I have found no reference to RLIMIT_CORE in the httpd / apr sources. If you run Solaris (not limited to 2.7) you have to take care of what is mentioned in http://httpd.apache.org/dev/debugging.html#sol27 Regards RĂ¼diger
Re: Getting perl to core via mod_cgi
On 10/14/05, Graham Leggett [EMAIL PROTECTED] wrote: Joost de Heer wrote: What's 'ulimit -c' (bash, under tcsh it's 'limit -c', other shells may differ) for the user under which httpd runs? [EMAIL PROTECTED] ~]# ulimit -c unlimited This is for root though, which spawned httpd, which then becomes apache. I am not sure whether the apache user inherits this from root. It does. ulimit settings in the shell used to start Apache affect the Apache child processes. IOW, the setuid() does not change that aspect of the environment.