php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59609 "Memory exhausted" error on 64-bit CentOS
Submitted: 2011-02-07 05:01 UTC Modified: 2011-02-07 05:14 UTC
From: alberto at grazz dot info Assigned:
Status: Not a bug Package: APC (PECL)
PHP Version: 5.1.6 OS: CentOS 5 64-bit
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alberto at grazz dot info
New email:
PHP Version: OS:

 

 [2011-02-07 05:01 UTC] alberto at grazz dot info
Description:
------------
Apache is crashing after installing APC with 'memory 
exhausted' errors.

Allowed memory size of 268435456 bytes exhausted (tried to 
allocate 1687110249 bytes)
Allowed memory size of 268435456 bytes exhausted (tried to 
allocate 1687110249 bytes)
[Mon Feb 07 09:54:29 2011] [notice] child pid 1265 exit 
signal Segmentation fault (11)
[Mon Feb 07 09:54:59 2011] [notice] child pid 1240 exit 
signal Segmentation fault (11)

It looks like it's trying to allocate nearly 2Gb of memory, 
which seems way too much.

I've got the same error both with 3.1.6 and 3.1.7, as well 
as with some earlier versions. However, the same setup in a 
CentOS 4 32-bit (also with PHP 5.1.6) gives no problems at 
all, so it must be a 64-bit specific bug.

I've compiled APC with APC_SMA_DEBUG (BTW, there is a small 
bug at line 398 of apc_sma.c - it should be first->id = -1) 
, and I get a long series of allocate() calls, after which I 
get 'Allowed memory size of 268435456 bytes exhausted (tried 
to allocate 1951836633 bytes)
'. Anyway, the sum of all allocate calls doesn't get 
anywhere near of 2Gb.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-07 05:14 UTC] alberto at grazz dot info
After getting a core dump, it looks like the problem was 
just that Zend Optimizer was enabled, and I guess it's not 
compatible with APC... Closing this as 'bogus'.


Program terminated with signal 11, Segmentation fault.
#0  0x00002aaabc6f7181 in _object_init_ex@plt () from 
/usr/local/Zend/lib/Optimizer-3.3.3/php-
5.1.x/ZendOptimizer.so
(gdb) where
#0  0x00002aaabc6f7181 in _object_init_ex@plt () from 
/usr/local/Zend/lib/Optimizer-3.3.3/php-
5.1.x/ZendOptimizer.so
#1  0x00002aaab428ac05 in zend_init_opcodes_handlers () from 
/etc/httpd/modules/libphp5.so
#2  0x00002aaabc69d119 in _object_init_ex@plt () from 
/usr/local/Zend/lib/Optimizer-3.3.3/php-
5.1.x/ZendOptimizer.so
#3  0x00002aaabc6f785a in zend_oe () from 
/usr/local/Zend/lib/Optimizer-3.3.3/php-
5.1.x/ZendOptimizer.so
#4  0x00002aaab426ecbe in zend_execute_scripts () from 
/etc/httpd/modules/libphp5.so
#5  0x00002aaab4233d77 in php_execute_script () from 
/etc/httpd/modules/libphp5.so
#6  0x00002aaab42ec1b6 in php_ap2_register_hook () from 
/etc/httpd/modules/libphp5.so
#7  0x000055555557d7ea in ap_run_handler () from 
/usr/sbin/httpd
#8  0x0000555555580c72 in ap_invoke_handler () from 
/usr/sbin/httpd
#9  0x000055555558b5e8 in ap_process_request () from 
/usr/sbin/httpd
#10 0x0000555555588870 in ap_register_input_filter () from 
/usr/sbin/httpd
#11 0x0000555555584a52 in ap_run_process_connection () from 
/usr/sbin/httpd
#12 0x000055555558f20b in ap_graceful_stop_signalled () from 
/usr/sbin/httpd
#13 0x000055555558f49a in ap_graceful_stop_signalled () from 
/usr/sbin/httpd
#14 0x000055555558fd0d in ap_mpm_run () from /usr/sbin/httpd
#15 0x000055555556ae04 in main () from /usr/sbin/httpd
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC