|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-05-08 09:50 UTC] laruence@php.net
-Status: Open
+Status: Feedback
[2017-05-08 09:50 UTC] laruence@php.net
[2017-05-21 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 19:00:02 2025 UTC |
Description: ------------ Hello, I have a problem with the garbage collector which I cannot reproduce with a simple code. In brief, my script creates multiple objects (for 256M it is ~10k) based on a piece of data, binds them together and removes them (unset & null) if there is not enough memory available. Once the memory is cleaned up, it takes another portion of the data and does so until it reaches the data limit. The following stack trace is from the old version (7.0.11) but the problem also appears on the current version: #0 0x0000555555cb1795 in zend_gc_collect_cycles () at /var/tmp/portage/dev-lang/php-7.0.11-r2/work/sapis-build/cli/Zend/zend_gc.c:1078 #1 0x0000555555caf799 in gc_possible_root (ref=0x7fffe2c54180) at /var/tmp/portage/dev-lang/php-7.0.11-r2/work/sapis-build/cli/Zend/zend_gc.c:243 #2 0x0000555555c54b63 in gc_check_possible_root (z=0x7fffeb306430) at /var/tmp/portage/dev-lang/php-7.0.11-r2/work/sapis-build/cli/Zend/zend_gc.h:136 #3 0x0000555555c54c6b in i_zval_ptr_dtor (zval_ptr=0x7fffeb306430, __zend_filename=0x555556279000 "/var/tmp/portage/dev-lang/php-7.0.11-r2/work/sapis-build/cli/ext/standard/var_unserializer.c", __zend_lineno=160) at /var/tmp/portage/dev-lang/php-7.0.11-r2/work/sapis-build/cli/Zend/zend_variables.h:60 #4 0x0000555555c56c5b in _zval_ptr_dtor (zval_ptr=0x7fffeb306430, __zend_filename=0x555556279000 "/var/tmp/portage/dev-lang/php-7.0.11-r2/work/sapis-build/cli/ext/standard/var_unserializer.c", __zend_lineno=160) at /var/tmp/portage/dev-lang/php-7.0.11-r2/work/sapis-build/cli/Zend/zend_execute_API.c:533 #5 0x0000555555af47f9 in var_destroy (var_hashx=0x7fffffffa700) at /var/tmp/portage/dev-lang/php-7.0.11-r2/work/sapis-build/cli/ext/standard/var_unserializer.c:160 #6 0x0000555555ae2d5c in zif_unserialize (execute_data=0x7fffef817f00, return_value=0x7fffef817ef0) at /var/tmp/portage/dev-lang/php-7.0.11-r2/work/sapis-build/cli/ext/standard/var.c:1087 #7 0x0000555555ce083a in ZEND_DO_ICALL_SPEC_HANDLER () at /var/tmp/portage/dev-lang/php-7.0.11-r2/work/sapis-build/cli/Zend/zend_vm_execute.h:586 #8 0x0000555555ce0191 in execute_ex (ex=0x7fffef814030) at /var/tmp/portage/dev-lang/php-7.0.11-r2/work/sapis-build/cli/Zend/zend_vm_execute.h:414 #9 0x0000555555ce02db in zend_execute (op_array=0x7fffef864100, return_value=0x0) at /var/tmp/portage/dev-lang/php-7.0.11-r2/work/sapis-build/cli/Zend/zend_vm_execute.h:458 #10 0x0000555555c73a2e in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /var/tmp/portage/dev-lang/php-7.0.11-r2/work/sapis-build/cli/Zend/zend.c:1427 #11 0x0000555555bcce1d in php_execute_script (primary_file=0x7fffffffce60) at /var/tmp/portage/dev-lang/php-7.0.11-r2/work/sapis-build/cli/main/main.c:2494 #12 0x0000555555d5472d in do_cli (argc=3, argv=0x555556664fd0) at /var/tmp/portage/dev-lang/php-7.0.11-r2/work/sapis-build/cli/sapi/cli/php_cli.c:974 #13 0x0000555555d558fb in main (argc=3, argv=0x555556664fd0) at /var/tmp/portage/dev-lang/php-7.0.11-r2/work/sapis-build/cli/sapi/cli/php_cli.c:1344 And gdc output: [0x7fffe947de00] rc=1 addr=6643 grey object(AAA)#13571 ->black [0x7fffe947c0c0] rc=1 addr=6802 grey array(0) ->black [0x7fffe947ac00] rc=2 addr=6845 grey object(BBB)#13572 ->black [0x7fffe8e54200] rc=1 addr=9854 white object(AAA)#15515 ->black [0x7fffe8e38ea0] rc=1 addr=9839 white array(32) ->black [0x7fffe8e56400] rc=1 addr=0 white string ->black