From: Brendan Jurd <brendan.jurd@achievecorp.com.au>
To: ntg-context@ntg.nl
Subject: mod_php vs context: tight loop
Date: Fri, 25 Nov 2011 16:12:19 +1100 [thread overview]
Message-ID: <4ECF23B3.4030005@achievecorp.com.au> (raw)
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:
<?php
$result = null;
system("texexec --check 2>&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
___________________________________________________________________________________
next reply other threads:[~2011-11-25 5:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-25 5:12 Brendan Jurd [this message]
2011-11-25 8:17 ` Hans Hagen
2011-11-27 5:45 ` Brendan Jurd
2011-11-27 9:53 ` Henning Hraban Ramm
2011-12-02 1:59 ` [SOLVED] " Brendan Jurd
2011-12-02 10:31 ` Hans Hagen
2012-01-03 20:46 ` Brendan Jurd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ECF23B3.4030005@achievecorp.com.au \
--to=brendan.jurd@achievecorp.com.au \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).