Bug #66908 [Opn->Csd]: epoll_create descriptors leaked after php5-fpm reload
| From: | stas@php.net | Date: | Sun, 20 Apr 2014 23:25:52 +0000 |
| Subject: | Bug #66908 [Opn->Csd]: epoll_create descriptors leaked after php5-fpm reload | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-185349@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66908&edit=1
ID: 66908
Updated by: stas@php.net
Reported by: jpintos at gmail dot com
Summary: epoll_create descriptors leaked after php5-fpm
reload
-Status: Open
+Status: Closed
Type: Bug
Package: FPM related
Operating System: linux
PHP Version: 5.4.26
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of julio.pintos@avature.net
Revision: http://git.php.net/?p=php-src.git;a=commit;h=49341e992ad7f8eb7f94d4c946fb74f8e33e7e75
Log: Fix #66908: php-fpm reload leaks epoll_create() file descriptor
Previous Comments:
------------------------------------------------------------------------
[2014-03-14 20:12:57] jpintos at gmail dot com
Description:
------------
(in ubuntu 12.04)
Steps to reproduce:
$ sudo service php5-fpm reload
$ sudo lsof -p (fpm master pid) | wc -l
repeat steps above
From strace:
epoll_wait(103, {}, 1, 1000) = 0
...
// 103 is the fd of the epoll file descriptor returned by epoll_create)
...
clone(Process 10668 attached
child_stack=0x7f662c16fff0,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID,
parent_tidptr=0x7f662c1709d0, tls=0x7f662c170700, child_tidptr=0x7f662c1709d0) = 10668
...
clone(Process 10671 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f664c1509d0) =
10671
[pid 10671] epoll_create(2 <unfinished ...>
[pid 10671] <... epoll_create resumed> ) = 104
...
[pid 10671] epoll_wait(104, <unfinished ...>
[pid 10671] <... epoll_wait resumed> {}, 1, 1000) = 0
In lsof:
php5-fpm 10671 root 103u 0000 0,9 0 9882 anon_inode
php5-fpm 10671 root 104u 0000 0,9 0 9882 anon_inode
Expected result:
----------------
Number of open file descriptors should not consistently increase after each reload
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66908&edit=1