From: dbarrett at vistaprint dot com Operating system: Windows 2003 Server, 64-bit PHP version: 5.2.6 PHP Bug Type: Reproducible crash Bug description: exec() produces zombie processes on Windows, hangs Apache
Description: ------------ This is an intermittent but fatal problem. I cannot reproduce it on demand, but it occurs regularly on our MediaWiki 1.12.0 site running on Apache 2.2.8. When invoking a non-interactive Microsoft Windows command via exec() or shell_exec(), sometimes the resulting process will hang. Once this occurs, most or all subsequent exec() calls (within the same Apache instance) will hang as well. Eventually the wiki becomes unusable. The only way to kill these processes is to restart Apache. Other traditional "kill" techniques fail. This is not the same as Bug #30794, which was about interactive commands like Notepad. I'm speaking of diverse shell commands like perl.exe, gnuplot.exe, latex.exe, and others. All of them process text input, if that matters. If the process is "foo" and you run exec("foo"), you wind up with several hung processes: foo.exe cmd.exe*32 This may be a race condition. I ran the "handle" utility (from sysinternals) on the hung processes. It seemed to indicate that the processes were waiting on c:\Apache2\logs\error.log. Then handle itself (handle64.exe) hung! Because this is an intermittent problem, I am looking for advice on how to debug it and report more detailed information to you. Please don't append the generic "install the latest snapshot and let us know if the problem is still there" message to this ticket, because I can't install an experimental PHP release on a production server, and the problem happens ONLY on our production server (probably because of the load), not on any of our development or test servers. Expected result: ---------------- exec() and shell_exec() should never hang. -- Edit bug report at http://bugs.php.net/?id=44994&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44994&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44994&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44994&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44994&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44994&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44994&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44994&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44994&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44994&r=support Expected behavior: http://bugs.php.net/fix.php?id=44994&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44994&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44994&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44994&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44994&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44994&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44994&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44994&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44994&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44994&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44994&r=mysqlcfg