You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2014/09/15 15:47:36 UTC

[Bug 56984] New: Random and frequent Segmentation fault (11)

https://issues.apache.org/bugzilla/show_bug.cgi?id=56984

            Bug ID: 56984
           Summary: Random and frequent Segmentation fault (11)
           Product: Apache httpd-2
           Version: 2.4.10
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Platform
          Assignee: bugs@httpd.apache.org
          Reporter: victor_volpe@bol.com.br

After I moved from 2.2 to 2.4 start the headaches. The crashes are random and
occur very frequently. No hardware problem related, same behavior on an Cloud
server. Same behavior with PHP 5.4.32 and 5.6.0. The crash occurs in any PHP
script, with no warning/error in the logs.

OS: FreeBSD 10.0-RELEASE-p7 amd64

error_log:
[Sun Sep 14 22:15:20.114756 2014] [core:notice] [pid 80717:tid 34410095616]
AH00052: child pid 81760 exit signal Segmentation fault (11)
[Sun Sep 14 22:15:22.180905 2014] [core:notice] [pid 80717:tid 34410095616]
AH00052: child pid 81727 exit signal Segmentation fault (11)
[Sun Sep 14 22:27:14.973207 2014] [core:notice] [pid 80717:tid 34410095616]
AH00052: child pid 81807 exit signal Segmentation fault (11)

Apache 2.4.10 compile options:
./configure --prefix=/usr/apache --exec-prefix=/usr --sysconfdir=/etc/apache
--enable-modules=none --enable-mods-static="authn_core authn_file authz_host
authz_groupfile authz_user authz_core auth_basic socache_shmcb so include
filter mime log_config env expires headers setenvif version ssl unixd status
autoindex suexec cgi negotiation dir actions userdir alias rewrite"

PHP 5.6.0 compile options:
./configure --prefix=/usr/php5 --exec-prefix=/usr --with-apxs2=/usr/bin/apxs
--with-config-file-path=/etc --with-openssl --with-zlib --with-bz2 --with-curl
--enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir
--enable-mbstring --with-mcrypt --with-mssql --with-mysql
--with-mysql-sock=/tmp/mysql.sock --with-mysqli=/usr/local/bin/mysql_config
--enable-sockets --enable-zip

php.ini custom configurations:
expose_php = Off
error_reporting = E_ALL & ~E_NOTICE
date.timezone = "America/Sao_Paulo"
default_charset = ""

