[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GC root buffer keeps growing when destructors are present #9266

Closed
olsavmic opened this issue Aug 7, 2022 · 0 comments
Closed

GC root buffer keeps growing when destructors are present #9266

olsavmic opened this issue Aug 7, 2022 · 0 comments

Comments

@olsavmic
Copy link
Contributor
olsavmic commented Aug 7, 2022

Description

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)

Screenshot 2022-08-03 at 09 04 41

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants