You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Graham Leggett <mi...@sharp.fm> on 2005/10/14 22:31:33 UTC

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
--

Re: Getting perl to core via mod_cgi

Posted by Ruediger Pluem <rp...@apache.org>.

On 10/14/2005 11:10 PM, Graham Leggett wrote:
> Joost de Heer wrote:

[..cut..]


> [root@chandler ~]# 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

Posted by Joost de Heer <jo...@sanguis.xs4all.nl>.
> 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

Posted by Jeff Trawick <tr...@gmail.com>.
On 10/14/05, Graham Leggett <mi...@sharp.fm> 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?
>
> [root@chandler ~]# 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.

Re: Getting perl to core via mod_cgi

Posted by Graham Leggett <mi...@sharp.fm>.
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?

[root@chandler ~]# 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
--

Re: Getting perl to core via mod_cgi

Posted by Joost de Heer <jo...@sanguis.xs4all.nl>.
> 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