Custom Query (301 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (1 - 3 of 301)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#333 fixed Memory usage keeps growing while repeatedly require() the same empty file moo xubin04
Description

Hi, mOo, thanks for your great work and insistency during the past several years on Xcache, We've been using Xcache since its early versions, after upgrading Xcache from 1.3.2 to 3.0.4 recently, we met with a possible memory management issue in Xcache.

Code:

a.php

<?php
      for ($i=0; $i<10000; $i++) {
            require('b.php');
            printf('%d\n",  memory_get_usage());
      }

b.php

<?php
// this could be an empty file

Then, we run a.php with the following command:

php -d xcache.test=on a.test

(I set xcache.test=on since Xcache doesn't enable cache under CLI mode by default)

and then the memory usage keeps growing:

224184
224512
224808
225104
225400
225696
225992
226288
226584
226880
227176
227472
227768
228064
...............

I agree it's far from PHP's best practices to include a file repeatedly, however, can we avoid extra memory allocation in such circumstances? The allocation seems to be reside in xc_cacher.c:

2147     /* found entry */
2148     if (stored_entry && stored_php) {
2149         zend_llist_add_element(&CG(open_files), h);
2150         return xc_compile_restore(stored_entry, stored_php TSRMLS_CC);
2151     }

Is this a bug or something 'have to be so' ? Is there an approaches we can bypass this issue if the application code is beyond our control?

Regards!

This is my PHP version info:

PHP 5.4.21 (cli) (built: Dec  6 2013 19:30:14)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with XCache v3.0.4, Copyright (c) 2005-2013, by mOo
    with XCache Cacher v3.0.4, Copyright (c) 2005-2013, by mOo
#178 fixed mmap crashing php moo xsawyerx@…
Description

When using xcache, if the kernel does not support enough size for xcache to use (mmap) and php defines it should indeed use that certain amount of size which is insufficient, it will cause a segmentation fault when PHP binary starts.

Also, there's a spelling error on mmap.c (line 209) in which it says "mappping" instead of "mapping" :)

#271 fixed Support for PHP 5.4 moo xenji
Description

on fedora core 16 with php 5.4.0

cc -I. -I/home/mmueller/Downloads/xcache-trunk -DPHP_ATOM_INC -I/home/mmueller/Downloads/xcache-trunk/include -I/home/mmueller/Downloads/xcache-trunk/main -I/home/mmueller/Downloads/xcache-trunk -I/opt/local/php/versions/5.4.0/include/php -I/opt/local/php/versions/5.4.0/include/php/main -I/opt/local/php/versions/5.4.0/include/php/TSRM -I/opt/local/php/versions/5.4.0/include/php/Zend -I/opt/local/php/versions/5.4.0/include/php/ext -I/opt/local/php/versions/5.4.0/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2  -E /home/mmueller/Downloads/xcache-trunk/includes.c -o ./includes.i
./structinfo.m4 is optional if XCache test is not enabled, feel free if it awk failed to produce it
LANG=C /bin/gawk -f /home/mmueller/Downloads/xcache-trunk/mkstructinfo.awk < ./includes.i > ./structinfo.m4.tmp && mv ./structinfo.m4.tmp ./structinfo.m4
/usr/bin/m4 -B 102400 -D srcdir='`'"/home/mmueller/Downloads/xcache-trunk'" -D builddir='`'".'"  /home/mmueller/Downloads/xcache-trunk/processor/main.m4 > ./processor.out.tmp
/usr/bin/m4: warning: `m4 -B' may be removed in a future release
AUTOCHECK INFO: runtime autocheck Disabled (optimized build)
AUTOCHECK INFO: zend_compiled_variable: processor looks good
AUTOCHECK INFO: zend_try_catch_element: processor looks good
AUTOCHECK INFO: zend_brk_cont_element: processor looks good
AUTOCHECK INFO: HashTable: processor looks good
AUTOCHECK INFO: zval: processor looks good
AUTOCHECK INFO: zend_arg_info: processor looks good
AUTOCHECK INFO: zend_constant: processor looks good
AUTOCHECK INFO: zend_property_info: processor looks good
AUTOCHECK INFO: zend_class_entry: processor looks good
AUTOCHECK INFO: znode: processor looks good
AUTOCHECK INFO: zend_op: processor looks good
AUTOCHECK INFO: zend_literal: processor looks good
AUTOCHECK INFO: zend_op_array: processor looks good
AUTOCHECK INFO: xc_constinfo_t: processor looks good
AUTOCHECK INFO: xc_op_array_info_t: processor looks good
AUTOCHECK INFO: xc_funcinfo_t: processor looks good
AUTOCHECK INFO: xc_classinfo_t: processor looks good
AUTOCHECK WARN: xc_autoglobal_t: missing structinfo, dont panic
AUTOCHECK INFO: xc_compilererror_t: processor looks good
AUTOCHECK INFO: xc_entry_data_php_t: processor looks good
AUTOCHECK INFO: xc_entry_data_var_t: processor looks good
AUTOCHECK INFO: xc_entry_t: processor looks good
mv ./processor.out.tmp ./processor.out
/bin/grep "export: " ./processor.out | /bin/sed "s/.*export:\(.*\):export.*/\1/g" > ./processor.h
cat < ./processor.h > ./processor.h.tmp && mv ./processor.h.tmp ./processor.h
cp ./processor.out ./processor_real.c
cat < ./processor.out > ./processor_real.c.tmp && mv ./processor_real.c.tmp ./processor_real.c
/bin/sh /home/mmueller/Downloads/xcache-trunk/libtool --mode=compile cc  -I. -I/home/mmueller/Downloads/xcache-trunk -DPHP_ATOM_INC -I/home/mmueller/Downloads/xcache-trunk/include -I/home/mmueller/Downloads/xcache-trunk/main -I/home/mmueller/Downloads/xcache-trunk -I/opt/local/php/versions/5.4.0/include/php -I/opt/local/php/versions/5.4.0/include/php/main -I/opt/local/php/versions/5.4.0/include/php/TSRM -I/opt/local/php/versions/5.4.0/include/php/Zend -I/opt/local/php/versions/5.4.0/include/php/ext -I/opt/local/php/versions/5.4.0/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /home/mmueller/Downloads/xcache-trunk/processor.c -o processor.lo 
mkdir .libs
 cc -I. -I/home/mmueller/Downloads/xcache-trunk -DPHP_ATOM_INC -I/home/mmueller/Downloads/xcache-trunk/include -I/home/mmueller/Downloads/xcache-trunk/main -I/home/mmueller/Downloads/xcache-trunk -I/opt/local/php/versions/5.4.0/include/php -I/opt/local/php/versions/5.4.0/include/php/main -I/opt/local/php/versions/5.4.0/include/php/TSRM -I/opt/local/php/versions/5.4.0/include/php/Zend -I/opt/local/php/versions/5.4.0/include/php/ext -I/opt/local/php/versions/5.4.0/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/mmueller/Downloads/xcache-trunk/processor.c  -fPIC -DPIC -o .libs/processor.o
In file included from /home/mmueller/Downloads/xcache-trunk/processor_real.c:11:0,
                 from /home/mmueller/Downloads/xcache-trunk/processor.c:1:
/home/mmueller/Downloads/xcache-trunk/xcache.h:113:15: error: conflicting types for ‘znode_op’
/opt/local/php/versions/5.4.0/include/php/Zend/zend_compile.h:84:3: note: previous declaration of ‘znode_op’ was here
In file included from /home/mmueller/Downloads/xcache-trunk/processor.c:1:0:
/home/mmueller/Downloads/xcache-trunk/processor_real.c: In function ‘xc_calc_zend_class_entry’:
/home/mmueller/Downloads/xcache-trunk/processor_real.c:4816:19: error: ‘zend_class_entry’ has no member named ‘default_properties’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:4875:9: error: ‘zend_class_entry’ has no member named ‘static_members’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:4902:18: error: ‘zend_class_entry’ has no member named ‘static_members’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:5218:9: error: ‘zend_class_entry’ has no member named ‘filename’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:5224:42: error: ‘zend_class_entry’ has no member named ‘filename’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:5224:73: error: ‘zend_class_entry’ has no member named ‘filename’
/home/mmueller/Downloads/xcache-trunk/processor_real.c: In function ‘xc_calc_zend_op’:
/home/mmueller/Downloads/xcache-trunk/processor_real.c:6043:2: warning: passing argument 2 of ‘xc_calc_znode’ from incompatible pointer type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:5593:28: note: expected ‘const struct znode * const’ but argument is of type ‘const union znode_op *’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:6075:2: warning: passing argument 2 of ‘xc_calc_znode’ from incompatible pointer type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:5593:28: note: expected ‘const struct znode * const’ but argument is of type ‘const union znode_op *’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:6107:2: warning: passing argument 2 of ‘xc_calc_znode’ from incompatible pointer type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:5593:28: note: expected ‘const struct znode * const’ but argument is of type ‘const union znode_op *’
/home/mmueller/Downloads/xcache-trunk/processor_real.c: In function ‘xc_calc_zend_op_array’:
/home/mmueller/Downloads/xcache-trunk/processor_real.c:6452:3: warning: passing argument 1 of ‘xc_zstrlen_char’ discards ‘const’ qualifier from pointer target type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:690:19: note: expected ‘zstr’ but argument is of type ‘const char * const’
/home/mmueller/Downloads/xcache-trunk/processor_real.c: In function ‘xc_store_zend_class_entry’:
/home/mmueller/Downloads/xcache-trunk/processor_real.c:14697:5: error: ‘zend_class_entry’ has no member named ‘builtin_functions’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:14697:30: error: ‘zend_class_entry’ has no member named ‘builtin_functions’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:14719:19: error: ‘zend_class_entry’ has no member named ‘default_properties’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:14719:46: error: ‘zend_class_entry’ has no member named ‘default_properties’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:14777:9: error: ‘zend_class_entry’ has no member named ‘static_members’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:14795:6: error: ‘zend_class_entry’ has no member named ‘static_members’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:14811:18: error: ‘zend_class_entry’ has no member named ‘static_members’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:14811:40: error: ‘zend_class_entry’ has no member named ‘static_members’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:14820:5: error: ‘zend_class_entry’ has no member named ‘static_members’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:14820:117: error: ‘zend_class_entry’ has no member named ‘static_members’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15136:9: error: ‘zend_class_entry’ has no member named ‘filename’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15143:6: error: ‘zend_class_entry’ has no member named ‘filename’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15143:19: error: ‘zend_class_entry’ has no member named ‘filename’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15143:19: error: ‘zend_class_entry’ has no member named ‘filename’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15146:5: error: ‘zend_class_entry’ has no member named ‘filename’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15146:106: error: ‘zend_class_entry’ has no member named ‘filename’
/home/mmueller/Downloads/xcache-trunk/processor_real.c: In function ‘xc_store_zend_op’:
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15832:2: warning: passing argument 2 of ‘xc_store_znode’ from incompatible pointer type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15521:28: note: expected ‘struct znode *’ but argument is of type ‘union znode_op *’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15832:2: warning: passing argument 3 of ‘xc_store_znode’ from incompatible pointer type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15521:28: note: expected ‘const struct znode * const’ but argument is of type ‘const union znode_op *’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15864:2: warning: passing argument 2 of ‘xc_store_znode’ from incompatible pointer type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15521:28: note: expected ‘struct znode *’ but argument is of type ‘union znode_op *’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15864:2: warning: passing argument 3 of ‘xc_store_znode’ from incompatible pointer type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15521:28: note: expected ‘const struct znode * const’ but argument is of type ‘const union znode_op *’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15896:2: warning: passing argument 2 of ‘xc_store_znode’ from incompatible pointer type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15521:28: note: expected ‘struct znode *’ but argument is of type ‘union znode_op *’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15896:2: warning: passing argument 3 of ‘xc_store_znode’ from incompatible pointer type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:15521:28: note: expected ‘const struct znode * const’ but argument is of type ‘const union znode_op *’
/home/mmueller/Downloads/xcache-trunk/processor_real.c: In function ‘xc_store_zend_op_array’:
/home/mmueller/Downloads/xcache-trunk/processor_real.c:16282:3: warning: passing argument 1 of ‘xc_zstrlen_char’ discards ‘const’ qualifier from pointer target type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:690:19: note: expected ‘zstr’ but argument is of type ‘const char * const’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:16707:5: error: ‘zend_op_array’ has no member named ‘size’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:16820:5: error: ‘zend_op_array’ has no member named ‘size_var’
/home/mmueller/Downloads/xcache-trunk/processor_real.c: In function ‘xc_restore_zend_class_entry’:
/home/mmueller/Downloads/xcache-trunk/processor_real.c:24602:5: error: ‘zend_class_entry’ has no member named ‘builtin_functions’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:24602:30: error: ‘zend_class_entry’ has no member named ‘builtin_functions’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:24625:19: error: ‘zend_class_entry’ has no member named ‘default_properties’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:24625:46: error: ‘zend_class_entry’ has no member named ‘default_properties’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:24682:9: error: ‘zend_class_entry’ has no member named ‘static_members’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:24699:4: error: ‘zend_class_entry’ has no member named ‘static_members’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:24711:18: error: ‘zend_class_entry’ has no member named ‘static_members’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:24711:40: error: ‘zend_class_entry’ has no member named ‘static_members’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:25062:5: error: ‘zend_class_entry’ has no member named ‘filename’
/home/mmueller/Downloads/xcache-trunk/processor_real.c: In function ‘xc_restore_zend_op’:
/home/mmueller/Downloads/xcache-trunk/processor_real.c:25741:2: warning: passing argument 2 of ‘xc_restore_znode’ from incompatible pointer type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:25430:28: note: expected ‘struct znode *’ but argument is of type ‘union znode_op *’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:25741:2: warning: passing argument 3 of ‘xc_restore_znode’ from incompatible pointer type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:25430:28: note: expected ‘const struct znode * const’ but argument is of type ‘const union znode_op *’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:25773:2: warning: passing argument 2 of ‘xc_restore_znode’ from incompatible pointer type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:25430:28: note: expected ‘struct znode *’ but argument is of type ‘union znode_op *’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:25773:2: warning: passing argument 3 of ‘xc_restore_znode’ from incompatible pointer type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:25430:28: note: expected ‘const struct znode * const’ but argument is of type ‘const union znode_op *’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:25805:2: warning: passing argument 2 of ‘xc_restore_znode’ from incompatible pointer type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:25430:28: note: expected ‘struct znode *’ but argument is of type ‘union znode_op *’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:25805:2: warning: passing argument 3 of ‘xc_restore_znode’ from incompatible pointer type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:25430:28: note: expected ‘const struct znode * const’ but argument is of type ‘const union znode_op *’
/home/mmueller/Downloads/xcache-trunk/processor_real.c: In function ‘xc_restore_zend_op_array’:
/home/mmueller/Downloads/xcache-trunk/processor_real.c:26260:7: error: ‘znode_op’ has no member named ‘u’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:26260:52: error: ‘znode_op’ has no member named ‘u’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:26270:7: error: ‘znode_op’ has no member named ‘u’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:26270:52: error: ‘znode_op’ has no member named ‘u’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:26412:4: warning: passing argument 1 of ‘xc_zstrlen_char’ discards ‘const’ qualifier from pointer target type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:690:19: note: expected ‘zstr’ but argument is of type ‘const char * const’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:26807:5: error: ‘zend_op_array’ has no member named ‘size’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:26914:5: error: ‘zend_op_array’ has no member named ‘size_var’
/home/mmueller/Downloads/xcache-trunk/processor_real.c:27575:6: warning: passing argument 1 of ‘xc_zstrlen_char’ discards ‘const’ qualifier from pointer target type [enabled by default]
/home/mmueller/Downloads/xcache-trunk/processor_real.c:690:19: note: expected ‘zstr’ but argument is of type ‘const char * const’
1 2 3 4 5 6 7 8 9 10 11
Note: See TracQuery for help on using queries.