Bug #69598 [NEW]: Memory leak when updating cache
From: naoki-kawamukai at cybozu dot co dot jp
Operating system: Debian 7.8
PHP version: 5.5Git-2015-05-08 (Git)
Package: opcache
Bug Type: Bug
Bug description:Memory leak when updating cache
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 bug report at https://bugs.php.net/bug.php?id=69598&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69598&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69598&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69598&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69598&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69598&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69598&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69598&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69598&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69598&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69598&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69598&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69598&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69598&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69598&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69598&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69598&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69598&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69598&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69598&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69598&r=mysqlcfg
Thread (3 messages)
- naoki-kawamukai at cybozu dot co dot jp