gdb output:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 807418000 (LWP 100188/httpd)]
0x00000008038b6157 in zend_stack_push (stack=0x808a9e4e8, element=0x808a9e4c8,
size=<value optimized out>) at zend_stack.c:42
42              stack->elements[stack->top] = (void *) emalloc(size);
Current language:  auto; currently minimal
(gdb) bt
#0  0x00000008038b6157 in zend_stack_push (stack=0x808a9e4e8,
element=0x808a9e4c8, size=<value optimized out>) at zend_stack.c:42
#1  0x000000080387ee63 in compile_file (file_handle=<value optimized out>,
type=<value optimized out>, tsrm_ls=0x8089a4900) at zend_language_scanner.l:583
#2  0x0000000803752abf in phar_compile_file (file_handle=0x7ffffdbed920,
type=2, tsrm_ls=0x8089a4900) at phar.c:3411
#3  0x00000008038b9735 in zend_execute_scripts (type=2, tsrm_ls=0x8089a4900,
retval=0x0, file_count=1) at zend.c:1307
#4  0x000000080394cb8a in php_handler (r=0x80ba1c0a0) at sapi_apache2.c:669
#5  0x0000000000471fdb in ap_run_handler ()
#6  0x00000000004728bd in ap_invoke_handler ()
#7  0x00000000004b8489 in ap_process_async_request ()
#8  0x00000000004b301e in ap_process_http_async_connection ()
#9  0x00000000004b2d12 in ap_process_http_connection ()
#10 0x000000000048326b in ap_run_process_connection ()
#11 0x000000000053b2df in process_socket ()
#12 0x0000000000537b29 in worker_thread ()
#13 0x000000080208c4a4 in pthread_create () from /lib/libthr.so.3
#14 0x0000000000000000 in ?? ()
(gdb) bt full
#0  0x00000008038b6157 in zend_stack_push (stack=0x808a9e4e8,
element=0x808a9e4c8, size=<value optimized out>) at zend_stack.c:42
No locals.
#1  0x000000080387ee63 in compile_file (file_handle=<value optimized out>,
type=<value optimized out>, tsrm_ls=0x8089a4900) at zend_language_scanner.l:583
        original_lex_state = {yy_leng = 0, yy_start = 0x0, yy_text = 0x0,
yy_cursor = 0x0, yy_marker = 0x0, yy_limit = 0x0, yy_state = 0, state_stack =
{top = 0, max = 0, elements = 0x0}, in = 0x0, lineno = 0, filename = 0x0,
  script_org = 0x0, script_org_size = 0, script_filtered = 0x0,
script_filtered_size = 0, input_filter = 0, output_filter = 0, script_encoding
= 0x0}
        retval_znode = {op_type = 1, u = {op = {constant = 1, var = 1, num = 1,
hash = 1, opline_num = 1, jmp_addr = 0x1, zv = 0x1, literal = 0x1, ptr = 0x1},
constant = {value = {lval = 1, dval = 4.9406564584124654e-324, str = {
          val = 0x1 <Error reading address 0x1: Bad address>, len = 22}, ht =
0x1, obj = {handle = 1, handlers = 0x16}}, refcount__gc = 1, type = 1 '\001',
is_ref__gc = 0 '\0'}, op_array = 0x1}, EA = 51444928}
        original_active_op_array = (zend_op_array *) 0x0
        original_in_compilation = 0 '\0'
        compiler_result = <value optimized out>
        retval = <value optimized out>
#2  0x0000000803752abf in phar_compile_file (file_handle=0x7ffffdbed920,
type=2, tsrm_ls=0x8089a4900) at phar.c:3411
        __bailout = {{_sjb = {34417748607, 140737450531104, 140737450530424,
140737450530720, 140737450531232, 0, 0, 34504067328, 140737450476415,
34389426431, 1280, 34359738368}}}
        __bailout = {{_sjb = {34417748607, 140737450531104, 140737450530424,
140737450530720, 140737450531232, 0, 0, 34504067328, 140737450476415,
34389426431, 1280, 34359738368}}}
        __orig_bailout = (sigjmp_buf *) 0x7ffffdbed9a0
        name = 0x0
        phar = (phar_archive_data *) 0x50
        name = 0x0
        res = <value optimized out>
        failed = Error accessing memory address 0x0: Bad address.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 56984] Random and frequent Segmentation fault (11)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56984

--- Comment #1 from Mike Rumph <mi...@oracle.com> ---
Hello Victor,

My guess is that when you went from 2.2 to 2.4 you switched from MPM prefork to
MPM worker.  This would happen by default.
You can verify this by running httpd -M.
If I remember correctly, PHP routines are known to not be thread-safe.
You can try switching back to MPM prefork and see if your problems go away.

You can do this by adding --with-mpm=prefork to your httpd configure.

Thanks,

Mike Rumph

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 56984] Random and frequent Segmentation fault (11)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56984

victor_volpe@bol.com.br changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from victor_volpe@bol.com.br ---
(In reply to Mike Rumph from comment #1)
> Hello Victor,
> 
> My guess is that when you went from 2.2 to 2.4 you switched from MPM prefork
> to MPM worker.  This would happen by default.
> You can verify this by running httpd -M.
> If I remember correctly, PHP routines are known to not be thread-safe.
> You can try switching back to MPM prefork and see if your problems go away.
> 
> You can do this by adding --with-mpm=prefork to your httpd configure.
> 
> Thanks,
> 
> Mike Rumph

OMG! Now my Apache is working like a charm. Thank you very much pal.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 56984] Random and frequent Segmentation fault (11)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56984

Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |INVALID

-- 
You are receiving this mail because:
You are the assignee for the bug.

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