Bug #69598 [Opn->Csd]: Memory leak when updating cache

From: Date: Thu, 19 Mar 2020 09:47:05 +0000
Subject: Bug #69598 [Opn->Csd]: Memory leak when updating cache
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-226177@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
 Updated by:         cmb@php.net
 Reported by:        naoki-kawamukai at cybozu dot co dot jp
 Summary:            Memory leak when updating cache
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            opcache
 Operating System:   Debian 7.8
 PHP Version:        5.5Git-2015-05-08 (Git)
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

> But it does not occur on PHP 7.0(Git-2015-05-08)

So I'm assuming that it does neither occur with any of the
actively supported PHP versions[1].

[1] <https://www.php.net/supported-versions.php>


Previous Comments:
------------------------------------------------------------------------
[2016-05-12 12:17:37] kenorb at gmail dot com

Related: #66442

------------------------------------------------------------------------
[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


Thread (3 messages)

« previous php.bugs (#226177) next »