You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When should_rerun_gc in zend_gc_collect_cycles is set to true and the rerun_gc block is run for a second time, the count variable is reset, causing the gc_adjust_threshold potentially increase the size of root buffer indefinitely.
This is particularly dangerous in combination with the fact that GC does not look at the memory usage, keeping very old objects in memory.
This behaviour is causing huge leaks that were fixable by calling gc_collect_cycles manually (see the stable line after calling gc_collect_cycles)
Description
When
should_rerun_gc
inzend_gc_collect_cycles
is set to true and thererun_gc
block is run for a second time, thecount
variable is reset, causing thegc_adjust_threshold
potentially increase the size of root buffer indefinitely.This is particularly dangerous in combination with the fact that GC does not look at the memory usage, keeping very old objects in memory.
This behaviour is causing huge leaks that were fixable by calling gc_collect_cycles manually (see the stable line after calling gc_collect_cycles)
Related to #9239
See the linked MR, I'll try to provide test case asap.
PHP Version
PHP 8.1.9
Operating System
Debian 10
The text was updated successfully, but these errors were encountered: