php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66472 Add extra outputs to opcache_get_status() to enable table sizing
Submitted: 2014-01-12 15:44 UTC Modified: 2014-12-30 10:42 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: Terry at ellisons dot org dot uk Assigned:
Status: No Feedback Package: opcache
PHP Version: master-Git-2014-01-12 (Git) OS: N/
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Terry at ellisons dot org dot uk
New email:
PHP Version: OS:

 

 [2014-01-12 15:44 UTC] Terry at ellisons dot org dot uk
Description:
------------
Sysadmins currently need to set various table sizes explicitly using the OPcache INI parameters, but they have no means of knowing the current sizes.  This is a simple patch to add the extra field reporting to the opcache_get_status() output to allow them to do this properly.  

The key table here is the interned_strings pool, but I've also added ZCSG(include_paths) reporting.

Note that ZendAccelerator.c nominally allocates 32 slots for the ZCSG(include_paths) table but in fact this is rounded up to the prime value 53, so the ZCSG(include_paths) short prefix is infact [A-Z\[\\\]^_`a-u].


Patches

extra-opcache_get_status-reporting.patch (last revision 2014-01-12 15:44 UTC by Terry at ellisons dot org dot uk)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-19 16:00 UTC] Terry at ellisons dot org dot uk
jpauli, I don't think that your proposal is the way to go:

1) Interned String pool exhaustion: this fails safe to not using interned strings.  Raising warnings that the pool is full will fill the error log without value.  If the sysadmins want to monitor this then some form of extended status is quite adequate.

2) I don't like the idea of adding a opcache_dump_interned_strings() function as this makes all interned strings available to the caller. This introduces a potential exploitable vulnerability.  At a minium, this should be subject to a validate_api_restriction() check.
 [2014-02-21 08:49 UTC] dmitry@php.net
-Status: Open +Status: Feedback
 [2014-02-21 08:49 UTC] dmitry@php.net
I've added information about interned strings into phpinfo() and opcache_get_status().

However I didn't add information about ZCSG(include_path).

A also don't think that opcache_dump_interned_strings() is useful.
 [2014-12-30 10:42 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 01:01:28 2024 UTC