can't create core dump file

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
allelopath
Forum Commoner
Posts: 34
Joined: Tue Mar 16, 2004 5:21 am

can't create core dump file

Post by allelopath »

I am trying to create a core dump file in order to submit a PHP bug
I am following instructions at:
http://bugs.php.net/bugs-generating-backtrace.php

i configure for debug and then build
# ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --enable-debug > configureOutput.txt
# make
# make install
# libtool --finish /usr/local/php-5.0.0RC1/libs

i remove limits on core dump size from shell
# ulimit -c unlimited

I open all permissions to /usr/local/apache/bin/
# chmod 777 /usr/local/apache/bin

then run httpd
cd /usr/local/apache/bin
#./httpd -X

Then i access a php page

"Segmentation Fault" appears in the shell (this is the error i'm trying to trace), but I should see a file name 'core' in /usr/local/apache/bin
but I don't

If i then follow the instructions for "If you can't get a core file", i get the message:
Couldn't get registers: Operation not permitted.

What can i do to get a core dump file?
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

This is a bug in the 2.4 Kernel that disables core dumps in programs that have changed user id's like httpd. This is supposedly fixed in the Apache 2.0, but you can also get an apache module called mod_prctl which will enable core dumps on apache again without having to recompile apache. Good luck.
allelopath
Forum Commoner
Posts: 34
Joined: Tue Mar 16, 2004 5:21 am

Post by allelopath »

ok, thanks, i've actually discovered the problem i was trying to trace thru other ways, but next tiime i need to do this, i know
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

Yea, I was going to say using gdb or strace would be easier, but dunno if the php guys would want the backtraces of those.
Post Reply