php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65394 Extra anon_inode:[eventfd] in forked processes
Submitted: 2013-08-05 14:50 UTC Modified: 2013-08-05 14:58 UTC
From: bugs dot php dot net at ss dot chernousov dot net Assigned:
Status: Not a bug Package: eio (PECL)
PHP Version: 5.5.1 OS: Gentoo Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bugs dot php dot net at ss dot chernousov dot net
New email:
PHP Version: OS:

 

 [2013-08-05 14:50 UTC] bugs dot php dot net at ss dot chernousov dot net
Description:
------------
If pecl-eio extension is loaded, each forked child process has one more 
anon_inode:[eventfd] than parent process, even if eio_* functions were never used 
in the script.


Test script:
---------------
<?php

passthru('ls -1l /proc/' . posix_getpid() . '/fd/');

$pid = pcntl_fork();
if ( $pid == 0 ) {
	passthru('ls -1l /proc/' . posix_getpid() . '/fd/');

	$pid = pcntl_fork();
	if ( $pid == 0 ) {
		passthru('ls -1l /proc/' . posix_getpid() . '/fd/');

		$pid = pcntl_fork();
		if ( $pid == 0 ) {
			passthru('ls -1l /proc/' . posix_getpid() . '/fd/');
		}
	}
}


Expected result:
----------------
total 0
lrwx------ 1 root root 64 Aug  5 10:49 0 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 1 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 2 -> /dev/pts/4
lr-x------ 1 root root 64 Aug  5 10:49 3 -> pipe:[87952]
total 0
lrwx------ 1 root root 64 Aug  5 10:49 0 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 1 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 2 -> /dev/pts/4
lr-x------ 1 root root 64 Aug  5 10:49 4 -> pipe:[84897]
total 0
lrwx------ 1 root root 64 Aug  5 10:49 0 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 1 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 2 -> /dev/pts/4
lr-x------ 1 root root 64 Aug  5 10:49 5 -> pipe:[84898]
total 0
lrwx------ 1 root root 64 Aug  5 10:49 0 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 1 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 2 -> /dev/pts/4
lr-x------ 1 root root 64 Aug  5 10:49 6 -> pipe:[84899]


Actual result:
--------------
total 0
lrwx------ 1 root root 64 Aug  5 10:49 0 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 1 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 2 -> /dev/pts/4
lr-x------ 1 root root 64 Aug  5 10:49 3 -> pipe:[87952]
total 0
lrwx------ 1 root root 64 Aug  5 10:49 0 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 1 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 2 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 3 -> anon_inode:[eventfd]
lr-x------ 1 root root 64 Aug  5 10:49 4 -> pipe:[84897]
total 0
lrwx------ 1 root root 64 Aug  5 10:49 0 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 1 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 2 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 3 -> anon_inode:[eventfd]
lrwx------ 1 root root 64 Aug  5 10:49 4 -> anon_inode:[eventfd]
lr-x------ 1 root root 64 Aug  5 10:49 5 -> pipe:[84898]
total 0
lrwx------ 1 root root 64 Aug  5 10:49 0 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 1 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 2 -> /dev/pts/4
lrwx------ 1 root root 64 Aug  5 10:49 3 -> anon_inode:[eventfd]
lrwx------ 1 root root 64 Aug  5 10:49 4 -> anon_inode:[eventfd]
lrwx------ 1 root root 64 Aug  5 10:49 5 -> anon_inode:[eventfd]
lr-x------ 1 root root 64 Aug  5 10:49 6 -> pipe:[84899]


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-08-05 14:58 UTC] osmanov@php.net
-Status: Open +Status: Not a bug
 [2013-08-05 14:58 UTC] osmanov@php.net
It's not a bug. Eio is designed to be re-initialized for each forked process.
Eio uses "eventfd" for internal IPC with libeio.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 10:01:29 2024 UTC