Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using nginx with php-fpm on CentOS 6 with cPanel. I have no installed modules like eAccelerator or APC. Server periodically returns 404 and 502 errors.

404 errors occur when the PHP cannot correctly read the settings from config.php file and redirects to install.php page (action provided by installed php scripts) with requested page uri as root directory (WTF?!). Example, requested /some/page-num will be redirected to /some/page-num/install.php. config.php file exists and still readable by php-fpm user, settings are right.

502 errors occur because the child process receives a signal 11 (SIGSEGV).

[25-Dec-2013 02:03:30] WARNING: [pool front_domain.tld] child 19653 exited on signal 11 (SIGSEGV - core dumped) after 25819.059198 seconds from start

PHP builded with following options:

'./configure' '--disable-fileinfo' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-fpm' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-wddx' '--enable-zip' '--prefix=/usr/local/fastcgi' '--with-bz2' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-sqlite=shared' '--with-tidy=/opt/tidy/' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr' '--sysconfdir=/etc/php-fpm' '--with-config-file-path=/usr/local/lib/php.ini'

core dump backtrace:

#0  _zend_mm_free_int (heap=0x1440330, p=0x2306730) at /home/cpeasyapache/src/php-5.3.28/Zend/zend_alloc.c:1998                                                                  
        mm_block = <value optimized out>                                                                                                                                         
        next_block = <value optimized out>                                                                                                                                       
        size = <value optimized out>                                                                                                                                             
#1  0x0000000000741d9e in zend_multibyte_read_script (buf=0x7f8280e97000 <Address 0x7f8280e97000 out of bounds>, n=4323) at Zend/zend_language_scanner.l:709                     
No locals.                                                                                                                                                                       
#2  0x00000000007421bd in open_file_for_scanning (file_handle=0x7fff8e2bdd10) at Zend/zend_language_scanner.l:279                                                                
        file_path = 0x0                                                                                                                                                          
        buf = 0x7f8280e97000 <Address 0x7f8280e97000 out of bounds>                                                                                                              
        size = 4323                                                                                                                                                              
        offset = 0                                                                                                                                                               
#3  0x0000000000742d56 in compile_file (file_handle=0x7fff8e2bdd10, type=<value optimized out>) at Zend/zend_language_scanner.l:352                                              
        original_lex_state = {yy_leng = 6, yy_start = 0x2329e80 <Address 0x2329e80 out of bounds>, yy_text = 0x232ad9c <Address 0x232ad9c out of bounds>,                        
          yy_cursor = 0x232ada2 <Address 0x232ada2 out of bounds>, yy_marker = 0x232ad97 <Address 0x232ad97 out of bounds>,                                                      
          yy_limit = 0x232b168 <Address 0x232b168 out of bounds>, yy_state = 0, state_stack = {top = 0, max = 64, elements = 0x16deca0}, in = 0x0, lineno = 27,                  
          filename = 0x20cfd78 <Address 0x20cfd78 out of bounds>, script_org = 0x2306730 <Address 0x2306730 out of bounds>, script_org_size = 4840,                              
          script_filtered = 0x2329e80 <Address 0x2329e80 out of bounds>, script_filtered_size = 4840, input_filter = 0, output_filter = 0, script_encoding = 0xe1cc80,           
          internal_encoding = 0xe1cc80}                                                                                                                                          
        op_array = 0x16e4338                                                                                                                                                     
        original_active_op_array = 0x0                                                                                                                                           
        retval = 0x16e4338                                                                                                                                                       
        compiler_result = <value optimized out>                                                                                                                                  
        compilation_successful = 0 '\000'                                                                                                                                        
        retval_znode = {op_type = 1, u = {constant = {value = {lval = 1, dval = 4.9406564584124654e-324, str = {val = 0x1 <Address 0x1 out of bounds>, len = 1}, ht = 0x1,       
                obj = {handle = 1, handlers = 0x1}}, refcount__gc = 1, type = 1 '\001', is_ref__gc = 0 '\000'}, var = 1, opline_num = 1, op_array = 0x1, jmp_addr = 0x1, EA = {  
              var = 1, type = 0}}}                                                                                                                                               
        original_in_compilation = 0 '\000'                                                                                                                                       
#4  0x00000000005e7211 in phar_compile_file (file_handle=0x7fff8e2bdd10, type=8) at /home/cpeasyapache/src/php-5.3.28/ext/phar/phar.c:3394                                       
        __orig_bailout = 0x7fff8e2bb6b0                                                                                                                                          
        __bailout = {{__jmpbuf = {23908400, -3793930471121622825, 0, 1, 3, 8, -3793930468894447401, 3793821703852779735}, __mask_was_saved = 0, __saved_mask = {__val = {4096,   
                8, 1387861052, 48037444, 1387861052, 36037404, 1387861052, 36037404, 0, 0, 90, 90, 265217965696, 33, 1, 140735578609696}}}}                                      
        res = <value optimized out>                                                                                                                                              
        name = 0x0                                                                                                                                                               
        failed = 0                                                                                                                                                               
        phar = 0x7fff00000001                                                                                                                                                    
#5  0x0000000000766ae9 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/cpeasyapache/src/php-5.3.28/Zend/zend.c:1251                                          
        files = {{gp_offset = 40, fp_offset = 0, overflow_arg_area = 0x7fff8e2b9670, reg_save_area = 0x7fff8e2b9600}}                                                            
        i = <value optimized out>                                                                                                                                                
        file_handle = 0x7fff8e2bdd10                                                                                                                                             
        orig_op_array = 0x0
        orig_retval_ptr_ptr = 0x0
