Bug 911542 - OpenShift Online PHP-5.3 APC extension bug
Summary: OpenShift Online PHP-5.3 APC extension bug
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Vojtech Vitek
QA Contact: libra bugs
URL:
Whiteboard:
: 916713 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-15 09:59 UTC by Bram
Modified: 2015-05-14 23:05 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-20 20:32:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
example of empty widgets page because of PHP apc bug (224.74 KB, image/jpeg)
2013-02-15 09:59 UTC, Bram
no flags Details

Description Bram 2013-02-15 09:59:26 UTC
Created attachment 697655 [details]
example of empty widgets page because of PHP apc bug

Description of problem:

OpenShift Online PHP-5.3 APC extension bug


Version-Release number of selected component (if applicable):

Last version of online


How reproducible:

It looks like the installation is spitting out errors due to APC being broken. These are probably interfering with the AJAX calls by adding non-JSON error messages in a JSON-format response. Fix the "Unable to allocate memory for pool" errors and things should work. It's (arguably) a bug in the PHP APC extension.


Steps to Reproduce:
1. follow this steps: https://github.com/bramws/collectiveaccess
2. Add widget on dashboard page from CollectiveAccess. Widgetlist is empty because of bug. Check php error log (you see a lot of errors in the log).
3. Do the samen with Zend Server: there is no problem.

Comment 1 Vojtech Vitek 2013-02-20 19:17:14 UTC
Confirmed the bug.

Ajax POST https://apc-devfest.rhcloud.com/index.php/Dashboard/getAvailableWidgetList
Response: 502 Proxy Error

Response data:
<html><head>
<title>502 Proxy Error</title>
</head><body>
<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
The proxy server could not handle the request <em><a href="/index.php/Dashboard/getAvailableWidgetList">POST&nbsp;/index.php/Dashboard/getAvailableWidgetList</a></em>.<p>
Reason: <strong>Error reading from remote server</strong></p></p>
<hr>
<address>Apache/2.2.15 (Red Hat) Server at <app>.rhcloud.com Port 443</address>
</body></html>

OpenShift server log:
$ rhc <app> tail
[Wed Feb 20 13:54:15 2013] [notice] child pid 24039 exit signal Segmentation fault (11)

Comment 2 Vojtech Vitek 2013-02-20 20:00:56 UTC
Program received signal SIGSEGV, Segmentation fault.
0x00007f5d3271c720 in zend_hash_find () from /var/lib/openshift/512504e75004466b5a000112/php-5.3/modules/libphp5.so
(gdb) backtrace
#0  0x00007f5d3271c720 in zend_hash_find () from /var/lib/openshift/512504e75004466b5a000112/php-5.3/modules/libphp5.so
#1  0x00007f5d2a2e081a in xdebug_execute () from /usr/lib64/php/modules/xdebug.so
#2  0x00007f5d32705285 in zend_call_function () from /var/lib/openshift/512504e75004466b5a000112/php-5.3/modules/libphp5.so
#3  0x00007f5d327253f7 in zend_call_method () from /var/lib/openshift/512504e75004466b5a000112/php-5.3/modules/libphp5.so
#4  0x00007f5d3272dd66 in zend_objects_destroy_object () from /var/lib/openshift/512504e75004466b5a000112/php-5.3/modules/libphp5.so
#5  0x00007f5d32731853 in zend_objects_store_del_ref_by_handle_ex () from /var/lib/openshift/512504e75004466b5a000112/php-5.3/modules/libphp5.so
#6  0x00007f5d32731893 in zend_objects_store_del_ref () from /var/lib/openshift/512504e75004466b5a000112/php-5.3/modules/libphp5.so
#7  0x00007f5d32702e9a in _zval_ptr_dtor () from /var/lib/openshift/512504e75004466b5a000112/php-5.3/modules/libphp5.so
#8  0x00007f5d3271b165 in ?? () from /var/lib/openshift/512504e75004466b5a000112/php-5.3/modules/libphp5.so
#9  0x00007f5d3271b3e8 in zend_hash_graceful_reverse_destroy () from /var/lib/openshift/512504e75004466b5a000112/php-5.3/modules/libphp5.so
#10 0x00007f5d3270345e in ?? () from /var/lib/openshift/512504e75004466b5a000112/php-5.3/modules/libphp5.so
#11 0x00007f5d3270f552 in ?? () from /var/lib/openshift/512504e75004466b5a000112/php-5.3/modules/libphp5.so
#12 0x00007f5d326bd835 in php_request_shutdown () from /var/lib/openshift/512504e75004466b5a000112/php-5.3/modules/libphp5.so
#13 0x00007f5d32797997 in ?? () from /var/lib/openshift/512504e75004466b5a000112/php-5.3/modules/libphp5.so
#14 0x00007f5d38e9ab00 in ap_run_handler ()
#15 0x00007f5d38e9e3be in ap_invoke_handler ()
#16 0x00007f5d38ea9a30 in ap_process_request ()
#17 0x00007f5d38ea68f8 in ?? ()
#18 0x00007f5d38ea2608 in ap_run_process_connection ()
#19 0x00007f5d38eae807 in ?? ()
#20 0x00007f5d38eaeb1a in ?? ()
#21 0x00007f5d38eaf79c in ap_mpm_run ()
#22 0x00007f5d38e86900 in main ()

Comment 3 Vojtech Vitek 2013-02-20 20:28:36 UTC
Seems like you've hit a PHP bug - SIGSEGV in zend_hash_find() function.
This bug is not related to the OpenShift or the APC extension but to the PHP-5.3 core itself.

An ugly workaround in the source codes of the https://github.com/bramws/collectiveaccess would be omitting the request destructor:

diff --git a/php/index.php b/php/index.php
index 5cb7e18..198ff8d 100755
--- a/php/index.php
+++ b/php/index.php
@@ -109,6 +109,6 @@
        // Send output to client
        //
        $resp->sendResponse();
-       $req->close();
+       // $req->close();

Comment 4 Vojtech Vitek 2013-02-20 20:32:46 UTC
Closing as NOTABUG.

Please, feel free to enter a new bug against PHP component in RHEL-6 product with a full backtrace including the symbol information of the object files.

Comment 5 Vojtech Vitek 2013-03-12 17:42:12 UTC
*** Bug 916713 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.