Edit report at https://bugs.php.net/bug.php?id=44994&edit=1
ID: 44994 Comment by: jaw at condidact dot dk Reported by: dbarrett at vistaprint dot com Summary: exec() produces zombie processes on Windows, hangs Apache Status: Closed Type: Bug Package: Program Execution Operating System: win32 only - 2003 Server, 64-bit PHP Version: 5.2.6 Assigned To: pajoye Block user comment: N Private report: N New Comment: I have also experienced this problem on debian linux kernel 2.6.22.6-1-amd64 / php 5.3.8 / apache 2.2.11 It seems like the problem stems from php running multiple similar/same commands. The session_write_close() fix did nothing for me, but a sleep(2) (2 might be relative to the execution time of the command, in my case a ping with a timeout of 1) after exec(), seems to alleviate the problem, but not completely solving it. Hope that helps somebody Previous Comments: ------------------------------------------------------------------------ [2012-06-06 01:31:36] mark at clevertech dot biz WinXP Home SP3 XAMPP with: PHP 5.3.8 built Aug 23, 2011 Apache 2.2.21 built Sep 10, 2011 This problem occurs with proc_open(), exec(), and popen(). Once a child process hangs, PHP in new page requests continues to run fine unless I call proc_open(), exec(), popen(), or session_start(). The problem ceases to occur when I call session_write_close() before my call to proc_open(), exec(), or popen(). I'm on a team of 6 developers, and we are running this on Linux, Mac, and several versions of Windows, but we've only seen this problem on Windows XP. This is happening on a complex application using a large framework. I intend to post a straightforward test script later. ------------------------------------------------------------------------ [2011-10-10 17:08:57] paj...@php.net @jameslively at insightbb dot com What do you see exactly? Can you provide a small script and the cmd you use to test? ------------------------------------------------------------------------ [2011-10-10 15:31:25] jameslively at insightbb dot com I am still seeing this issue on PHP 5.3.8. I am running the site on Windows 2k3 sp3 and Apache 2.2. ------------------------------------------------------------------------ [2011-05-05 18:09:25] paj...@php.net Fixed in 5.3.x ------------------------------------------------------------------------ [2011-05-05 17:52:08] php at mmtbb dot com Testing on PHP v5.3.1 (installed with XAMPP), I'm able to run 50 concurrent popen requests without any fault. All processes terminate after completion. I understand that the popen() and exec() were both experiencing this issue in the past, the 5.3.x line seems to resolve the issue. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=44994 -- Edit this bug report at https://bugs.php.net/bug.php?id=44994&edit=1