Bug #75579 [Ana]: All Interned Strings Free memory used and PHP crashes
From: dmitry@php.net Date: Thu, 21 Dec 2017 11:47:30 +0000 Subject: Bug #75579 [Ana]: All Interned Strings Free memory used and PHP crashes References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-213204@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75579&edit=1
ID: 75579
Updated by: dmitry@php.net
Reported by: post at minhost dot no
Summary: All Interned Strings Free memory used and PHP
crashes
Status: Analyzed
Type: Bug
Package: opcache
Operating System: CentOS 7.4
PHP Version: 7.1.12
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
It's going to load scripts cached in files into regular memory if SHM is full. Of course, it
would require more extra work on each request, but this should be cheaper then recompile everything.
Previous Comments:
------------------------------------------------------------------------
[2017-12-21 11:40:44] post at minhost dot no
@dmitry: Thank you for a new patch. But what are the new patch supposed to fix or improve? Because
the first patch seemed to work correct as explained in my previous reply.
Anyway, I will of course test you new patch, but I don't have time until several hours later.
------------------------------------------------------------------------
[2017-12-21 11:32:20] dmitry@php.net
Oh sorry, I posted invalid patch because of mess with branched.
This is the patch https://gist.github.com/dstogov/69e9a08038dcaf3c2e72ea4b1676242c
------------------------------------------------------------------------
[2017-12-21 09:50:06] post at minhost dot no
@dmitry: I have now tested in PHP 7.1.11, and the behaviour is the same as with PHP 7.1.13 RC1 +
your patch. When there is not enough memory left in opcache, then new files will also not be cached
in file cache on disk. So that is not a bug.
I have tested your patch thorough now, and it seems to work correct, PHP no longer crashes. It
works! Please add your patch to the 7.x branch. It would be fantastic if we could get the patch
already in PHP 7.1.13 and PHP 7.0.27 in january 2018! Thanks!
------------------------------------------------------------------------
[2017-12-21 09:44:28] post at minhost dot no
@spam2: I am happy with the current way OOM and restart works. Every night opcache memory is
completely emptied anyhway when apache and php-fpm is reloaded. Also that discussion is off-topic to
this bug report.
------------------------------------------------------------------------
[2017-12-21 09:35:05] spam2 at rhsoft dot net
> OOM shouldn't necessary lead to "restart". Only in case
> of "wasted" memory. Otherwise you would fill and trash
> SHM continuously
the problem with this is if something spiders over the server and calls a ton of normally not often
called URLs opcache may get filled with irrelevant stuff while there is no space for current real
workload and that degrades performance serious
automatic fill and trash would fix that - with the current behavior you need to manually reload
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=75579
--
Edit this bug report at https://bugs.php.net/bug.php?id=75579&edit=1
Thread (52 messages)
- Bug #75579 [Opn]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Opn]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Opn]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Opn]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Opn]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Opn]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Opn]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Opn]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Opn]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Opn]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Opn]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Opn->Ana]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Ana]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Ana]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Ana]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Ana]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Ana]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Ana]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Ana]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Ana]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Ana->Csd]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Csd]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Csd]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Csd]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Csd]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Csd]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Csd]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Csd]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
- Bug #75579 [Com]: All Interned Strings Free memory used and PHP crashes
| « previous | php.bugs (#213204) | next » |
|---|