php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66908 epoll_create descriptors leaked after php5-fpm reload
Submitted: 2014-03-14 20:12 UTC Modified: -
From: jpintos at gmail dot com Assigned:
Status: Closed Package: FPM related
PHP Version: 5.4.26 OS: linux
Private report: No CVE-ID: None
 [2014-03-14 20:12 UTC] 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




Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-20 23:25 UTC] stas@php.net
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
 [2014-04-20 23:25 UTC] stas@php.net
-Status: Open +Status: Closed
 [2014-04-20 23:25 UTC] stas@php.net
Automatic comment on behalf of julio.pintos@avature.net
Revision: http://git.php.net/?p=php-src.git;a=commit;h=389d4e5ec33e32b4a72f548b1f6d2c18b1b7e49e
Log: Fix #66908: php-fpm reload leaks epoll_create() file descriptor
 [2014-04-25 23:25 UTC] ab@php.net
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
 [2014-04-25 23:29 UTC] ab@php.net
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
 [2014-04-25 23:29 UTC] ab@php.net
Automatic comment on behalf of julio.pintos@avature.net
Revision: http://git.php.net/?p=php-src.git;a=commit;h=389d4e5ec33e32b4a72f548b1f6d2c18b1b7e49e
Log: Fix #66908: php-fpm reload leaks epoll_create() file descriptor
 [2014-05-01 14:59 UTC] tyrael@php.net
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
 [2014-10-07 23:15 UTC] stas@php.net
Automatic comment on behalf of julio.pintos@avature.net
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=49341e992ad7f8eb7f94d4c946fb74f8e33e7e75
Log: Fix #66908: php-fpm reload leaks epoll_create() file descriptor
 [2014-10-07 23:26 UTC] stas@php.net
Automatic comment on behalf of julio.pintos@avature.net
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=49341e992ad7f8eb7f94d4c946fb74f8e33e7e75
Log: Fix #66908: php-fpm reload leaks epoll_create() file descriptor
 [2016-07-20 11:40 UTC] davey@php.net
Automatic comment on behalf of julio.pintos@avature.net
Revision: http://git.php.net/?p=php-src.git;a=commit;h=389d4e5ec33e32b4a72f548b1f6d2c18b1b7e49e
Log: Fix #66908: php-fpm reload leaks epoll_create() file descriptor
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 22:01:26 2024 UTC