Bug #69598 [Com]: Memory leak when updating cache
| From: | kenorb at gmail dot com | Date: | Thu, 12 May 2016 12:17:40 +0000 |
| Subject: | Bug #69598 [Com]: Memory leak when updating cache | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-201034@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69598&edit=1
ID: 69598
Comment by: kenorb at gmail dot com
Reported by: naoki-kawamukai at cybozu dot co dot jp
Summary: Memory leak when updating cache
Status: Open
Type: Bug
Package: opcache
Operating System: Debian 7.8
PHP Version: 5.5Git-2015-05-08 (Git)
Block user comment: N
Private report: N
New Comment:
Related: #66442
Previous Comments:
------------------------------------------------------------------------
[2015-05-08 01:10:26] naoki-kawamukai at cybozu dot co dot jp
Description:
------------
I use php-fpm + opcache.
My configuration is following:
opcache.enable=1
opcache.revalidate_freq=2
opcache.validate_timestamps=1
opcache.log_verbosity_level=4
When accessing test script twice, memory leaks detected.
I think this bug occurs when updating cache.
This leaks occurs on PHP 5.5(Git-2015-05-08), PHP 5.6(Git-2015-05-08).
But it does not occur on PHP 7.0(Git-2015-05-08)
Test script:
---------------
<?php
touch(__FILE__);
sleep(3);
Expected result:
----------------
Memory does not leak.
vagrant@php7dev:/var/www/default$ sudo tailf /var/log/nginx/php-fpm_error.log
[08-May-2015 01:03:13] NOTICE: fpm is running, pid 25975
[08-May-2015 01:03:13] NOTICE: ready to handle connections
[08-May-2015 01:03:17] WARNING: [pool www] child 25978 said into stderr: "Fri May 8 01:03:17
2015 (25978): Message Cached script '/var/www/default/test/opcache_touch_self.php'"
[08-May-2015 01:03:22] WARNING: [pool www] child 25976 said into stderr: "Fri May 8 01:03:22
2015 (25976): Message Cached script '/var/www/default/test/opcache_touch_self.php'"
Actual result:
--------------
Memory leaks.
vagrant@php7dev:/var/www/default$ sudo tailf /var/log/nginx/php-fpm_error.log
[08-May-2015 01:03:13] NOTICE: fpm is running, pid 25975
[08-May-2015 01:03:13] NOTICE: ready to handle connections
[08-May-2015 01:03:17] WARNING: [pool www] child 25978 said into stderr: "Fri May 8 01:03:17
2015 (25978): Message Cached script '/var/www/default/test/opcache_touch_self.php'"
[08-May-2015 01:03:22] WARNING: [pool www] child 25976 said into stderr: "Fri May 8 01:03:22
2015 (25976): Message Cached script '/var/www/default/test/opcache_touch_self.php'"
[08-May-2015 01:03:25] WARNING: [pool www] child 25976 said into stderr: "[Fri May 8 01:03:25
2015] Script: '-'"
[08-May-2015 01:03:25] WARNING: [pool www] child 25976 said into stderr:
"/home/vagrant/php-src/ext/opcache/ZendAccelerator.c(1931) : Freeing 0x7F62A4877CF0 (45
bytes), script=-"
[08-May-2015 01:03:25] WARNING: [pool www] child 25976 said into stderr: "=== Total 1 memory
leaks detected ==="
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69598&edit=1