#6  0x0000000000712f57 in php_execute_script (primary_file=0x7fff8e2bdd10) at /home/cpeasyapache/src/php-5.3.28/main/main.c:2316
        realfile = "Я+\216\377\177", '\000' <repeats 18 times>"\260, \257+\216\377\177\000\000\020\247+\216\000\000\000\000\060\257+\216\377\177\000\000\000\000\000\000\000\000\000\000`\257+\216\377\177\000\000 \247+\216\377\177\000\000F>\000\301=\000\000\000@\247+\216\377\177\000\000p\247+\216\377\177\000\000\001\000\000\000\000\000\000\000\277*\177\000\000\000\000\000\340\271+\216\377\177\000\000p\247+\216\377\177\000\000\001\000\000\000\000\000\000\000'\323\177\000\000\000\000\000\035\b,\000\000\000\000\000\000\026", '\000' <repeats 14 times>"\266, \006\177", '\000' <repeats 21 times>, "\001\005\000\001", '\000' <repeats 12 times>, "\001\000\000\000\000\000\000\000\340\271+\216\377\177\000\000\270\002\000\000\000\000\000\000\\\236t\000\000\000\000\000\240h\344\000\000\000\000\000\300j\344\000\000\000\000\000\310\301l\001", '\000' <repeats 12 times>, "\002\000\000\000\000\000\000\000\274"...
        __orig_bailout = 0x7fff8e2bdb00
        __bailout = {{__jmpbuf = {14970336, -3793930470198875945, 23904720, 0, 0, 24158672, -3793930468802172713, 3793821868431370455}, __mask_was_saved = 0, __saved_mask = {
              __val = {265214701111, 0, 0, 24003320, 26682400, 26682400, 1, 24003320, 0, 8849451, 265214652966, 140735578627344, 140735578627344, 14968992, 23908400,
                24003320}}}}
        prepend_file_p = <value optimized out>
---Type <return> to continue, or q <return> to quit---
        append_file_p = 0x0
        prepend_file = {type = ZEND_HANDLE_FILENAME, filename = 0x0, opened_path = 0x0, handle = {fd = 0, fp = 0x0, stream = {handle = 0x0, isatty = 0, mmap = {len = 0,
                pos = 0, map = 0x0, buf = 0x0, old_handle = 0x0, old_closer = 0}, reader = 0, fsizer = 0, closer = 0}}, free_filename = 0 '\000'}
        append_file = {type = ZEND_HANDLE_FILENAME, filename = 0x0, opened_path = 0x0, handle = {fd = 0, fp = 0x0, stream = {handle = 0x0, isatty = 0, mmap = {len = 0,
                pos = 0, map = 0x0, buf = 0x0, old_handle = 0x0, old_closer = 0}, reader = 0, fsizer = 0, closer = 0}}, free_filename = 0 '\000'}
        old_cwd = 0x7fff8e2b9680 "/"
        use_heap = 0 '\000'
        retval = 0
#7  0x00000000007f9f9e in main (argc=<value optimized out>, argv=<value optimized out>) at /home/cpeasyapache/src/php-5.3.28/sapi/fpm/fpm/fpm_main.c:1929
        primary_script = 0x16e42b8 "/home/user/www/index.php"
        __orig_bailout = 0x0
        __bailout = {{__jmpbuf = {0, -3793930471181391657, 5, 14804228, 14941024, 0, -3793930470200973097, 3793821986280827095}, __mask_was_saved = 0, __saved_mask = {__val = {
                0, 14735952, 265210073782, 0, 140735578627088, 140198485292288, 140735578627088, 42, 265210073782, 2767790849, 140735578627136, 265239400880, 140735578627136,
                42, 140198485294104, 20233565}}}}
        exit_status = 0
        c = <value optimized out>
        file_handle = {type = ZEND_HANDLE_MAPPED, filename = 0x16cd030 "/home/user/www/index.php",
          opened_path = 0x16e42f8 "/home/user/www/index.php", handle = {fd = 24004200, fp = 0x16e4668, stream = {handle = 0x16e4668, isatty = 0, mmap = {
                len = 4323, pos = 0, map = 0x7f8280e97000, buf = 0x7f8280e97000 <Address 0x7f8280e97000 out of bounds>, old_handle = 0x1972420,
                old_closer = 0x77d250 <zend_stream_stdio_closer>}, reader = 0x77d870 <zend_stream_stdio_reader>, fsizer = 0x77d7a0 <zend_stream_stdio_fsizer>,
              closer = 0x77d7f0 <zend_stream_mmap_closer>}}, free_filename = 0 '\000'}
        orig_optind = 1
        orig_optarg = 0x0
        ini_entries_len = <value optimized out>
        max_requests = 400
        requests = 252
        fcgi_fd = 14968992
        request = {listen_socket = 0, fd = 3, id = 1, keep = 0, closed = 0, in_len = 0, in_pad = 0, out_hdr = 0x0, out_pos = 0x7fff8e2bba10 "\001\006",
          out_buf = "\001\006\000\001\001l\004\000Status: 404  Not Found\r\nX-Powered-By: PHP/5.3.28\r\nSet-Cookie: PHPSESSID=e8b817d80043f3f5d575bedd9bc08f11; path=/\r\nExpires: Thu, 19 Nov 1981 08:52:00 GMT\r\nCache-Control: no-store, no-cache, mus"..., reserved = '\000' <repeats 15 times>, env = 0x16cbf80}
        fpm_config = 0x7fff8e2bff35 "om"
        fpm_prefix = 0x0
        fpm_pid = 0x0
        test_conf = 0
        force_daemon = -1
        php_information = 0
        php_allow_to_run_as_root = 0
        __func__ = "main"

Sorry for my English, is not my mother language.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.