php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49265 external program execution hangs, process sometimes never exits
Submitted: 2009-08-15 10:17 UTC Modified: 2009-08-17 21:30 UTC
From: stefan dot launicke at gate8 dot de Assigned:
Status: Not a bug Package: Program Execution
PHP Version: 5.2.10 OS: Linux 2.6.19
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: stefan dot launicke at gate8 dot de
New email:
PHP Version: OS:

 

 [2009-08-15 10:17 UTC] stefan dot launicke at gate8 dot de
Description:
------------
When doing a external function call using either passthru(), 
proc_open() or system(), the external process hangs most of the time. 
Sometimes it works. Only appears when run through mod_php / apache2. 
Calling the script in the shell with CLI always works. 

ps shows:
11606 ?        Sl     0:00 /usr/bin/pdftk 

No errors in any logs, no segfaults. top

Please Note:
- doing the exact same call in a Perl script running in Apache always 
works.
- calling the perl script which does the funtion call from within php 
will crash again with ps (passthru example):

11674 ?        S      0:00 sh -c cd '/data/usr/inauris.com/tmp' ; 
/data/usr/inauris.com/tmp/test3.pl
11675 ?        S      0:00 /usr/bin/perl -w 
/data/usr/inauris.com/tmp/test3.pl
11676 ?        Sl     0:00 /usr/bin/pdftk 
/data/usr/inauris.com/management/home/app/pdf...

Apache Version: 2.2.11, Worker MPM

Reproduce code:
---------------
passthru ("/usr/bin/pdftk /data/testin.pdf fill_form /data/workdata output /data/testout.pdf flatten");

Expected result:
----------------
exec & return

Actual result:
--------------
hang

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-15 10:32 UTC] stefan dot launicke at gate8 dot de
I appologize for the double post. For some reason, I cannot edit my 
submission. Can some admin please delete the first entry? Thank you.
 [2009-08-17 18:49 UTC] jani@php.net
We can only delete the comments. Can't edit initial entry in this version of the bug tracker. Please repost this bug.
 [2009-08-17 18:49 UTC] jani@php.net
And please don't post the bug if you can't reproduce it using the preform MPM. Threaded mpms are not supported.
 [2009-08-17 21:30 UTC] stefan dot launicke at gate8 dot de
reproduced with Apache Prefork model. Same behaviour,
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 19:01:31 2025 UTC