-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
opcache.interned_strings_buffer = 4096 is ignored and using default (PHP8) + segfault (PHP7+PHP5) #13598
Comments
Juste a note here about actively supported PHP versions. |
Are you sure there's no messages in the FPM logs? And that you have those logs set up properly, of course? If php-fpm is disregarding your request for 4 GB (the setting is measured in MBs) of interned_strings_buffer then it should write a warning to the FPM log saying
where the first number is the maximum value permitted - which is almost certainly going to be less than 4096. @devnexen: You removed Needs Triage but didn't substitute another Status label. Was that intentional? There should probably always be a Status assigned, be that Needs Triage or Verified or whatever. |
I admit I did, I thought assigning PHP component label was sufficient, will remember for next time, cheers. |
Opcache has its own logging system controlled by
This warning was added in 8.2: #9260. In hindsight, this should probably be an error. |
@arnaud-lb Yea, it is good catch, totally coresponding our situation (#9260). DETAILED TEST RESULTS:
We have very busy servers, with 2TB+ memory each and we "need" this value higher, for example 10GB in reality. So, what are options, how to solve this problem? I think, 4095 "hardcoded" is max value if I understand this well? Or we miss something? |
@devnexen I know, 5.6 is obsolete - I use it only for compare, we care about actual versions (PHP 8.1+) of course :) |
The limitation comes from the fact we use 32bit offsets to the interned strings buffer. It should be possible to remove this limitation by switching to 64bit offsets (which would increase the memory usage), or by partitioning the buffer internally. |
OK, understand. So this isn't bug, but "feature", yea? Btw, do you know why we have segfault for this settings? Thank you. |
Yes I consider this a feature request because it works as indented. 7.4 fails earlier because it uses different types internally. After looking at it, it appears that we could increase the limit to 32GB in 8.4 without adding memory overhead or increasing complexity, by taking profit of the fact that offsets are 8-bytes aligned. BTW, could you describe your use-case? Do you know how many interned strings you have in 4GB? Are you running a shared hosting? |
@ShaiMagal could you check if #13676 helps? |
@arnaud-lb We have hundreds customers on every server. Yes, we are webhosting company. If you know how we can gather more info, let me know and I can ask administrators to do this.
Unfortunatelly, we can't test #13676 , because we don't compile, we are using PPA from Ondrej Sury (packages). |
Closing as implemented by #13676 |
@arnaud-lb thank you! What version of PHP will get this patch? |
This will be in 8.4 |
@arnaud-lb ah, so bad, i hope we can give it to all 8.x to benefit from this feature soon. Isn't there possibility how to merge this to older versions like 8.1/8.2 as well? If yes, we can benefit from this immediatelly. And not onle we, but all webhostings with same use case :) |
This is considered a new feature, or at least not a bug fix, so this can not be merged in a released version. The change should apply cleanly to 8.x however, and the source of the Ondrej Sury packages are available (via |
Understand |
Description
Hi,
if I set opcache.interned_strings_buffer = 2048 or other lower value everything is fine. (working well)
If I set opcache.interned_strings_buffer = 4096 and reload PHP FPM I got problem.
Two cases:
PHP FPM 8.3.3 - ignoring value and set for default value 8 (no error log info in syslog or php fpm log)
PHP FPM 5.6.40 (PHP 7.x is segfault as well) - segfault (I know, obsolete version, only for context - if I set lower value, no problem here) - here is the log from syslog php 5.6
Mar 5 14:06:03 s08 kernel: [5656531.610602] show_signal_msg: 6 callbacks suppressed
Mar 5 14:06:03 s08 kernel: [5656531.610604] php-fpm5.6[924861]: segfault at 30 ip 00005609add607d1 sp 00007ffdb3329e30 error 4 in php-fpm5.6[5609adbc6000+242000]
Mar 5 14:06:03 s08 kernel: [5656531.610612] Code: 19 48 01 c3 48 89 d8 48 8d 4a 01 48 c1 e0 05 48 01 d8 48 0f be 1a 48 01 c3 48 89 d8 48 c1 e0 05 48 01 d8 48 0f be 19 48 01 c3 <48> 8b 47 30 89 da 23 57 04 48 8b 2c d0 48 85 ed 74 5d 45 89 ef eb
Environment:
Ubuntu 22 LTS
physical memory 1TB
opcache.memory_consumption = 25000
I didn't have oportunity to test PHP 7.x but in every PHP version it's not working. 2 possible options:
Do you need more informations?
Thank you.
PHP Version
8.3.3
Operating System
Ubuntu 22.04 LTS
The text was updated successfully, but these errors were encountered: