php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75092 Values for interned_strings_buffer and memory_consumption can lead to crash
Submitted: 2017-08-18 10:28 UTC Modified: 2017-12-17 21:49 UTC
From: j3mata at gmail dot com Assigned: nikic (profile)
Status: Closed Package: opcache
PHP Version: 7.0.22 OS: CentOS 6
Private report: No CVE-ID: None
 [2017-08-18 10:28 UTC] j3mata at gmail dot com
Description:
------------
Hello,

I have came accross this issue after we have recieved random complains for 500ISE errors, which are solved after increasing  opcache.interned_strings_buffer value.

Through series of tests, it seems that for certain combination of values for opcache.interned_strings_buffer and opcache.memory_consumption can lead to error:
Fatal Error Zend OPcache cannot allocate buffer for interned strings.

I am reproducing it by this formul ( X is 8, 16, 32 etc. ):
 opcache.memory_consumption = X
 opcache.interned_strings_buffer = (X*7/8)/2

For every value for opcache.interned_strings_buffer >= (X*7/8)/2 the above error is produced.

Tested on PHP versions 7.0.22 and 7.1.8, Apache/2.4.27

Regards,
Ilian. 



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-12-17 21:49 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2017-12-17 21:49 UTC] nikic@php.net
It's a bit of a mess ... in 7.0-7.2 interned_strings_buffer allocates approximately 2x the specified memory -- the value is interpreted as the total amount of memory for the interned strings, *not* counting additional management structures. In 7.3 this setting will go back to specifying the full memory requirement including management structures.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC