Edit report at https://bugs.php.net/bug.php?id=59197&edit=1
ID: 59197 Comment by: james at parchment dot com Reported by: dathan at rockyou dot com Summary: Impossible PHP Fatal errors produced when APC is enabled Status: Open Type: Bug Package: APC Operating System: Centos 5.3 PHP Version: 5.3.2 Block user comment: N Private report: N New Comment: I occasionally suffer from this same issue with APC 3.1.3p1 using PHP 5.3.8 on RHEL 6.2. Apache version is 2.2.15. I don't have a simpler test, and unfortunately I cannot always reproduce it. To fix, I have to restart Apache. (More drastic approaches, such as deleting the entire web directory containing the PHP files and replacing them with a fresh copy without a restart, don't fix the issue.) Apache, PHP, and APC support are all from RPMs, so there is nothing special about my setup from that perspective. The disk hosting the files is local to the VM. Previous Comments: ------------------------------------------------------------------------ [2010-05-28 17:31:23] chris at chrisstreeter dot com So the RYCrossSiteJSONService has a member variables like the following: protected $m_text_return_data = false; protected $m_request; protected $m_version = ""; protected $mUseDirectJsonFormat = true; protected $mResult = null; (with a couple more like $m_request that aren't set to anything). Also, there are two lines that Dathan left out that could potentially have an impact (though I don't see how). The code inside run_service() is this: $this->m_request = RYRequest::get_request(); global $global_context; $global_context = $this->get_request(); // get_request just returns $this->m_request $container = $this->m_request->get_container(); // <-- This is the line that produces the fatal error. The RYRequest class has several class constants and a few protected members, most of which are unset, and one that is set to a constant in the class. ------------------------------------------------------------------------ [2010-05-28 09:03:15] gopalv82 at yahoo dot com I'm baffled, I cannot think of a good reason this would be a problem for APC. is there a var $m_request = NULL; in the class definition of the second class? ------------------------------------------------------------------------ [2010-05-17 20:08:17] chris at chrisstreeter dot com Er... I meant that they are large files, where each one is 400 MB+. ------------------------------------------------------------------------ [2010-05-12 19:44:57] chris at chrisstreeter dot com Here are the backtraces when I collected the coredumps. How should I get them to you? They're 400+M files... Breakpoint 1, zend_error (type=1, format=0x7fe1b9027730 "Call to a member function %s() on a non-object") at /usr/local/src/php532/Zend/zend.c:975 975 in /usr/local/src/php532/Zend/zend.c (gdb) bt #0 zend_error (type=1, format=0x7fe1b9027730 "Call to a member function %s() on a non-object") at /usr/local/src/php532/Zend/zend.c:975 #1 0x00007fe1b8b69b5d in ZEND_INIT_METHOD_CALL_SPEC_VAR_CONST_HANDLER (execute_data=0x7fe1bff2d1a8) at /usr/local/src/php532/Zend/zend_vm_execute.h:10368 #2 0x00007fe1b8b32b84 in execute (op_array=0x7fe1c0f262b8) at /usr/local/src/php532/Zend/zend_vm_execute.h:104 #3 0x00007fe1b8b004e4 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/src/php532/Zend/zend.c:1194 #4 0x00007fe1b8a80eea in php_execute_script (primary_file=0x7fff878f60d0) at /usr/local/src/php532/main/main.c:2260 #5 0x00007fe1b8bf1c02 in php_handler (r=0x7fe1c107b468) at /usr/local/src/php532/sapi/apache2handler/sapi_apache2.c:655 #6 0x00007fe1bf80d7c1 in ap_run_handler () from /usr/sbin/httpd #7 0x00007fe1bf80e084 in ap_invoke_handler () from /usr/sbin/httpd #8 0x00007fe1bf81fb7a in ap_process_request () from /usr/sbin/httpd #9 0x00007fe1bf81c431 in ap_process_http_connection () from /usr/sbin/httpd #10 0x00007fe1bf81722c in ap_run_process_connection () from /usr/sbin/httpd #11 0x00007fe1bf817679 in ap_process_connection () from /usr/sbin/httpd #12 0x00007fe1bf82697f in child_main () from /usr/sbin/httpd #13 0x00007fe1bf826a6b in make_child () from /usr/sbin/httpd #14 0x00007fe1bf827055 in ap_mpm_run () from /usr/sbin/httpd #15 0x00007fe1bf7f37ef in main () from /usr/sbin/httpd (gdb) gc Saved corefile core.1 Breakpoint 1, zend_error (type=1, format=0x7fe1b9027730 "Call to a member function %s() on a non-object") at /usr/local/src/php532/Zend/zend.c:975 975 in /usr/local/src/php532/Zend/zend.c (gdb) bt #0 zend_error (type=1, format=0x7fe1b9027730 "Call to a member function %s() on a non-object") at /usr/local/src/php532/Zend/zend.c:975 #1 0x00007fe1b8b69b5d in ZEND_INIT_METHOD_CALL_SPEC_VAR_CONST_HANDLER (execute_data=0x7fe1c1003ea8) at /usr/local/src/php532/Zend/zend_vm_execute.h:10368 #2 0x00007fe1b8b32b84 in execute (op_array=0x7fe1c0f262b8) at /usr/local/src/php532/Zend/zend_vm_execute.h:104 #3 0x00007fe1b8b004e4 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/src/php532/Zend/zend.c:1194 #4 0x00007fe1b8a80eea in php_execute_script (primary_file=0x7fff878f60d0) at /usr/local/src/php532/main/main.c:2260 #5 0x00007fe1b8bf1c02 in php_handler (r=0x7fe1bfd37d38) at /usr/local/src/php532/sapi/apache2handler/sapi_apache2.c:655 #6 0x00007fe1bf80d7c1 in ap_run_handler () from /usr/sbin/httpd #7 0x00007fe1bf80e084 in ap_invoke_handler () from /usr/sbin/httpd #8 0x00007fe1bf81fb7a in ap_process_request () from /usr/sbin/httpd #9 0x00007fe1bf81c431 in ap_process_http_connection () from /usr/sbin/httpd #10 0x00007fe1bf81722c in ap_run_process_connection () from /usr/sbin/httpd #11 0x00007fe1bf817679 in ap_process_connection () from /usr/sbin/httpd #12 0x00007fe1bf82697f in child_main () from /usr/sbin/httpd #13 0x00007fe1bf826a6b in make_child () from /usr/sbin/httpd #14 0x00007fe1bf827055 in ap_mpm_run () from /usr/sbin/httpd #15 0x00007fe1bf7f37ef in main () from /usr/sbin/httpd (gdb) gc core.2 Saved corefile core.2 Breakpoint 1, zend_error (type=1, format=0x7fe1b9027730 "Call to a member function %s() on a non-object") at /usr/local/src/php532/Zend/zend.c:975 975 in /usr/local/src/php532/Zend/zend.c (gdb) bt #0 zend_error (type=1, format=0x7fe1b9027730 "Call to a member function %s() on a non-object") at /usr/local/src/php532/Zend/zend.c:975 #1 0x00007fe1b8b69b5d in ZEND_INIT_METHOD_CALL_SPEC_VAR_CONST_HANDLER (execute_data=0x7fe1c1003ea8) at /usr/local/src/php532/Zend/zend_vm_execute.h:10368 #2 0x00007fe1b8b32b84 in execute (op_array=0x7fe1c0f262b8) at /usr/local/src/php532/Zend/zend_vm_execute.h:104 #3 0x00007fe1b8b004e4 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/src/php532/Zend/zend.c:1194 #4 0x00007fe1b8a80eea in php_execute_script (primary_file=0x7fff878f60d0) at /usr/local/src/php532/main/main.c:2260 #5 0x00007fe1b8bf1c02 in php_handler (r=0x7fe1c0338068) at /usr/local/src/php532/sapi/apache2handler/sapi_apache2.c:655 #6 0x00007fe1bf80d7c1 in ap_run_handler () from /usr/sbin/httpd #7 0x00007fe1bf80e084 in ap_invoke_handler () from /usr/sbin/httpd #8 0x00007fe1bf81fb7a in ap_process_request () from /usr/sbin/httpd #9 0x00007fe1bf81c431 in ap_process_http_connection () from /usr/sbin/httpd #10 0x00007fe1bf81722c in ap_run_process_connection () from /usr/sbin/httpd #11 0x00007fe1bf817679 in ap_process_connection () from /usr/sbin/httpd #12 0x00007fe1bf82697f in child_main () from /usr/sbin/httpd #13 0x00007fe1bf826a6b in make_child () from /usr/sbin/httpd #14 0x00007fe1bf827055 in ap_mpm_run () from /usr/sbin/httpd #15 0x00007fe1bf7f37ef in main () from /usr/sbin/httpd (gdb) gc core.3 Saved corefile core.3 ------------------------------------------------------------------------ [2010-05-11 09:49:44] gopalv82 at yahoo dot com I've been racking my head about how/why this would happen. I'd love you to do a "gc" in gdb, which dumps a core for the memory. Break on zend_error and dump a core, so that I can ask you to debug more things. I cannot think of anything off the top of my head. But once you have a core, I think we can really explore why this error happens. I suspect I'm missing some magic OOP setting I need to do with 5.3.x. I've been off apc for quite a while, doing other things ... so I might have missed a change that sneaked in while I was away. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=59197 -- Edit this bug report at https://bugs.php.net/bug.php?id=59197&edit=1