You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Al Zick <al...@familysafeinternet.com> on 2013/01/06 14:21:53 UTC

[users@httpd] Please help Apache Segmentation fault

Hello,

I am seeing "[notice] child pid 16566 exit signal Segmentation fault  
(11)" in my apache error_log. There is something like 66790 in maybe  
1 or 2 days. I think this
problem is being caused by php. Also, I am getting many core dumps  
from apache. I wonder if this could be causing the issue that I am  
having with sokva. Since the
child process does not exit cleanly, could it be leaving things in  
the kernel, eventually filling the kernel's sokva area? I now have my  
kern.somaxkva = 100663296.
This is not helping.  If I don't reboot the system everyday, then all  
apache processes go into a stat of sokva. I am desperate to find a  
solution!

Thanks,
Al

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Please help Apache Segmentation fault

Posted by Al Zick <al...@familysafeinternet.com>.
Hi,

On Jan 6, 2013, at 10:28 AM, Yehuda Katz wrote:

> On Sun, Jan 6, 2013 at 8:39 AM, Nick Kew <ni...@webthing.com> wrote:
> What is a "sokva"?
>
> NetBSD
>
> sysctl -w kern.somaxkva=[sbmax]	Set maximum size for all socket  
> buffers together in the system

This is exactly right. Still it doesn't answer the question of why my  
sokva area is overwhelmed. My best guess is that PHP is not releasing  
some resources when it exits. I have not been able to figure it out,  
or why Apache is killing so many child processes.

Thanks,
Al

Re: [users@httpd] Please help Apache Segmentation fault

Posted by Yehuda Katz <ye...@ymkatz.net>.
On Sun, Jan 6, 2013 at 8:39 AM, Nick Kew <ni...@webthing.com> wrote:

> What is a "sokva"?
>

NetBSD
sysctl -w kern.somaxkva=[sbmax] Set maximum size for all socket buffers
together in the system

Re: [users@httpd] Please help Apache Segmentation fault

Posted by Al Zick <al...@familysafeinternet.com>.
Hi,

On Jan 6, 2013, at 12:11 PM, Yehuda Katz wrote:

> On Sun, Jan 6, 2013 at 12:02 PM, Al Zick  
> <al...@familysafeinternet.com> wrote:
> This is what I get from gdb:
>
> [New process 1]
> Core was generated by `httpd'.
> Program terminated with signal 11, Segmentation fault.
> #0  0xfddf352c in ?? () from /usr/lib/libc.so.12
> (gdb) bt
> #0  0xfddf352c in ?? () from /usr/lib/libc.so.12
> #1  0xfddf345c in ?? () from /usr/lib/libc.so.12
> #2  0xfddf5ca4 in free () from /usr/lib/libc.so.12
> #3  0xfcb2c160 in zend_hash_destroy () from /usr/local/lib/httpd/ 
> mod_php5.so
> #4  0xfcb2f45c in zend_destroy_rsrc_list_dtors () from /usr/local/ 
> lib/httpd/mod_php5.so
> #5  0xfcb1c6c4 in zend_shutdown () from /usr/local/lib/httpd/ 
> mod_php5.so
> #6  0xfcab22e0 in php_module_shutdown () from /usr/local/lib/httpd/ 
> mod_php5.so
> #7  0xfcab23b8 in php_module_shutdown_wrapper () from /usr/local/ 
> lib/httpd/mod_php5.so
> #8  0xfcbe3124 in php_apache_server_shutdown () from /usr/local/lib/ 
> httpd/mod_php5.so
> #9  0xfdf088d4 in apr_pool_destroy () from /usr/local/lib/ 
> libapr-1.so.0
> #10 0xfdf088a4 in apr_pool_destroy () from /usr/local/lib/ 
> libapr-1.so.0
> #11 0x01819a7c in destroy_and_exit_process ()
> #12 0x0181ad28 in main ()
> (gdb)
>
> It certainly looks like it could be a PHP problem. Did you try  
> removing the PHP module to see if the problem goes away? (You could  
> run it as FastCGI or even traditional CGI in the mean time.)

I did not try removing the PHP the module. I will try this.

Although, it looks to me that a lot of apache processes are trying to  
exit. Why am I seeing this?

Thanks,
Al

Re: [users@httpd] Please help Apache Segmentation fault

Posted by Al Zick <al...@familysafeinternet.com>.
Hello,

On Jan 6, 2013, at 2:05 PM, Nick Kew wrote:

>
> On 6 Jan 2013, at 17:11, Yehuda Katz wrote:
>
>> It certainly looks like it could be a PHP problem. Did you try  
>> removing the PHP module to see if the problem goes away? (You  
>> could run it as FastCGI or even traditional CGI in the mean time.)
>
> Yes, but it's happening at server shutdown.
> That's bad, but shutdowns don't come out of the blue.
> Why is the OP shutting down so many servers?
> Is this something like ITK MPM that forks every hit?
>
> If I had the source and were tasked with debugging it, I'd start
> by looking at what it's trying to free, where it came from, etc:
>
> #2  0xfddf5ca4 in free ()
> #3  0xfcb2c160 in zend_hash_destroy ()

I have the complete source for NetBSD 6. It is what I used to do an  
upgrade from source. I am just not sure where to find libc.so.12 in  
the source. There doesn't seem to be a source file/directory with  
that name.

Thanks,
Al
  

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Please help Apache Segmentation fault

Posted by Nick Kew <ni...@webthing.com>.
On 6 Jan 2013, at 17:11, Yehuda Katz wrote:

> It certainly looks like it could be a PHP problem. Did you try removing the PHP module to see if the problem goes away? (You could run it as FastCGI or even traditional CGI in the mean time.)

Yes, but it's happening at server shutdown.
That's bad, but shutdowns don't come out of the blue.
Why is the OP shutting down so many servers?
Is this something like ITK MPM that forks every hit?

If I had the source and were tasked with debugging it, I'd start
by looking at what it's trying to free, where it came from, etc:

#2  0xfddf5ca4 in free () 
#3  0xfcb2c160 in zend_hash_destroy () 

-- 
Nick Kew
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Please help Apache Segmentation fault

Posted by Yehuda Katz <ye...@ymkatz.net>.
On Sun, Jan 6, 2013 at 12:02 PM, Al Zick <al...@familysafeinternet.com> wrote:

> This is what I get from gdb:
>
> [New process 1]
> Core was generated by `httpd'.
> Program terminated with signal 11, Segmentation fault.
> #0  0xfddf352c in ?? () from /usr/lib/libc.so.12
> (gdb) bt
> #0  0xfddf352c in ?? () from /usr/lib/libc.so.12
> #1  0xfddf345c in ?? () from /usr/lib/libc.so.12
> #2  0xfddf5ca4 in free () from /usr/lib/libc.so.12
> #3  0xfcb2c160 in zend_hash_destroy () from /usr/local/lib/httpd/mod_php5.
> **so
> #4  0xfcb2f45c in zend_destroy_rsrc_list_dtors () from
> /usr/local/lib/httpd/mod_php5.**so
> #5  0xfcb1c6c4 in zend_shutdown () from /usr/local/lib/httpd/mod_php5.**so
> #6  0xfcab22e0 in php_module_shutdown () from
> /usr/local/lib/httpd/mod_php5.**so
> #7  0xfcab23b8 in php_module_shutdown_wrapper () from
> /usr/local/lib/httpd/mod_php5.**so
> #8  0xfcbe3124 in php_apache_server_shutdown () from
> /usr/local/lib/httpd/mod_php5.**so
> #9  0xfdf088d4 in apr_pool_destroy () from /usr/local/lib/libapr-1.so.0
> #10 0xfdf088a4 in apr_pool_destroy () from /usr/local/lib/libapr-1.so.0
> #11 0x01819a7c in destroy_and_exit_process ()
> #12 0x0181ad28 in main ()
> (gdb)
>

