{"id":327,"date":"2009-02-03T22:41:58","date_gmt":"2009-02-03T19:41:58","guid":{"rendered":"http:\/\/www.void.gr\/kargig\/blog\/?p=327"},"modified":"2009-02-04T01:15:04","modified_gmt":"2009-02-03T22:15:04","slug":"help-needed-on-apache2-segfaults","status":"publish","type":"post","link":"https:\/\/www.void.gr\/kargig\/blog\/2009\/02\/03\/help-needed-on-apache2-segfaults\/","title":{"rendered":"Help needed on apache2 segfaults"},"content":{"rendered":"<p>Dear Internet,<\/p>\n<p>I need your help!<br \/>\nI have a debian stable (4.0) server with apache2 (Version: 2.2.3-4+etch6) running which is hosting more than 10 different sites. The problem is that in the apache2 error log I can see a lot of segfaults. All sites though continue to work properly and nobody has ever complained about them.<\/p>\n<p>Some logs:<\/p>\n<blockquote><p>[Tue Feb 03 18:30:36 2009] [notice] child pid 1353 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:37 2009] [notice] child pid 29343 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:37 2009] [notice] child pid 1350 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:38 2009] [notice] child pid 1349 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:38 2009] [notice] child pid 1352 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:39 2009] [notice] child pid 1354 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:41 2009] [notice] child pid 1380 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:42 2009] [notice] child pid 1378 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:42 2009] [notice] child pid 1714 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:44 2009] [notice] child pid 1715 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:44 2009] [notice] child pid 1718 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:45 2009] [notice] child pid 1720 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:45 2009] [notice] child pid 1721 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:46 2009] [notice] child pid 1723 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:47 2009] [notice] child pid 1724 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:47 2009] [notice] child pid 1725 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:49 2009] [notice] child pid 1726 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:49 2009] [notice] child pid 1728 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:50 2009] [notice] child pid 1729 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:50 2009] [notice] child pid 1730 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:51 2009] [notice] child pid 1358 exit signal Segmentation fault (11)<br \/>\n[Tue Feb 03 18:30:51 2009] [notice] child pid 1733 exit signal Segmentation fault (11)<\/p><\/blockquote>\n<p>In order to find out what causes the segfaults I have enabled the following options:<br \/>\ninside \/etc\/apache2\/apache2.conf<br \/>\nCoreDumpDirectory \/tmp-apache\/<br \/>\n$ ls -Fla \/ | grep tmp-apache<br \/>\ndrwxrwxrwx 2 www-data www-data 4096 2009-01-31 11:01 tmp-apache\/<\/p>\n<p>I have changed the ulimit settings inside \/etc\/security\/limits.conf<br \/>\n* soft core unlimited<br \/>\n* hard core unlimited<\/p>\n<p>I have even added a ulimit -c unlimited setting inside \/etc\/init.d\/apache2.<br \/>\nBut still I get no core dumps inside \/tmp-apache2\/ from the segfaulting children.<br \/>\nIf I manually kill -11 apache.pid then I can see a core file inside \/tmp-apache\/<\/p>\n<p>I have only seen one or two core dumps generated by apache and using gdb I could see that they both \u201cblamed\u201d a function of \/usr\/lib\/apache2\/modules\/libphp5.so. In my quest to find which site\/code causes the segfaults I have recompiled apache2 to enable mod_whatkilledus. But no core dump was created in \/tmp-apache\/ for more than a week even if the segfaults keep happening.<\/p>\n<p>I have reduced my modules, removed mod_python, mod_perl, etc and still these segfaults keep occuring but no core dumps. I suspect that the only time I got a core was when a parent and not a child process segfaulted. I don\u2019t think that my apache2 children dump core when they segfault.<\/p>\n<p>Is there anything I could have done and I haven\u2019t done it ? Is there a way I can force apache2 children to dump core or any other way to determine what causes these segfaults ? All these without of course closing down the sites one by one to see when the segfaults stop\u2026<\/p>\n<p>Thanks in advance to anyone that replies!<\/p>\n<p>P.S. blog&#8217;s database is making some tricks&#8230;I hope it&#8217;s ok now and the post is fully published<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dear Internet, I need your help! I have a debian stable (4.0) server with apache2 (Version: 2.2.3-4+etch6) running which is hosting more than 10 different sites. The problem is that in the apache2 error log I can see a lot of segfaults. All sites though continue to work properly and nobody has ever complained about [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-327","post","type-post","status-publish","format-standard","hentry","category-linux"],"aioseo_notices":[],"views":18526,"_links":{"self":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/comments?post=327"}],"version-history":[{"count":0,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/327\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/media?parent=327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/categories?post=327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/tags?post=327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}