|  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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
19 - 9 = ?
Subscribe to this entry?

 [2011-02-07 05:01 UTC] alberto at grazz dot info
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.


Add a Patch

Pull Requests

Add a Pull Request


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 
(gdb) where
#0  0x00002aaabc6f7181 in _object_init_ex@plt () from 
#1  0x00002aaab428ac05 in zend_init_opcodes_handlers () from 
#2  0x00002aaabc69d119 in _object_init_ex@plt () from 
#3  0x00002aaabc6f785a in zend_oe () from 
#4  0x00002aaab426ecbe in zend_execute_scripts () from 
#5  0x00002aaab4233d77 in php_execute_script () from 
#6  0x00002aaab42ec1b6 in php_ap2_register_hook () from 
#7  0x000055555557d7ea in ap_run_handler () from 
#8  0x0000555555580c72 in ap_invoke_handler () from 
#9  0x000055555558b5e8 in ap_process_request () from 
#10 0x0000555555588870 in ap_register_input_filter () from 
#11 0x0000555555584a52 in ap_run_process_connection () from 
#12 0x000055555558f20b in ap_graceful_stop_signalled () from 
#13 0x000055555558f49a in ap_graceful_stop_signalled () from 
#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: Tue Feb 27 00:01:26 2024 UTC