From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/72714 Path: news.gmane.org!not-for-mail From: Brendan Jurd Newsgroups: gmane.comp.tex.context Subject: mod_php vs context: tight loop Date: Fri, 25 Nov 2011 16:12:19 +1100 Message-ID: <4ECF23B3.4030005@achievecorp.com.au> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1322208683 24495 80.91.229.12 (25 Nov 2011 08:11:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 25 Nov 2011 08:11:23 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Fri Nov 25 09:11:19 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RTqsQ-0008KZ-H8 for gctc-ntg-context-518@m.gmane.org; Fri, 25 Nov 2011 09:11:18 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id F03F4CB1D1; Fri, 25 Nov 2011 09:11:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id HL92tsWXSmSc; Fri, 25 Nov 2011 09:11:12 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 54EA5CB195; Fri, 25 Nov 2011 09:11:12 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DF8AFCB1C5 for ; Fri, 25 Nov 2011 06:12:50 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id lW-qa9kFd7Zs for ; Fri, 25 Nov 2011 06:12:39 +0100 (CET) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id EAFB9CB1BF for ; Fri, 25 Nov 2011 06:12:38 +0100 (CET) Original-Received: from mail.achievecorp.com.au (mail.achievecorp.com.au [122.49.201.131]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pAP5CZb6023918 for ; Fri, 25 Nov 2011 06:12:36 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by mail.achievecorp.com.au (Postfix) with ESMTP id 99DF442CB852 for ; Fri, 25 Nov 2011 16:12:27 +1100 (EST) Original-Received: from mail.achievecorp.com.au ([127.0.0.1]) by localhost (bigbrother.achievecorp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ttBwRNn3UUGW for ; Fri, 25 Nov 2011 16:12:27 +1100 (EST) Original-Received: from hermes.achievecorp (unknown [10.16.0.18]) by mail.achievecorp.com.au (Postfix) with ESMTP id 6069D42CBE35 for ; Fri, 25 Nov 2011 16:12:26 +1100 (EST) Original-Received: from [10.16.0.180] (unknown [10.16.0.180]) (Authenticated sender: brendan.jurd) by hermes.achievecorp (Postfix) with ESMTPA id 55976E65D77 for ; Fri, 25 Nov 2011 16:12:26 +1100 (EST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20111101 Thunderbird/7.0.1 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=122.49.201.131; country=AU; region=01; city=Canberra; latitude=-35.2833; longitude=149.2167; http://maps.google.com/maps?q=-35.2833,149.2167&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 06G1hcA1i - 2f172db0906b - 20111125 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 X-Mailman-Approved-At: Fri, 25 Nov 2011 09:11:10 +0100 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:72714 Archived-At: Hello list, I have a PHP application which generates documentation on the fly with context. This has been working really well, but I am now testing deployment on a new server with a more recent version of context, and it seems to be somehow getting itself into a tight loop. When I run texexec via the mod_php apache module, the command never returns, and `ps ax` shows the following: 9709 ? S 0:00 sh -c texexec --check 2>&1 9710 ? S 0:00 /bin/sh /usr/bin/texexec --check 9711 ? R 9:59 /usr/bin/texlua /usr/bin/mtxrun --usekpse --execute texexec --check `top` shows the mtxrun process eating 99.9% CPU. Attaching an strace to this process, once it is underway, shows no output. My test script is as follows: &1", $result); print $result . "\n"; ?> When this same test script is run directly from the command line with `php5 -f test.php`, it works as expected and outputs the following: MTXrun | kpse fallback with progname 'context' initialized in 0.01 secondsTeXExec | current distribution: web2c TeXExec | context source date: 2010.07.30 11:35 TeXExec | format path: . /root/.texmf-config/web2c/luatex /root/.texmf-var/web2c/luatex /root/texmf/web2c/luatex /etc/texmf/web2c/luatex /var/lib/texmf/web2c/luatex /usr/local/share/texmf/web2c/luatex /usr/share/texmf/web2c/luatex /usr/share/texmf-texlive/web2c/luatex /root/.texmf-config/web2c /root/.texmf-var/web2c /root/texmf/web2c /etc/texmf/web2c /var/lib/texmf/web2c /usr/local/share/texmf/web2c /usr/share/texmf/web2c /usr/share/texmf-texlive/web2c TeXExec | start of analysis TeXExec | end of analysis TeXExec | TeXExec | TeXExec | version 6.2.1 - 1997-2009 - PRAGMA ADE/POD 0 Using --timeout=30 in the arguments to texexec makes no difference; mtxrun nonetheless runs forever until it is signalled. It seems that this must be down to some kind of difference in Apache's execution environment -- I don't see any other way to explain the same PHP code working in cli and failing in mod_php, even when running as the same user. But what possible environmental factor could lead to mtxrun freaking out like this? I'm hoping someone on this list may be able to point me in the right direction. This server is a VZ instance running under proxmox, with the following relevant ubuntu packages installed (per the 'natty' release): context 2010.07.30-1 libapache2-mod-php5 5.3.5-1ubuntu7.3 apache2 2.2.17-1ubuntu1.4 -- Regards, Brendan Jurd Software Engineer Achieve, Corp brendan.jurd@achievecorp.com.au ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________