From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/62453 Path: news.gmane.org!not-for-mail From: Florian Wobbe Newsgroups: gmane.comp.tex.context Subject: Re: calling ConTeXt as a background process Date: Fri, 08 Oct 2010 13:46:14 +0200 Message-ID: <6221687B-B252-4B09-BE36-4868261B78E1@awi.de> References: <4CAD8800.2010909@elvenkind.com> <4CAD8D8A.6040802@elvenkind.com> <5A1428AE-DA31-4120-9B35-102E7B42D8AC@fiee.net> <90F33E64-7BB9-4DEB-9E89-A4FC99169401@awi.de> <48470924-D44D-4010-B895-12EA664C4D90@fiee.net> <93934DF3-21F9-4F68-99B1-75A09A7835C8@fiee.net> <67380489-10BF-4A55-8519-5BC981426F3C@awi.de> <2F3F5D5C-FA78-4EA2-885E-A6DB86880B34@fiee.net> <95274FC9-42F1-4842-9943-103608507CB4@awi.de> <21C6E902-A3A4-4C4A-A9A0-2874DA107559@fiee.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1286538405 9746 80.91.229.12 (8 Oct 2010 11:46:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Oct 2010 11:46:45 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Oct 08 13:46:43 2010 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 1P4BPO-0008AB-54 for gctc-ntg-context-518@m.gmane.org; Fri, 08 Oct 2010 13:46:42 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CDBEDCA749; Fri, 8 Oct 2010 13:46:40 +0200 (CEST) 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 sdx+dacgbVnr; Fri, 8 Oct 2010 13:46:29 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 23356CA73F; Fri, 8 Oct 2010 13:46:29 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 09A86CA73F for ; Fri, 8 Oct 2010 13:46:28 +0200 (CEST) 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 UOIkL70oq8SQ for ; Fri, 8 Oct 2010 13:46:25 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 498BFCA73A for ; Fri, 8 Oct 2010 13:46:25 +0200 (CEST) Original-Received: from mails3.awi.de (mails3.AWI.DE [134.1.2.14]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o98BkN2g031073 for ; Fri, 8 Oct 2010 13:46:24 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by mails3.awi.de (Postfix) with ESMTP id 63052B8C2C for ; Fri, 8 Oct 2010 13:46:23 +0200 (MEST) X-Virus-Scanned: amavisd-new at awi.de Original-Received: from localhost ([127.0.0.1]) by localhost (mails3.awi.de [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id JBoFk6yUNvo3 for ; Fri, 8 Oct 2010 13:46:14 +0200 (MEST) Original-Received: from msg.awi.de (msg.AWI.DE [134.1.3.16]) by mails3.awi.de (Postfix) with ESMTP id 9A602B8C20 for ; Fri, 8 Oct 2010 13:46:14 +0200 (MEST) Original-Received: from vpn-awinet-16-21.awi.de ([unknown] [172.28.16.21]) by msg.awi.de (Sun Java(tm) System Messaging Server 7u3-12.01 64bit (built Oct 15 2009)) with ESMTPSA id <0L9Y0098PZD2WSC0@msg.awi.de> for ntg-context@ntg.nl; Fri, 08 Oct 2010 13:46:14 +0200 (MEST) In-reply-to: <21C6E902-A3A4-4C4A-A9A0-2874DA107559@fiee.net> X-Mailer: Apple Mail (2.1081) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=134.1.2.14; country=DE; region=03; city=Bremerhaven; latitude=53.5500; longitude=8.5833; http://maps.google.com/maps?q=53.5500,8.5833&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0bDgbKnUb - 3c3dde1c312b - 20101008 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 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:62453 Archived-At: On Oct 8, 2010, at 12:00 , Henning Hraban Ramm wrote: > Am 2010-10-08 um 11:25 schrieb Florian Wobbe: > >> This output looks quite messy because it is composed of the mixed output for five processes. I don't suspect the fault in luatex executable itself, however, mtxrun calls uname -m in a subshell and my guess is that it hangs there. Have you tried calling uname alone from your script? > > As I told Taco and Luigi off-list: >> Simply calling uname works >> as well as calling it in a shell script >> as well as calling another Python script that calls uname. > > > >> Next you could do >> strace -ff -o ctxtrace mtxrun --script context --batchmode --once hello > > Ok, here we are: > 14203 ? Sl 0:01 | \_ /var/www/xxx/bin/python /var/www/.../manage.py runfcgi method=threaded ... > 14255 ? S 0:00 | \_ strace -ff -o ctxtrace mtxrun --script context --batchmode --once hello > 14256 ? R 0:06 | \_ texlua /var/opt/context/tex/texmf-linux-64/bin/mtxrun --script context --batchmode --once hello > >> This gives you hopefully four ctxtrace. files. > > I got only one for 14256 Right, so you are not even getting to the point where luatex is called. This is still texlua executing instructions from mtxrun. >> Then do (for each pid) >> strace -p >> before killing luatex and see where it hangs. Interrupt and kill your luatex and have a look at the ctxtrace.* files. > > strace -p 14256 > attach: ptrace(PTRACE_ATTACH, ...): Operation not permitted > (as the same user as well as as root) Something to do with SElinux? > [...] > read(3, "his script\n-- ... later we will u"..., 4096) = 4096 > read(3, "xecute\") then\n\n -- execute scr"..., 4096) = 4096 > read(3, "guments_after)\n resolvers.dowi"..., 4096) = 2858 > read(3, ""..., 4096) = 0 > close(3) = 0 > munmap(0x2acfe2776000, 4096) = 0 > brk(0x1c37a000) = 0x1c37a000 > brk(0x1c39d000) = 0x1c39d000 > brk(0x1c3c0000) = 0x1c3c0000 Here, uname -m should be called. But I guess you still have all unames replaced by their return value I guess? > brk(0x1c3e1000) = 0x1c3e1000 > uname({sys="Linux", node="aine.fiee.net", ...}) = 0 > --- SIGTERM (Terminated) @ 0 (0) --- > +++ killed by SIGTERM +++ Here it should continue with reading texmfcnf.lua. The last uname({sys="Linux", node="aine.fiee.net", ... you get is from the os.uname call I would guess. Try putting the lines for k, v in next, os.uname() do print(k, v) end in a file and run it with texlua from the script to be sure. Then you might also try to invoke luatex directly: luatex --interaction=batchmode --fmt="/formats/cont-en" --lua="/formats/cont-en.lui" --backend=pdf hello Florian ___________________________________________________________________________________ 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 ___________________________________________________________________________________