Skip to content

Conversation

769344359
Copy link
Contributor

@769344359 769344359 commented Mar 29, 2020

https://bugs.php.net/bug.php?id=78076

memory will not free when

opcache.file_cache_only=1

or other special case no satisfiy follow condition

!file_cache_only &&
	    !ZCSG(restart_in_progress) &&
		!ZSMMG(memory_exhausted) &&
	    accelerator_shm_read_lock() == SUCCESS

it may import from this commit

@769344359 769344359 changed the title fix bug 78076 fix bug 78076 Opcache greatly increases memory usage. Mar 29, 2020
@769344359
Copy link
Contributor Author

the CD/CI fail seems not my problem

@dstogov
Copy link
Member

dstogov commented Mar 31, 2020

Thanks for analysing the bug and attempt to fix.

Unfortunately, the patch is wrong.
It deallocates memory buffer that keeps different data structures that are going to be used after free.
For me, test1.php crashes on the second run (when test2 is already in file cache).

@769344359
Copy link
Contributor Author

i found i am wrong ,it can not free the op_array ,it should cached the filename to a global hashtable when the filecache load to memory

@ramsey
Copy link
Member

ramsey commented May 31, 2022

What is the status of this pull request?

If you're able to address @dstogov's concerns, please update this to use PHP-8.0 as the base branch.

@769344359 769344359 closed this Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants