ID: 44994 User updated by: dbarrett at vistaprint dot com Reported By: dbarrett at vistaprint dot com Status: Open Bug Type: Reproducible crash Operating System: Windows 2003 Server, 64-bit PHP Version: 5.2.6 New Comment:
I replaced all occurrences of exec() and shell_exec() in MediaWiki with calls to a custom COM object that invokes programs. The problem went away. This strongly suggests that PHP's implementation of exec(0 and shell_exec() is the culprit. I suspect a race condition. Previous Comments: ------------------------------------------------------------------------ [2008-05-14 15:09:43] dbarrett at vistaprint dot com 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 this bug report at http://bugs.php.net/?id=44994&edit=1