2

I have a script which intermittently returns a white screen of death in firefox and Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error. chrome.

When I try to access the script using a PHP HTTP client (like Zend_Http_Client), intermittently I get an exception (sorry I don't have the exact message on me at the moment).

I suspect a segfault. This is further buttressed by the lines in my error log that look like this: [Thu Mar 18 16:03:02 2010] [notice] child pid 845 exit signal Segmentation fault (11)

Now, I'm running RedHat, and I know that RedHat doesn't generate core dumps out-of-the-box. I followed the instructions here http://kbase.redhat.com/faq/docs/DOC-5353, but I'm not seeing any core dumps.

How do I generate a core dump?

blockhead
  • 861
  • 1
  • 8
  • 13
  • Perhaps giving others an idea of the instructions you followed would be preferable, as the link you supplied requires login details for RedHat... – Zayne S Halsall Nov 18 '10 at 14:42

2 Answers2

0

This may be related to issues I found a solution for with generating a core dump on Centos (which is redhat based). The related answer is here, albeit for php-fpm rather than apache.

The stumbling block for me, and I suspect for you too, is that if a process has changed it's own execution privileges, it is not permitted to produce a core dump file unless /proc/sys/fs/suid_dumpable is set to allow this. See information about this kernel-level control here.

If apache is initializing as root and running it's worker processes with reduced privileges, this may be affected by the above option, in addition to the other settings required to set (core dump path, core size limit, etc.)

Benjamin
  • 250
  • 2
  • 9
  • 1
    For anyone finding this from a search, that link is dead but I had the same issue with `suid_dumpable` and fixed it with `sysctl fs.suid_dumpable=2` and restarting the segfaulting process (PHP-FPM in my case). – edaemon Nov 24 '20 at 00:25
-1

You need to recompile your programs with debugging symbols.

I have written a small how-to on this topic: http://alekseykorzun.com/post/5251031042/debugging-crashes-on-freebsd; it's FreeBSD specific but might help you out.

Aleksey Korzun
  • 276
  • 1
  • 4
  • 2
    (1) Recompiling with debugging symbols does not enable core dumps. (2) In RHEL you do not need to recompile anything. You merely install the the associated -debug package. – Mark Wagner Jun 21 '11 at 16:10
  • (1) I'm obviously aware of that, but getting a core dump is useless if you don't have proper debugging symbols loaded. (2) Unless he installed from source.(3) Thanks for adding absolutely nothing to the conversation. – Aleksey Korzun Jun 21 '11 at 20:59
  • @MarkWagner Although very fair points in their own right, I don not believe your objections would mean to downvote this answer since what it says is perfectly correct and actually more general and informative as to how one should proceed when a seg fault happens. – Ashkan Kh. Nazary Mar 04 '13 at 12:28
  • @AlekseyKorzun "Thanks for adding absolutely nothing to the conversation" I believe his comments are actually adding a lot to the conversation. I didn't know RefHat got debugging packages at hand but perhaps you would have to re-compile anyways ! – Ashkan Kh. Nazary Mar 04 '13 at 12:29