Edit report at http://bugs.php.net/bug.php?id=44994&edit=1
ID: 44994
Comment by: php at mmtbb dot com
Reported by: dbarrett at vistaprint dot com
Summary: exec() produces zombie processes on Windows, hangs
Apache
Status: Assigned
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:
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.
Previous Comments:
------------------------------------------------------------------------
[2010-01-06 17:35:17] patrick dot bueker at triangle-solutions dot de
I once had the problem too. I had the feeling that it has something to
do with threadsafe or non-threadsafe versions of PHP. I still have the
problem on some installations, others work.
------------------------------------------------------------------------
[2009-09-01 18:42:09] [email protected]
I'm trying to come up with a reproducible test case for this bug.
If anyone has a complete test scenario for this please post it. I simply
can't replicate the effects here.
G
------------------------------------------------------------------------
[2009-08-27 01:00:00] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2009-08-19 19:06:40] [email protected]
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2009-08-19 17:26:55] [email protected]
I've seen this happen in other languages too.
This happens when the pipe between the parent and child fills up, and
cmd.exe ends up blocking and creates a race condition. (Windows script
host languages trip up on this quickly)
in popen_ex() ( in tsrm_win32.c) the pipe is creates with a 2k buffer:
if (!str_len || !CreatePipe(&in, &out, &security, 2048L)) {
this should probably be significantly larger. I'd certainly go with at
least 16k or 32k. (hey, it's only memory :D)
as well, the elimination of the unrequired cmd.exe as the immediate
child process would eliminate the possibility that *it's* buffer gets
overwhelmed too. (which solves bug #43327, and I've passed a patch to
Pierre for that.)
------------------------------------------------------------------------
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
http://bugs.php.net/bug.php?id=44994
--
Edit this bug report at http://bugs.php.net/bug.php?id=44994&edit=1