It certainly looks like it could be a PHP problem. Did you try removing the
PHP module to see if the problem goes away? (You could run it as FastCGI or
even traditional CGI in the mean time.)

Re: [users@httpd] Please help Apache Segmentation fault

Posted by Al Zick <al...@familysafeinternet.com>.
Hello,

On Jan 6, 2013, at 8:39 AM, Nick Kew wrote:
> On 6 Jan 2013, at 13:21, Al Zick wrote:
>> I am seeing "[notice] child pid 16566 exit signal Segmentation  
>> fault (11)" in my apache error_log.
>
> Get a backtrace.  gdb on a coredump would be the most usual way.
> That's the startingpoint for getting help with a segfault.

This is what I get from gdb:

gdb /usr/local/sbin/httpd /usr/local/httpd.core
GNU gdb (GDB) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/ 
gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show  
copying"
and "show warranty" for details.
This GDB was configured as "powerpc--netbsd".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/sbin/httpd...(no debugging symbols  
found)...done.
[New process 1]
Core was generated by `httpd'.
Program terminated with signal 11, Segmentation fault.
#0  0xfddf352c in ?? () from /usr/lib/libc.so.12
(gdb) bt
#0  0xfddf352c in ?? () from /usr/lib/libc.so.12
#1  0xfddf345c in ?? () from /usr/lib/libc.so.12
#2  0xfddf5ca4 in free () from /usr/lib/libc.so.12
#3  0xfcb2c160 in zend_hash_destroy () from /usr/local/lib/httpd/ 
mod_php5.so
#4  0xfcb2f45c in zend_destroy_rsrc_list_dtors () from /usr/local/lib/ 
httpd/mod_php5.so
#5  0xfcb1c6c4 in zend_shutdown () from /usr/local/lib/httpd/mod_php5.so
#6  0xfcab22e0 in php_module_shutdown () from /usr/local/lib/httpd/ 
mod_php5.so
#7  0xfcab23b8 in php_module_shutdown_wrapper () from /usr/local/lib/ 
httpd/mod_php5.so
#8  0xfcbe3124 in php_apache_server_shutdown () from /usr/local/lib/ 
httpd/mod_php5.so
#9  0xfdf088d4 in apr_pool_destroy () from /usr/local/lib/libapr-1.so.0
#10 0xfdf088a4 in apr_pool_destroy () from /usr/local/lib/libapr-1.so.0
#11 0x01819a7c in destroy_and_exit_process ()
#12 0x0181ad28 in main ()
(gdb)

Thanks,
Al



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Please help Apache Segmentation fault

Posted by Nick Kew <ni...@webthing.com>.
On 6 Jan 2013, at 13:21, Al Zick wrote:

> Hello,
> 
> I am seeing "[notice] child pid 16566 exit signal Segmentation fault (11)" in my apache error_log. 

Get a backtrace.  gdb on a coredump would be the most usual way.
That's the startingpoint for getting help with a segfault.

If you don't know what that means, you may be better off with a clean
reinstall of your webserver and whatever runs under it.

WTF is a "sokva"?

-- 
Nick Kew
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org