﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,appname,phpversion,exts,sapi,probability,blockedby,blocking,pending
243,XCache dosn't cache variables when xcache.var_size >= 2048M,mr_bond,moo,"
== Problem description ==

Hi,

I have a problem when I set xcache.var_size to 2048M or more. What happens is php loads fine, but xcache dosn't store keys in the cache. No error is thrown when trying to receive the key from cache either. When loading the xcache-admin page, the php-process dies (FCGI).

When setting xcache.var_size to 2047M or less, everything works as expected. I tried to explore various OS limitations, but I can't find any. A process is allowed to allocate a maximum of 32GB memory, cannot find any other related hard/soft-limits, or any mmap sysctls. I noticed xcache is not failing on mmap() with ENOMEM in backtrace, but backtrace is only generated when viewing admin page. Any help/advice is much appreciated.


== Environment ==
{{{
Xcache settings:
xcache.admin.user = ""admin""
xcache.admin.pass = ""ffffffffffffffffffffffffffffffff""
xcache.size = 256M
xcache.count = 4
;xcache.coredump_directory = ""/tmp/core""
;xcache.var_size = 2048M
xcache.var_size = 2047M
xcache.var_count = 4
xcache.mmap_path =    ""/dev/zero""
}}}


The system is running:
{{{
FreeBSD 7.0-RELEASE/amd64
PHP 5.2.12 with Suhosin-Patch 0.9.7
Xcache 1.3.0
Mem: 3051M Active, 20G Inact, 401M Wired, 446M Cache, 214M Buf, 5262M Free
}}}

== Backtrace ==

{{{
Backtrace from admin page (does not dump core when using var_size >= 2048M):
(gdb) bt
#0  0x00000008046b76e2 in xcache_admin_operate () from /usr/local/lib/php/20060613/xcache.so
#1  0x000000000052d8e7 in zend_do_fcall_common_helper_SPEC ()
#2  0x0000000000520463 in execute ()
#3  0x000000000052449a in ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER ()
#4  0x0000000000520463 in execute ()
#5  0x0000000000501a74 in zend_execute_scripts ()
#6  0x00000000004c02f1 in php_execute_script ()
#7  0x00000000005845a9 in main ()
(gdb) dump_bt
Missing argument 0 in user function.
(gdb) dump_bt $eg.current_execute_data
Attempt to extract a component of a value that is not a structure.
}}}",defect,closed,minor,1.3.1,cacher,1.3.0,invalid,var_size 2GB,moo daniel.bond@…,,5.2.12,,FastCGI,Always,,,0
