ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Florian Wobbe <Florian.Wobbe@awi.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: calling ConTeXt as a background process
Date: Fri, 08 Oct 2010 13:46:14 +0200	[thread overview]
Message-ID: <6221687B-B252-4B09-BE36-4868261B78E1@awi.de> (raw)
In-Reply-To: <21C6E902-A3A4-4C4A-A9A0-2874DA107559@fiee.net>

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.<pid> 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 <pid>
>> 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="<path to>/formats/cont-en" --lua="<path to>/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
___________________________________________________________________________________


  reply	other threads:[~2010-10-08 11:46 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07  7:06 Henning Hraban Ramm
2010-10-07  7:34 ` Henning Hraban Ramm
2010-10-07  8:42   ` Taco Hoekwater
2010-10-07  9:00     ` Henning Hraban Ramm
2010-10-07  9:06       ` Taco Hoekwater
2010-10-07 10:19         ` Henning Hraban Ramm
     [not found]           ` <90F33E64-7BB9-4DEB-9E89-A4FC99169401@awi.de>
2010-10-07 15:55             ` Henning Hraban Ramm
2010-10-07 16:32               ` Florian Wobbe
2010-10-08  7:36                 ` Henning Hraban Ramm
2010-10-08  7:59                   ` Florian Wobbe
2010-10-08  8:43                     ` Henning Hraban Ramm
2010-10-08  9:25                       ` Florian Wobbe
2010-10-08 10:00                         ` Henning Hraban Ramm
2010-10-08 11:46                           ` Florian Wobbe [this message]
2010-10-08 13:47                             ` Henning Hraban Ramm
2010-10-08 13:54                               ` luigi scarso
2010-10-08 13:54                               ` Taco Hoekwater
2010-10-08 14:22                                 ` Patrick Gundlach
2010-10-08 14:30                                 ` Henning Hraban Ramm
2010-10-08 14:57                                   ` Taco Hoekwater
2010-10-08 15:10                                     ` Hans Hagen
2010-10-08 15:08                                   ` Florian Wobbe
2010-10-08 19:44                                     ` calling ConTeXt as a background process (SOLVED) Henning Hraban Ramm
2010-10-10  8:47                                       ` Patrick Gundlach
2010-10-10  9:01                                         ` Henning Hraban Ramm
2010-10-26 19:28                                       ` Taco Hoekwater
2010-10-26 20:09                                         ` Hans Hagen
2010-10-26 20:56                                           ` Taco Hoekwater
2010-10-26 21:32                                             ` Hans Hagen
2010-10-26 20:13                                         ` Henning Hraban Ramm
2010-10-08 15:05                                 ` calling ConTeXt as a background process Henning Hraban Ramm
2010-10-07 18:16               ` taco
2010-10-08  8:00                 ` Henning Hraban Ramm
2010-10-08  8:12                   ` Patrick Gundlach
2010-10-08  9:21                     ` Henning Hraban Ramm
2010-10-08  9:27                       ` luigi scarso
2010-10-08  8:37                   ` luigi scarso
2010-10-08  8:47                     ` Henning Hraban Ramm
2010-10-08  8:54                       ` luigi scarso
2010-10-08 10:19                   ` Hans Hagen
2010-10-07 10:16       ` Robin.Kirkham
2010-10-07 11:02         ` Henning Hraban Ramm
2010-10-07 10:27       ` Patrick Gundlach
2010-10-07 15:44         ` Henning Hraban Ramm
2010-10-07 15:48           ` luigi scarso
2010-10-07 16:15             ` Henning Hraban Ramm

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=6221687B-B252-4B09-BE36-4868261B78E1@awi.de \
    --to=florian.wobbe@awi.de \
    --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).