* calling ConTeXt as a background process @ 2010-10-07 7:06 Henning Hraban Ramm 2010-10-07 7:34 ` Henning Hraban Ramm 0 siblings, 1 reply; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-07 7:06 UTC (permalink / raw) To: mailing ConTeXt users list for Hi together! I'm trying since about a week to get ConTeXt running as a background process of a web application. It's always hanging, and I get no log. "ps axef" shows the call stack: \_ /var/www/xxx/bin/python /var/www/xxx/releases/current/cerebrale/ manage.py runfcgi method=threaded ... \_ /bin/sh -c cd /var/www/xxx/_textemp && /var/opt/context/tex/ texmf-linux-64/bin/context ... \_ /bin/sh /var/opt/context/tex/texmf-linux-64/bin/context -- purgeall --batchmode --result=/var/www/xxx/_textemp/xxx.pdf \_ texlua /var/opt/context/tex/texmf-linux-64/bin/mtxrun --script context --purgeall --batchmode --result=/ ... \_ [uname] <defunct> I.e. it looks like texlua calls uname in a way that lets the process hang forever. If I call the same from an active shell everything runs fine. Also uname alone works in the shell command. Any ideas what I could/should check? I don't think it could be the PATH, since ConTeXt's bin as well as all the system tools are in: PATH=/var/opt/context/tex/texmf-linux-64/bin:/var/www/cerebrale/bin:/ command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/ usr/X11R6/bin TEXMFOS=/var/opt/context/tex/texmf-linux-64 TEXROOT=/var/opt/context/tex The user that runs the server process (incl. sub-shell and ConTeXt) owns all the TeX files and the directory. Maybe it's a Python problem, here's my call: subprocess.Popen(cmd.encode('utf-8'), shell=True, stderr=logfile, stdout=logfile) But I can call several other commands in this way without problems. The whole thing (incl. ConTeXt) works on my Mac (OSX 10.5.8) at home. Everything I call before ConTeXt shows up in the logfile. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-07 7:06 calling ConTeXt as a background process Henning Hraban Ramm @ 2010-10-07 7:34 ` Henning Hraban Ramm 2010-10-07 8:42 ` Taco Hoekwater 0 siblings, 1 reply; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-07 7:34 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2010-10-07 um 09:06 schrieb Henning Hraban Ramm: > Hi together! > > I'm trying since about a week to get ConTeXt running as a background > process of a web application. > It's always hanging, and I get no log. > > "ps axef" shows the call stack: > > \_ /var/www/xxx/bin/python /var/www/xxx/releases/current/cerebrale/ > manage.py runfcgi method=threaded ... > \_ /bin/sh -c cd /var/www/xxx/_textemp && /var/opt/context/tex/ > texmf-linux-64/bin/context ... > \_ /bin/sh /var/opt/context/tex/texmf-linux-64/bin/context -- > purgeall --batchmode --result=/var/www/xxx/_textemp/xxx.pdf > \_ texlua /var/opt/context/tex/texmf-linux-64/bin/mtxrun > --script context --purgeall --batchmode --result=/ ... > \_ [uname] <defunct> > > I.e. it looks like texlua calls uname in a way that lets the process > hang forever. > If I call the same from an active shell everything runs fine. Also > uname alone works in the shell command. > Any ideas what I could/should check? > > I don't think it could be the PATH, since ConTeXt's bin as well as > all the system tools are in: > PATH=/var/opt/context/tex/texmf-linux-64/bin:/var/www/cerebrale/bin:/ > command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/ > sbin:/usr/X11R6/bin > TEXMFOS=/var/opt/context/tex/texmf-linux-64 > TEXROOT=/var/opt/context/tex > > The user that runs the server process (incl. sub-shell and ConTeXt) > owns all the TeX files and the directory. > > Maybe it's a Python problem, here's my call: > subprocess.Popen(cmd.encode('utf-8'), shell=True, stderr=logfile, > stdout=logfile) > > But I can call several other commands in this way without problems. > The whole thing (incl. ConTeXt) works on my Mac (OSX 10.5.8) at home. > Everything I call before ConTeXt shows up in the logfile. I tried to call mtxrun directly and replaced the calls to uname -m with their return value (x86_64). Now the texlua process itself hangs, even if not "defunct" it doesn't do anything: \_ /var/www/xxx/bin/python /var/www/xxx/releases/current/cerebrale/ manage.py runfcgi method=threaded ... \_ /bin/sh -c cd /var/www/xxx/_textemp && mtxrun --script context "prd_paket --batchmode --once" PATH=/var/opt/context/tex/texmf- linux-64/bin:/var/www/xxx/bin:... \_ texlua /var/opt/context/tex/texmf-linux-64/bin/mtxrun -- script context prd_paket --batchmode --once TEXMFOS=/var/opt/context/ tex/texmf-linux-64 VIRTUAL_ENV=/var/www/xxx PATH=/var/opt/context/tex/ texmf-linux-64/bin:... Help? Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-07 7:34 ` Henning Hraban Ramm @ 2010-10-07 8:42 ` Taco Hoekwater 2010-10-07 9:00 ` Henning Hraban Ramm 0 siblings, 1 reply; 46+ messages in thread From: Taco Hoekwater @ 2010-10-07 8:42 UTC (permalink / raw) To: mailing list for ConTeXt users On 10/07/10 09:34, Henning Hraban Ramm wrote: > mtxrun --script context "prd_paket --batchmode --once" When I run that last thing on the command line, I get: ! I can't find file `./prd_paket --batchmode --once'. <*> "./prd_paket --batchmode --once" Please type another input file name: But it is hard to say whether that is the problem. If it was me, I would attach a gdb to the process to see where it is at from the backtrace (but you need a non-stripped build of the binary for that). Best wishes, Taco ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-07 8:42 ` Taco Hoekwater @ 2010-10-07 9:00 ` Henning Hraban Ramm 2010-10-07 9:06 ` Taco Hoekwater ` (2 more replies) 0 siblings, 3 replies; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-07 9:00 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2010-10-07 um 10:42 schrieb Taco Hoekwater: > On 10/07/10 09:34, Henning Hraban Ramm wrote: >> mtxrun --script context "prd_paket --batchmode --once" > > When I run that last thing on the command line, I get: > > ! I can't find file `./prd_paket --batchmode --once'. > <*> "./prd_paket --batchmode --once" > > Please type another input file name: Of course, prd_paket.tex is my input file. But that's there. > But it is hard to say whether that is the problem. If it was > me, I would attach a gdb to the process to see where it is at > from the backtrace (but you need a non-stripped build of > the binary for that). I'd like to avoid compiling a debugging version of luatex... I guess the problem isn't luatex itself, but the probably somehow restricted environment. How's ConTeXt called in ConTeXtgarden Live? Any special means? Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-07 9:00 ` Henning Hraban Ramm @ 2010-10-07 9:06 ` Taco Hoekwater 2010-10-07 10:19 ` Henning Hraban Ramm 2010-10-07 10:16 ` Robin.Kirkham 2010-10-07 10:27 ` Patrick Gundlach 2 siblings, 1 reply; 46+ messages in thread From: Taco Hoekwater @ 2010-10-07 9:06 UTC (permalink / raw) To: mailing list for ConTeXt users On 10/07/10 11:00, Henning Hraban Ramm wrote: > Am 2010-10-07 um 10:42 schrieb Taco Hoekwater: > >> On 10/07/10 09:34, Henning Hraban Ramm wrote: >>> mtxrun --script context "prd_paket --batchmode --once" >> >> When I run that last thing on the command line, I get: >> >> ! I can't find file `./prd_paket --batchmode --once'. >> <*> "./prd_paket --batchmode --once" >> >> Please type another input file name: > > Of course, prd_paket.tex is my input file. But that's there. Your shell quotes were off. It is looking for "./prd_paket --batchmode --once.tex" ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-07 9:06 ` Taco Hoekwater @ 2010-10-07 10:19 ` Henning Hraban Ramm [not found] ` <90F33E64-7BB9-4DEB-9E89-A4FC99169401@awi.de> 0 siblings, 1 reply; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-07 10:19 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2010-10-07 um 11:06 schrieb Taco Hoekwater: >> Of course, prd_paket.tex is my input file. But that's there. > > Your shell quotes were off. It is looking for > > "./prd_paket --batchmode --once.tex" Ok, but it doesn't work with any other call of luatex - I also tried to start another shell script that calls luatex, but it hangs in the same manner. If I kill the luatex process, further commands work. I found a lot of examples where people call other programs from Django in the same way as I tried with LuaTeX (i.e. without additional shell script), so my call isn't probably too wrong. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
[parent not found: <90F33E64-7BB9-4DEB-9E89-A4FC99169401@awi.de>]
* Re: calling ConTeXt as a background process [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-07 18:16 ` taco 0 siblings, 2 replies; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-07 15:55 UTC (permalink / raw) To: mailing ConTeXt users list for Am 2010-10-07 um 12:54 schrieb Florian Wobbe: > On Oct 7, 2010, at 12:19 , Henning Hraban Ramm wrote: > >> Am 2010-10-07 um 11:06 schrieb Taco Hoekwater: >>>> Of course, prd_paket.tex is my input file. But that's there. >>> >>> Your shell quotes were off. It is looking for >>> >>> "./prd_paket --batchmode --once.tex" >> >> Ok, but it doesn't work with any other call of luatex - I also >> tried to start another shell script that calls luatex, but it hangs >> in the same manner. If I kill the luatex process, further commands >> work. > > could you send me the calling shell script along with all necessary > files to run the context batch? or supply a minimal example instead > of prd_paket.tex. Hi Florian, it doesn't depend on the tex file, it's the same with \starttext Hello World! \stoptext It also doesn't depend on context options (--batchmode etc.) And it doesn't seem to depend on the way of calling it from Python/ Django: - directly with subprocess.Popen (several options), subprocess.call, subprocess.check_call - indirectly via shell script (that contains just the context call) - with context or mtxrun (didn't try texlua directly yet) - with setuptex or setting TEXROOT and TEXMFOS directly (in the environment for the subprocess call) I can imagine that it has something to do with SElinux settings, didn't dive in that yet. I can call context manually as the same user that's running the server process with all the options. It also works on my test system (osx-intel) with Django's dev server, just not on my Ubuntu server (linux-64). Despairing greetlings, Hraban ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 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-07 18:16 ` taco 1 sibling, 1 reply; 46+ messages in thread From: Florian Wobbe @ 2010-10-07 16:32 UTC (permalink / raw) To: mailing list for ConTeXt users > Am 2010-10-07 um 12:54 schrieb Florian Wobbe: > >> On Oct 7, 2010, at 12:19 , Henning Hraban Ramm wrote: >> >>> Am 2010-10-07 um 11:06 schrieb Taco Hoekwater: >>>>> Of course, prd_paket.tex is my input file. But that's there. >>>> >>>> Your shell quotes were off. It is looking for >>>> >>>> "./prd_paket --batchmode --once.tex" >>> >>> Ok, but it doesn't work with any other call of luatex - I also tried to start another shell script that calls luatex, but it hangs in the same manner. If I kill the luatex process, further commands work. >> >> could you send me the calling shell script along with all necessary files to run the context batch? or supply a minimal example instead of prd_paket.tex. > > Hi Florian, > > it doesn't depend on the tex file, it's the same with > > \starttext > Hello World! > \stoptext > > It also doesn't depend on context options (--batchmode etc.) > > And it doesn't seem to depend on the way of calling it from Python/Django: > - directly with subprocess.Popen (several options), subprocess.call, subprocess.check_call > - indirectly via shell script (that contains just the context call) > - with context or mtxrun (didn't try texlua directly yet) > - with setuptex or setting TEXROOT and TEXMFOS directly (in the environment for the subprocess call) > > I can imagine that it has something to do with SElinux settings, didn't dive in that yet. > > I can call context manually as the same user that's running the server process with all the options. > > It also works on my test system (osx-intel) with Django's dev server, just not on my Ubuntu server (linux-64). Well, remote sensing with computers is cumbersome and as I haven't got a clue what happens on your machine I'd rather see your the shell script. How is this script intended to be called: as a subshell from the prompt, as a cron job in the background, ...? I've got Ubunto and OSX here and could try to reproduce the error for you, if you post your script. A shell script with just these 4 lines #!/bin/bash cd $HOME/context/tests export PATH=$PATH:$HOME/applic/context/tex/texmf-linux-64/bin context --batchmode test.tex works as expected on Ubunto 2.6.32-24-server x86_64 with an almost empty environment (none of the TEX* variables set). You just have to set the path to context - nothing else is necessary. As for the environment variables set: you can test for that in the script via 'env' and redirect the output to a file. Cheers, 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-07 16:32 ` Florian Wobbe @ 2010-10-08 7:36 ` Henning Hraban Ramm 2010-10-08 7:59 ` Florian Wobbe 0 siblings, 1 reply; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-08 7:36 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2010-10-07 um 18:32 schrieb Florian Wobbe: > Well, remote sensing with computers is cumbersome and as I haven't > got a clue what happens on your machine I'd rather see your the > shell script. Don't keep fixed on that shell script - it was only one of many failed attempts. "context" itself is only a shell script that calls mtxrun. It doesn't matter how I call ConTeXt from the server process - it hangs at texlua. > How is this script intended to be called: as a subshell from the > prompt, as a cron job in the background, ...? At the end I want to run it via Celery/RabbitMQ (an AMQP message queue), but since that's another complication, I tried first to run it directly from my Django view (in other framework's talk that's the controller). > I've got Ubunto and OSX here and could try to reproduce the error > for you, if you post your script. Thank you, but the problem is most probably something in my server setup that doesn't fit something in LuaTeX. As I mentioned: I got no problems calling TeX directly, just from the server process. > A shell script with just these 4 lines > > #!/bin/bash > cd $HOME/context/tests > export PATH=$PATH:$HOME/applic/context/tex/texmf-linux-64/bin > context --batchmode test.tex > > works as expected on Ubunto 2.6.32-24-server x86_64 with an almost > empty environment (none of the TEX* variables set). You just have to > set the path to context - nothing else is necessary. > As for the environment variables set: you can test for that in the > script via 'env' and redirect the output to a file. Guess what I tested before complaining. I redirect the whole process output to a log file, unfortunately I catch no message from TeX whatsoever, e.g. with "set && date && context hello" I get the env settings and the date, but no message from context. I'll write a summary. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-08 7:36 ` Henning Hraban Ramm @ 2010-10-08 7:59 ` Florian Wobbe 2010-10-08 8:43 ` Henning Hraban Ramm 0 siblings, 1 reply; 46+ messages in thread From: Florian Wobbe @ 2010-10-08 7:59 UTC (permalink / raw) To: mailing list for ConTeXt users On Oct 8, 2010, at 09:36 , Henning Hraban Ramm wrote: >> I've got Ubunto and OSX here and could try to reproduce the error for you, if you post your script. > > Thank you, but the problem is most probably something in my server setup that doesn't fit something in LuaTeX. > As I mentioned: I got no problems calling TeX directly, just from the server process. All right. I have one more suggestion. If you don't want to dive into debugging via gdb you should try another attempt at strace. Previously you posted a tracedump of context. But it only shows context (the shell script) waiting and nothing related to luatex. You may want to make strace follow forks (-f). 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-08 7:59 ` Florian Wobbe @ 2010-10-08 8:43 ` Henning Hraban Ramm 2010-10-08 9:25 ` Florian Wobbe 0 siblings, 1 reply; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-08 8:43 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2010-10-08 um 09:59 schrieb Florian Wobbe: >> Thank you, but the problem is most probably something in my server >> setup that doesn't fit something in LuaTeX. >> As I mentioned: I got no problems calling TeX directly, just from >> the server process. > > All right. I have one more suggestion. If you don't want to dive > into debugging via gdb you should try another attempt at strace. > Previously you posted a tracedump of context. But it only shows > context (the shell script) waiting and nothing related to luatex. > You may want to make strace follow forks (-f). Sorry, I've no experience using strace. Here we are: This is how my process tree looked: 14025 ? Sl 0:01 | \_ /var/www/xxx/bin/python /var/ www/xxx/.../manage.py runfcgi ... 14116 ? S 0:00 | \_ /bin/sh -c set >> _context.log && strace -f context --batchmode --once hello >> _context.log 14117 ? S 0:00 | \_ strace -f context -- batchmode --once hello 14118 ? T 0:00 | \_ /bin/sh /var/opt/ context/tex/texmf-linux-64/bin/context --batchmode --once hello 14119 ? R 0:11 | \_ texlua /var/opt/ context/tex/texmf-linux-64/bin/mtxrun --script context --batchmode -- once hello The logfile was empty, texlua seemed to hang. I killed 14119 and got: execve("/var/opt/context/tex/texmf-linux-64/bin/context", ["context", "--batchmode", "--once", "hello"], [/* 10 vars */]) = 0 brk(0) = 0x8e2e000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b08959ac000 uname({sys="Linux", node="aine.fiee.net", ...}) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b08959ad000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=20573, ...}) = 0 mmap(NULL, 20573, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b08959af000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/libncurses.so.5", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320% \1\0\0\0\0\0@"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=256288, ...}) = 0 mmap(NULL, 2353152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b0895bad000 mprotect(0x2b0895be8000, 2093056, PROT_NONE) = 0 mmap(0x2b0895de7000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_FIXED|MAP_DENYWRITE, 3, 0x3a000) = 0x2b0895de7000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/libdl.so.2", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> \0\1\0\0\0\20\16\0\0\0\0\0\0@"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=14616, ...}) = 0 mmap(NULL, 2109728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b0895dec000 mprotect(0x2b0895dee000, 2097152, PROT_NONE) = 0 mmap(0x2b0895fee000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_DENYWRITE, 3, 0x2000) = 0x2b0895fee000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> \0\1\0\0\0\300\342\1\0\0\0\0\0@"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1375536, ...}) = 0 mmap(NULL, 3482232, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b0895ff0000 mprotect(0x2b089613a000, 2093056, PROT_NONE) = 0 mmap(0x2b0896339000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_FIXED|MAP_DENYWRITE, 3, 0x149000) = 0x2b0896339000 mmap(0x2b089633e000, 17016, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b089633e000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b0896343000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b0896344000 arch_prctl(ARCH_SET_FS, 0x2b0896343af0) = 0 mprotect(0x2b0896339000, 12288, PROT_READ) = 0 munmap(0x2b08959af000, 20573) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 open("/dev/tty", O_RDWR|O_NONBLOCK) = -1 ENXIO (No such device or address) ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffd5440e70) = -1 EINVAL (Invalid argument) brk(0) = 0x8e2e000 brk(0x8e2f000) = 0x8e2f000 brk(0x8e30000) = 0x8e30000 getuid() = 1005 getgid() = 1006 geteuid() = 1005 getegid() = 1006 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 brk(0x8e31000) = 0x8e31000 open("/proc/meminfo", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b08959af000 read(3, "MemTotal: 2097152 kB\nMemFree"..., 4096) = 771 close(3) = 0 munmap(0x2b08959af000, 4096) = 0 brk(0x8e32000) = 0x8e32000 rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0 uname({sys="Linux", node="aine.fiee.net", ...}) = 0 stat("/var/www/xxx/_textemp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 getpid() = 14118 getppid() = 14117 brk(0x8e33000) = 0x8e33000 socket(PF_FILE, SOCK_STREAM, 0) = 3 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = 0 sendto(3, "\2\0\0\0\v\0\0\0\7\0\0\0passwd\0"..., 19, MSG_NOSIGNAL, NULL, 0) = 19 poll([{fd=3, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=3, revents=POLLIN|POLLHUP}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(2)=[{"passwd\0"..., 7}, {"\270O \3\0\0\0\0\0"..., 8}], msg_controllen=24, {cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, {4}}, msg_flags=0}, MSG_CMSG_CLOEXEC) = 15 mmap(NULL, 217016, PROT_READ, MAP_SHARED, 4, 0) = 0x2b08959af000 close(4) = 0 close(3) = 0 brk(0x8e34000) = 0x8e34000 getpgrp() = 29995 rt_sigaction(SIGCHLD, {0x439730, [], SA_RESTORER, 0x2b0896021f60}, {SIG_DFL}, 8) = 0 getrlimit(RLIMIT_NPROC, {rlim_cur=582*1024, rlim_max=582*1024}) = 0 brk(0x8e35000) = 0x8e35000 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 open("/var/opt/context/tex/texmf-linux-64/bin/context", O_RDONLY) = 3 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffd5440ee0) = -1 ENOTTY (Inappropriate ioctl for device) lseek(3, 0, SEEK_CUR) = 0 read(3, "#!/bin/sh\nmtxrun --script context"..., 80) = 39 lseek(3, 0, SEEK_SET) = 0 getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0 dup2(3, 255) = 255 close(3) = 0 fcntl(255, F_SETFD, FD_CLOEXEC) = 0 fcntl(255, F_GETFL) = 0x8000 (flags O_RDONLY| O_LARGEFILE) fstat(255, {st_mode=S_IFREG|0755, st_size=39, ...}) = 0 lseek(255, 0, SEEK_CUR) = 0 brk(0x8e36000) = 0x8e36000 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 read(255, "#!/bin/sh\nmtxrun --script context"..., 39) = 39 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 brk(0x8e37000) = 0x8e37000 stat(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat("/var/opt/context/tex/texmf-linux-64/bin/mtxrun", {st_mode=S_IFREG|0755, st_size=428842, ...}) = 0 open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 3 read(3, "65536\n"..., 31) = 6 close(3) = 0 brk(0x8eb7000) = 0x8eb7000 getgroups(65536, [1006]) = 1 stat("/var/opt/context/tex/texmf-linux-64/bin/mtxrun", {st_mode=S_IFREG|0755, st_size=428842, ...}) = 0 brk(0x8eb8000) = 0x8eb8000 rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0 clone(Process 14119 attached (waiting for parent) Process 14119 resumed (parent 14118 ready) child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2b0896343b80) = 14119 [pid 14119] close(255 <unfinished ...> [pid 14118] rt_sigprocmask(SIG_SETMASK, [], <unfinished ...> [pid 14119] <... close resumed> ) = 0 [pid 14118] <... rt_sigprocmask resumed> NULL, 8) = 0 [pid 14119] rt_sigprocmask(SIG_SETMASK, [], <unfinished ...> [pid 14118] rt_sigprocmask(SIG_BLOCK, [CHLD], <unfinished ...> [pid 14119] <... rt_sigprocmask resumed> NULL, 8) = 0 [pid 14118] <... rt_sigprocmask resumed> [], 8) = 0 [pid 14119] rt_sigaction(SIGTSTP, {SIG_DFL}, <unfinished ...> [pid 14118] rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 [pid 14118] rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 [pid 14118] rt_sigaction(SIGINT, {0x43a340, [], SA_RESTORER, 0x2b0896021f60}, {SIG_DFL}, 8) = 0 [pid 14118] wait4(-1, Process 14118 suspended <unfinished ...> [pid 14119] <... rt_sigaction resumed> {SIG_DFL}, 8) = 0 [pid 14119] rt_sigaction(SIGTTIN, {SIG_DFL}, {SIG_DFL}, 8) = 0 [pid 14119] rt_sigaction(SIGTTOU, {SIG_DFL}, {SIG_DFL}, 8) = 0 [pid 14119] rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0 [pid 14119] rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_IGN}, 8) = 0 [pid 14119] rt_sigaction(SIGCHLD, {SIG_DFL}, {0x439730, [], SA_RESTORER, 0x2b0896021f60}, 8) = 0 [pid 14119] execve("/var/opt/context/tex/texmf-linux-64/bin/mtxrun", ["mtxrun", "--script", "context", "--batchmode", "--once", "hello"], [/ * 10 vars */]) = 0 [pid 14119] brk(0) = 0x14a3b000 [pid 14119] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2ab674fdb000 [pid 14119] uname({sys="Linux", node="aine.fiee.net", ...}) = 0 [pid 14119] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) [pid 14119] mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2ab674fdc000 [pid 14119] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) [pid 14119] open("/etc/ld.so.cache", O_RDONLY) = 3 [pid 14119] fstat(3, {st_mode=S_IFREG|0644, st_size=20573, ...}) = 0 [pid 14119] mmap(NULL, 20573, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2ab674fde000 [pid 14119] close(3) = 0 [pid 14119] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) [pid 14119] open("/lib/libc.so.6", O_RDONLY) = 3 [pid 14119] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> \0\1\0\0\0\300\342\1\0\0\0\0\0@"..., 832) = 832 [pid 14119] fstat(3, {st_mode=S_IFREG|0755, st_size=1375536, ...}) = 0 [pid 14119] mmap(NULL, 3482232, PROT_READ|PROT_EXEC, MAP_PRIVATE| MAP_DENYWRITE, 3, 0) = 0x2ab6751dc000 [pid 14119] mprotect(0x2ab675326000, 2093056, PROT_NONE) = 0 [pid 14119] mmap(0x2ab675525000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x149000) = 0x2ab675525000 [pid 14119] mmap(0x2ab67552a000, 17016, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ab67552a000 [pid 14119] close(3) = 0 [pid 14119] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2ab67552f000 [pid 14119] arch_prctl(ARCH_SET_FS, 0x2ab67552f6e0) = 0 [pid 14119] mprotect(0x2ab675525000, 12288, PROT_READ) = 0 [pid 14119] munmap(0x2ab674fde000, 20573) = 0 [pid 14119] brk(0) = 0x14a3b000 [pid 14119] brk(0x14a5c000) = 0x14a5c000 [pid 14119] execve("/var/opt/context/tex/texmf-linux-64/bin/texlua", ["texlua", "/var/opt/context/tex/texmf-linux"..., "--script", "context", "--batchmode", "--once", "hello"], [/* 10 vars */]) = 0 [pid 14119] brk(0) = 0xa7bf000 [pid 14119] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2b76c18c6000 [pid 14119] uname({sys="Linux", node="aine.fiee.net", ...}) = 0 [pid 14119] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) [pid 14119] mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2b76c18c7000 [pid 14119] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) [pid 14119] open("/etc/ld.so.cache", O_RDONLY) = 3 [pid 14119] fstat(3, {st_mode=S_IFREG|0644, st_size=20573, ...}) = 0 [pid 14119] mmap(NULL, 20573, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b76c18c9000 [pid 14119] close(3) = 0 [pid 14119] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) [pid 14119] open("/lib/libdl.so.2", O_RDONLY) = 3 [pid 14119] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> \0\1\0\0\0\20\16\0\0\0\0\0\0@"..., 832) = 832 [pid 14119] fstat(3, {st_mode=S_IFREG|0644, st_size=14616, ...}) = 0 [pid 14119] mmap(NULL, 2109728, PROT_READ|PROT_EXEC, MAP_PRIVATE| MAP_DENYWRITE, 3, 0) = 0x2b76c1ac7000 [pid 14119] mprotect(0x2b76c1ac9000, 2097152, PROT_NONE) = 0 [pid 14119] mmap(0x2b76c1cc9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x2b76c1cc9000 [pid 14119] close(3) = 0 [pid 14119] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) [pid 14119] open("/lib/libm.so.6", O_RDONLY) = 3 [pid 14119] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P> \0\0\0\0\0\0@"..., 832) = 832 [pid 14119] fstat(3, {st_mode=S_IFREG|0644, st_size=534736, ...}) = 0 [pid 14119] mmap(NULL, 2629848, PROT_READ|PROT_EXEC, MAP_PRIVATE| MAP_DENYWRITE, 3, 0) = 0x2b76c1ccb000 [pid 14119] mprotect(0x2b76c1d4d000, 2093056, PROT_NONE) = 0 [pid 14119] mmap(0x2b76c1f4c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x81000) = 0x2b76c1f4c000 [pid 14119] close(3) = 0 [pid 14119] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) [pid 14119] open("/lib/libc.so.6", O_RDONLY) = 3 [pid 14119] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> \0\1\0\0\0\300\342\1\0\0\0\0\0@"..., 832) = 832 [pid 14119] fstat(3, {st_mode=S_IFREG|0755, st_size=1375536, ...}) = 0 [pid 14119] mmap(NULL, 3482232, PROT_READ|PROT_EXEC, MAP_PRIVATE| MAP_DENYWRITE, 3, 0) = 0x2b76c1f4e000 [pid 14119] mprotect(0x2b76c2098000, 2093056, PROT_NONE) = 0 [pid 14119] mmap(0x2b76c2297000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x149000) = 0x2b76c2297000 [pid 14119] mmap(0x2b76c229c000, 17016, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b76c229c000 [pid 14119] close(3) = 0 [pid 14119] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2b76c22a1000 [pid 14119] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2b76c22a2000 [pid 14119] arch_prctl(ARCH_SET_FS, 0x2b76c22a1b10) = 0 [pid 14119] mprotect(0x2b76c2297000, 12288, PROT_READ) = 0 [pid 14119] mprotect(0xab0000, 8192, PROT_READ) = 0 [pid 14119] munmap(0x2b76c18c9000, 20573) = 0 [pid 14119] brk(0) = 0xa7bf000 [pid 14119] brk(0xa7e0000) = 0xa7e0000 [pid 14119] rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 [pid 14119] brk(0xa801000) = 0xa801000 [pid 14119] brk(0xa822000) = 0xa822000 [pid 14119] brk(0xa843000) = 0xa843000 [pid 14119] brk(0xa864000) = 0xa864000 [pid 14119] stat("/var/opt/context/tex/texmf-linux-64/bin/texlua", {st_mode=S_IFREG|0755, st_size=5371656, ...}) = 0 [pid 14119] lstat("/var", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 14119] lstat("/var/opt", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 14119] lstat("/var/opt/context", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 14119] lstat("/var/opt/context/tex", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 14119] lstat("/var/opt/context/tex/texmf-linux-64", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 14119] lstat("/var/opt/context/tex/texmf-linux-64/bin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 14119] lstat("/var/opt/context/tex/texmf-linux-64/bin/texlua", {st_mode=S_IFLNK|0777, st_size=6, ...}) = 0 [pid 14119] readlink("/var/opt/context/tex/texmf-linux-64/bin/texlua", "luatex"..., 2048) = 6 [pid 14119] lstat("/var/opt/context/tex/texmf-linux-64/bin/luatex", {st_mode=S_IFREG|0755, st_size=5371656, ...}) = 0 [pid 14119] stat("/var/opt/context/tex/texmf-linux-64/bin/mtxrun", {st_mode=S_IFREG|0755, st_size=428842, ...}) = 0 [pid 14119] open("/var/opt/context/tex/texmf-linux-64/bin/mtxrun", O_RDONLY) = 3 [pid 14119] close(3) = 0 [pid 14119] open("/var/opt/context/tex/texmf-linux-64/bin/mtxrun", O_RDONLY) = 3 [pid 14119] fstat(3, {st_mode=S_IFREG|0755, st_size=428842, ...}) = 0 [pid 14119] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2b76c18c9000 [pid 14119] read(3, "#!/usr/bin/env texlua\n\nif not mod"..., 4096) = 4096 [pid 14119] read(3, "tion nextchar(str, index)\n "..., 4096) = 4096 [pid 14119] read(3, "erns.hexadecimal = P(\"0x\") * R("..., 4096) = 4096 [pid 14119] brk(0xa885000) = 0xa885000 [pid 14119] read(3, " return s\n else\n "..., 4096) = 4096 [pid 14119] read(3, "kind = (kind == 2 and 3) or 1\n "..., 4096) = 4096 [pid 14119] read(3, "t do -- no ipairs here\n if"..., 4096) = 4096 [pid 14119] read(3, " do_serializ"..., 4096) = 4096 [pid 14119] read(3, "at(st,\", \")))\n "..., 4096) = 4096 [pid 14119] read(3, "otes,hexify)\n serialize(root,n"..., 4096) = 4096 [pid 14119] read(3, "at(tt,seperator or \" \")\nend\n\nfunc"..., 4096) = 4096 [pid 14119] read(3, "], f\n else\n return nil,"..., 4096) = 4096 [pid 14119] brk(0xa8a6000) = 0xa8a6000 [pid 14119] read(3, "ocal tabs = { }\nlocal concat = "..., 4096) = 4096 [pid 14119] read(3, "parator, io.pathseparator, os.typ"..., 4096) = 4096 [pid 14119] read(3, " clue what kind of OSX you're run"..., 4096) = 4096 [pid 14119] read(3, "^.+[/\\\\](.-)$\") or name\nend\n\nloca"..., 4096) = 4096 [pid 14119] read(3, "nd\n if n < 1 then\n "..., 4096) = 4096 [pid 14119] read(3, " = \"Hans Hagen, PRAGMA-ADE, Ha"..., 4096) = 4096 [pid 14119] brk(0xa8c7000) = 0xa8c7000 [pid 14119] read(3, ")\",\"%1:\"))) or filename\nend\n\nfunc"..., 4096) = 4096 [pid 14119] read(3, " = root .. path\n l"..., 4096) = 4096 [pid 14119] read(3, " function dir.expandname(str) -- "..., 4096) = 4096 [pid 14119] read(3, "lib.mkiv\",\n author = \"Hans "..., 4096) = 4096 [pid 14119] read(3, "ult+1] = concat(tmp)\n "..., 4096) = 4096 [pid 14119] read(3, "ies.report(\"merge: inserting %s\","..., 4096) = 4096 [pid 14119] brk(0xa8f0000) = 0xa8f0000 [pid 14119] read(3, "AGMA ADE / ConTeXt Development Te"..., 4096) = 4096 [pid 14119] read(3, " t[#t+1] = key .. '"..., 4096) = 4096 [pid 14119] read(3, " = P(\".\")\nlocal zero "..., 4096) = 4096 [pid 14119] read(3, "nt in next, counters do\n i"..., 4096) = 4096 [pid 14119] read(3, "hen\n local stoptime = "..., 4096) = 4096 [pid 14119] read(3, "ompanion to luat-lib.mkiv\",\n a"..., 4096) = 4096 [pid 14119] read(3, "default -- can be set from cnf fi"..., 4096) = 4096 [pid 14119] read(3, "riments.enable(...)\n report(\"e"..., 4096) = 4096 [pid 14119] brk(0xa911000) = 0xa911000 [pid 14119] read(3, "eded but saves checking when we g"..., 4096) = 4096 [pid 14119] read(3, "s.report(line)\n end\nend\n\nfunct"..., 4096) = 4096 [pid 14119] read(3, " if not m then\n m = { }\n "..., 4096) = 4096 [pid 14119] read(3, "g[ 0] = arg[2]\n for k=3,#arg d"..., 4096) = 4096 [pid 14119] read(3, "\nend\n\nif arg then\n\n -- new, re"..., 4096) = 4096 [pid 14119] read(3, "name)\n end\n els"..., 4096) = 4096 [pid 14119] brk(0xa932000) = 0xa932000 [pid 14119] read(3, "ot that down to less 7.3 seconds."..., 4096) = 4096 [pid 14119] read(3, "file: \" .. gsub(txt,\"([ \\n\\r\\t]*)"..., 4096) = 4096 [pid 14119] read(3, "resolved entity &%s; -> %s (inter"..., 4096) = 4096 [pid 14119] read(3, "ttributevalue) / add_attribute\n--"..., 4096) = 4096 [pid 14119] read(3, "tion)^0 * V(\"parent\") * trailer,\n"..., 4096) = 4096 [pid 14119] read(3, "n='lpeg'/> from a filehandle so w"..., 4096) = 4096 [pid 14119] read(3, "i=1,#edt do\n local"..., 4096) = 4096 [pid 14119] read(3, " move to lxml-xml\n\nlocal result\n\n"..., 4096) = 4096 [pid 14119] read(3, "nd v.special and v.tg == \"@pi@\" t"..., 4096) = 4096 [pid 14119] read(3, "elative to current\n-- a|b|c : s"..., 4096) = 4096 [pid 14119] brk(0xa953000) = 0xa953000 [pid 14119] read(3, " p = ll.__p__\n local d = p"..., 4096) = 4096 [pid 14119] read(3, " collect"..., 4096) = 4096 [pid 14119] read(3, " Cc(\"')\")\nlocal lp_number = S(\"+"..., 4096) = 4096 [pid 14119] read(3, "-child\" } -- , apply = "..., 4096) = 4096 [pid 14119] read(3, "= (P(\"***/\") + P(\"/\")) * Cc(regi"..., 4096) = 4096 [pid 14119] read(3, " if type(parsed) == \"string\" the"..., 4096) = 4096 [pid 14119] read(3, " collected = apply_axis[pi.ax"..., 4096) = 4096 [pid 14119] read(3, "== 0 then\n return -- somet"..., 4096) = 4096 [pid 14119] brk(0xa974000) = 0xa974000 [pid 14119] read(3, " false\n n = tonumber(n) or"..., 4096) = 4096 [pid 14119] read(3, " local s = match(dkm,\"\\n(%s+"..., 4096) = 4096 [pid 14119] read(3, " end\nend\n\nfunction xml.each(roo"..., 4096) = 4096 [pid 14119] read(3, "cal d, k, rri = r.dt, e.ni, r.ri\n"..., 4096) = 4096 [pid 14119] read(3, "]\n if type(str) ~="..., 4096) = 4096 [pid 14119] read(3, "= xml.insertafter\nxml.insert_elem"..., 4096) = 4096 [pid 14119] read(3, " local e = collection[c]\n "..., 4096) = 4096 [pid 14119] read(3, " return next(t) and t or nil\nend\n"..., 4096) = 4096 [pid 14119] brk(0xa995000) = 0xa995000 [pid 14119] brk(0xa9b6000) = 0xa9b6000 [pid 14119] read(3, " currentdir function\n "..., 4096) = 4096 [pid 14119] read(3, "(\"resolvers.expansions\", function"..., 4096) = 4096 [pid 14119] read(3, "turn newlist\nend\n\n-- We also put "..., 4096) = 4096 [pid 14119] read(3, " dirs[#dirs+1] = p"..., 4096) = 4096 [pid 14119] read(3, "ats['base'] "..., 4096) = 4096 [pid 14119] read(3, " is somewhat dangerous, we want t"..., 4096) = 4096 [pid 14119] read(3, "ache(\"created: %s\",cachepath)\n "..., 4096) = 4096 [pid 14119] read(3, "itable,...)\n else\n "..., 4096) = 4096 [pid 14119] read(3, "m-%d\"),\n time = os.date"..., 4096) = 4096 [pid 14119] read(3, "ile.dirname, file.basename, file."..., 4096) = 4096 [pid 14119] read(3, "alue and value ~= \"\" then\n "..., 4096) = 4096 [pid 14119] read(3, " end\n "..., 4096) = 4096 [pid 14119] read(3, " instance.files[tag] = { }\n"..., 4096) = 4096 [pid 14119] read(3, " if vv ~= \"\" and not h[vv]"..., 4096) = 4096 [pid 14119] brk(0xa9d7000) = 0xa9d7000 [pid 14119] read(3, "e[ps] then\n ep"..., 4096) = 4096 [pid 14119] read(3, " if not blobfile then\n "..., 4096) = 4096 [pid 14119] read(3, " local forcedname, ok, suffix = \""..., 4096) = 4096 [pid 14119] read(3, "rt_resolvers(\"forcing filetype '%"..., 4096) = 4096 [pid 14119] read(3, "esolvers(\"match to '%s' in hash f"..., 4096) = 4096 [pid 14119] read(3, " bname = files[rname]\n "..., 4096) = 4096 [pid 14119] read(3, " local result = command(file"..., 4096) = 4096 [pid 14119] read(3, "bsolete.find_file = resolvers.fi"..., 4096) = 4096 [pid 14119] read(3, "limit\n\nif not modules then module"..., 4096) = 4096 [pid 14119] read(3, " shared = data.unique, data.share"..., 4096) = 4096 [pid 14119] brk(0xa9f8000) = 0xa9f8000 [pid 14119] read(3, " end\n else\n"..., 4096) = 4096 [pid 14119] read(3, " report_resolvers(\"zip fin"..., 4096) = 4096 [pid 14119] read(3, "\n filter = format(\"^%s/(.+"..., 4096) = 4096 [pid 14119] read(3, "solvers.finders, resolvers.opener"..., 4096) = 4096 [pid 14119] read(3, "olvers(\"! locating '%s'\",name)\n "..., 4096) = 4096 [pid 14119] read(3, "resolvers.cleanpath(oldname)\n "..., 4096) = 4096 [pid 14119] read(3, "olvers = resolvers\n\nlocal functio"..., 4096) = 4096 [pid 14119] read(3, " else\n re"..., 4096) = 4096 [pid 14119] read(3, "os.platform == \"unix\" and \"\\\\\\\\\" "..., 4096) = 4096 [pid 14119] read(3, " .. \"/../../../texmf-dist/tex/con"..., 4096) = 4096 [pid 14119] brk(0xaa19000) = 0xaa19000 [pid 14119] read(3, "tions = {\n [\"lua\"] = \"luatex -"..., 4096) = 4096 [pid 14119] read(3, "ormat\n local path, nam"..., 4096) = 4096 [pid 14119] read(3, "mpleline()\n logs.simpl"..., 4096) = 4096 [pid 14119] read(3, "\n end\n end\nend\n\nfunctio"..., 4096) = 4096 [pid 14119] read(3, "te but only if --autogenerate\n "..., 4096) = 4096 [pid 14119] read(3, "his script\n-- ... later we will u"..., 4096) = 4096 [pid 14119] read(3, "xecute\") then\n\n -- execute scr"..., 4096) = 4096 [pid 14119] read(3, "guments_after)\n resolvers.dowi"..., 4096) = 2858 [pid 14119] read(3, ""..., 4096) = 0 [pid 14119] close(3) = 0 [pid 14119] munmap(0x2b76c18c9000, 4096) = 0 [pid 14119] brk(0xaa3c000) = 0xaa3c000 [pid 14119] brk(0xaa5f000) = 0xaa5f000 [pid 14119] brk(0xaa82000) = 0xaa82000 [pid 14119] brk(0xaaa3000) = 0xaaa3000 [pid 14119] uname({sys="Linux", node="aine.fiee.net", ...}) = 0 [pid 14119] --- SIGTERM (Terminated) @ 0 (0) --- Process 14118 resumed Process 14119 detached <... wait4 resumed> [{WIFSIGNALED(s) && WTERMSIG(s) == SIGTERM}], 0, NULL) = 14119 write(2, "/var/opt/context/tex/texmf-linux-"..., 116/var/opt/context/ tex/texmf-linux-64/bin/context: line 2: 14119 Terminated mtxrun --script context "$@" ) = 116 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 --- SIGCHLD (Child exited) @ 0 (0) --- wait4(-1, 0x7fffd5440bd4, WNOHANG, NULL) = -1 ECHILD (No child processes) rt_sigreturn(0x8) = 0 rt_sigaction(SIGINT, {SIG_DFL}, {0x43a340, [], SA_RESTORER, 0x2b0896021f60}, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 read(255, ""..., 39) = 0 exit_group(143) = ? Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-08 8:43 ` Henning Hraban Ramm @ 2010-10-08 9:25 ` Florian Wobbe 2010-10-08 10:00 ` Henning Hraban Ramm 0 siblings, 1 reply; 46+ messages in thread From: Florian Wobbe @ 2010-10-08 9:25 UTC (permalink / raw) To: mailing list for ConTeXt users > Am 2010-10-08 um 09:59 schrieb Florian Wobbe: > >>> Thank you, but the problem is most probably something in my server setup that doesn't fit something in LuaTeX. >>> As I mentioned: I got no problems calling TeX directly, just from the server process. >> >> All right. I have one more suggestion. If you don't want to dive into debugging via gdb you should try another attempt at strace. Previously you posted a tracedump of context. But it only shows context (the shell script) waiting and nothing related to luatex. You may want to make strace follow forks (-f). > > > Sorry, I've no experience using strace. Some things are explained here: http://blog.ksplice.com/tag/unix/ > Here we are: > > This is how my process tree looked: > 14025 ? Sl 0:01 | \_ /var/www/xxx/bin/python /var/www/xxx/.../manage.py runfcgi ... > 14116 ? S 0:00 | \_ /bin/sh -c set >> _context.log && strace -f context --batchmode --once hello >> _context.log > 14117 ? S 0:00 | \_ strace -f context --batchmode --once hello > 14118 ? T 0:00 | \_ /bin/sh /var/opt/context/tex/texmf-linux-64/bin/context --batchmode --once hello > 14119 ? R 0:11 | \_ texlua /var/opt/context/tex/texmf-linux-64/bin/mtxrun --script context --batchmode --once hello > > The logfile was empty, texlua seemed to hang. I killed 14119 and got: > [...] > [pid 14119] brk(0xaa3c000) = 0xaa3c000 > [pid 14119] brk(0xaa5f000) = 0xaa5f000 > [pid 14119] brk(0xaa82000) = 0xaa82000 > [pid 14119] brk(0xaaa3000) = 0xaaa3000 > [pid 14119] uname({sys="Linux", node="aine.fiee.net", ...}) = 0 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? Next you could do strace -ff -o ctxtrace mtxrun --script context --batchmode --once hello This gives you hopefully four ctxtrace.<pid> files. 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. 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-08 9:25 ` Florian Wobbe @ 2010-10-08 10:00 ` Henning Hraban Ramm 2010-10-08 11:46 ` Florian Wobbe 0 siblings, 1 reply; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-08 10:00 UTC (permalink / raw) To: mailing list for ConTeXt users 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 > 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) After killing my log file is empty. The ctxtrace file says: execve("/var/opt/context/tex/texmf-linux-64/bin/mtxrun", ["mtxrun", "-- script", "context", "--batchmode", "--once", "hello"], [/* 10 vars */]) = 0 brk(0) = 0xe092000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b782d964000 uname({sys="Linux", node="aine.fiee.net", ...}) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b782d965000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=20573, ...}) = 0 mmap(NULL, 20573, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b782d967000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> \0\1\0\0\0\300\342\1\0\0\0\0\0@"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1375536, ...}) = 0 mmap(NULL, 3482232, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b782db65000 mprotect(0x2b782dcaf000, 2093056, PROT_NONE) = 0 mmap(0x2b782deae000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_FIXED|MAP_DENYWRITE, 3, 0x149000) = 0x2b782deae000 mmap(0x2b782deb3000, 17016, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b782deb3000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b782deb8000 arch_prctl(ARCH_SET_FS, 0x2b782deb86e0) = 0 mprotect(0x2b782deae000, 12288, PROT_READ) = 0 munmap(0x2b782d967000, 20573) = 0 brk(0) = 0xe092000 brk(0xe0b3000) = 0xe0b3000 execve("/var/opt/context/tex/texmf-linux-64/bin/texlua", ["texlua", "/ var/opt/context/tex/texmf-linux"..., "--script", "context", "-- batchmode", "--once", "hello"], [/* 10 vars */]) = 0 brk(0) = 0x1c0fd000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2acfe2773000 uname({sys="Linux", node="aine.fiee.net", ...}) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2acfe2774000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=20573, ...}) = 0 mmap(NULL, 20573, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2acfe2776000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/libdl.so.2", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> \0\1\0\0\0\20\16\0\0\0\0\0\0@"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=14616, ...}) = 0 mmap(NULL, 2109728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2acfe2974000 mprotect(0x2acfe2976000, 2097152, PROT_NONE) = 0 mmap(0x2acfe2b76000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_DENYWRITE, 3, 0x2000) = 0x2acfe2b76000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/libm.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P> \0\0\0\0\0\0@"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=534736, ...}) = 0 mmap(NULL, 2629848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2acfe2b78000 mprotect(0x2acfe2bfa000, 2093056, PROT_NONE) = 0 mmap(0x2acfe2df9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_DENYWRITE, 3, 0x81000) = 0x2acfe2df9000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> \0\1\0\0\0\300\342\1\0\0\0\0\0@"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1375536, ...}) = 0 mmap(NULL, 3482232, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2acfe2dfb000 mprotect(0x2acfe2f45000, 2093056, PROT_NONE) = 0 mmap(0x2acfe3144000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_FIXED|MAP_DENYWRITE, 3, 0x149000) = 0x2acfe3144000 mmap(0x2acfe3149000, 17016, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2acfe3149000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2acfe314e000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2acfe314f000 arch_prctl(ARCH_SET_FS, 0x2acfe314eb10) = 0 mprotect(0x2acfe3144000, 12288, PROT_READ) = 0 mprotect(0xab0000, 8192, PROT_READ) = 0 munmap(0x2acfe2776000, 20573) = 0 brk(0) = 0x1c0fd000 brk(0x1c11e000) = 0x1c11e000 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 brk(0x1c13f000) = 0x1c13f000 brk(0x1c160000) = 0x1c160000 brk(0x1c181000) = 0x1c181000 brk(0x1c1a2000) = 0x1c1a2000 stat("/var/opt/context/tex/texmf-linux-64/bin/texlua", {st_mode=S_IFREG|0755, st_size=5371656, ...}) = 0 lstat("/var", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/var/opt", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/var/opt/context", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/var/opt/context/tex", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/var/opt/context/tex/texmf-linux-64", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/var/opt/context/tex/texmf-linux-64/bin", {st_mode=S_IFDIR| 0755, st_size=4096, ...}) = 0 lstat("/var/opt/context/tex/texmf-linux-64/bin/texlua", {st_mode=S_IFLNK|0777, st_size=6, ...}) = 0 readlink("/var/opt/context/tex/texmf-linux-64/bin/texlua", "luatex"..., 2048) = 6 lstat("/var/opt/context/tex/texmf-linux-64/bin/luatex", {st_mode=S_IFREG|0755, st_size=5371656, ...}) = 0 stat("/var/opt/context/tex/texmf-linux-64/bin/mtxrun", {st_mode=S_IFREG|0755, st_size=428842, ...}) = 0 open("/var/opt/context/tex/texmf-linux-64/bin/mtxrun", O_RDONLY) = 3 close(3) = 0 open("/var/opt/context/tex/texmf-linux-64/bin/mtxrun", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0755, st_size=428842, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2acfe2776000 read(3, "#!/usr/bin/env texlua\n\nif not mod"..., 4096) = 4096 read(3, "tion nextchar(str, index)\n "..., 4096) = 4096 read(3, "erns.hexadecimal = P(\"0x\") * R("..., 4096) = 4096 brk(0x1c1c3000) = 0x1c1c3000 read(3, " return s\n else\n "..., 4096) = 4096 read(3, "kind = (kind == 2 and 3) or 1\n "..., 4096) = 4096 read(3, "t do -- no ipairs here\n if"..., 4096) = 4096 read(3, " do_serializ"..., 4096) = 4096 read(3, "at(st,\", \")))\n "..., 4096) = 4096 read(3, "otes,hexify)\n serialize(root,n"..., 4096) = 4096 read(3, "at(tt,seperator or \" \")\nend\n\nfunc"..., 4096) = 4096 read(3, "], f\n else\n return nil,"..., 4096) = 4096 brk(0x1c1e4000) = 0x1c1e4000 read(3, "ocal tabs = { }\nlocal concat = "..., 4096) = 4096 read(3, "parator, io.pathseparator, os.typ"..., 4096) = 4096 read(3, " clue what kind of OSX you're run"..., 4096) = 4096 read(3, "^.+[/\\\\](.-)$\") or name\nend\n\nloca"..., 4096) = 4096 read(3, "nd\n if n < 1 then\n "..., 4096) = 4096 read(3, " = \"Hans Hagen, PRAGMA-ADE, Ha"..., 4096) = 4096 brk(0x1c205000) = 0x1c205000 read(3, ")\",\"%1:\"))) or filename\nend\n\nfunc"..., 4096) = 4096 read(3, " = root .. path\n l"..., 4096) = 4096 read(3, " function dir.expandname(str) -- "..., 4096) = 4096 read(3, "lib.mkiv\",\n author = \"Hans "..., 4096) = 4096 read(3, "ult+1] = concat(tmp)\n "..., 4096) = 4096 read(3, "ies.report(\"merge: inserting %s\","..., 4096) = 4096 brk(0x1c22e000) = 0x1c22e000 read(3, "AGMA ADE / ConTeXt Development Te"..., 4096) = 4096 read(3, " t[#t+1] = key .. '"..., 4096) = 4096 read(3, " = P(\".\")\nlocal zero "..., 4096) = 4096 read(3, "nt in next, counters do\n i"..., 4096) = 4096 read(3, "hen\n local stoptime = "..., 4096) = 4096 read(3, "ompanion to luat-lib.mkiv\",\n a"..., 4096) = 4096 read(3, "default -- can be set from cnf fi"..., 4096) = 4096 read(3, "riments.enable(...)\n report(\"e"..., 4096) = 4096 brk(0x1c24f000) = 0x1c24f000 read(3, "eded but saves checking when we g"..., 4096) = 4096 read(3, "s.report(line)\n end\nend\n\nfunct"..., 4096) = 4096 read(3, " if not m then\n m = { }\n "..., 4096) = 4096 read(3, "g[ 0] = arg[2]\n for k=3,#arg d"..., 4096) = 4096 read(3, "\nend\n\nif arg then\n\n -- new, re"..., 4096) = 4096 read(3, "name)\n end\n els"..., 4096) = 4096 brk(0x1c270000) = 0x1c270000 read(3, "ot that down to less 7.3 seconds."..., 4096) = 4096 read(3, "file: \" .. gsub(txt,\"([ \\n\\r\\t]*)"..., 4096) = 4096 read(3, "resolved entity &%s; -> %s (inter"..., 4096) = 4096 read(3, "ttributevalue) / add_attribute\n--"..., 4096) = 4096 read(3, "tion)^0 * V(\"parent\") * trailer,\n"..., 4096) = 4096 read(3, "n='lpeg'/> from a filehandle so w"..., 4096) = 4096 read(3, "i=1,#edt do\n local"..., 4096) = 4096 read(3, " move to lxml-xml\n\nlocal result\n\n"..., 4096) = 4096 read(3, "nd v.special and v.tg == \"@pi@\" t"..., 4096) = 4096 read(3, "elative to current\n-- a|b|c : s"..., 4096) = 4096 brk(0x1c291000) = 0x1c291000 read(3, " p = ll.__p__\n local d = p"..., 4096) = 4096 read(3, " collect"..., 4096) = 4096 read(3, " Cc(\"')\")\nlocal lp_number = S(\"+"..., 4096) = 4096 read(3, "-child\" } -- , apply = "..., 4096) = 4096 read(3, "= (P(\"***/\") + P(\"/\")) * Cc(regi"..., 4096) = 4096 read(3, " if type(parsed) == \"string\" the"..., 4096) = 4096 read(3, " collected = apply_axis[pi.ax"..., 4096) = 4096 read(3, "== 0 then\n return -- somet"..., 4096) = 4096 brk(0x1c2b2000) = 0x1c2b2000 read(3, " false\n n = tonumber(n) or"..., 4096) = 4096 read(3, " local s = match(dkm,\"\\n(%s+"..., 4096) = 4096 read(3, " end\nend\n\nfunction xml.each(roo"..., 4096) = 4096 read(3, "cal d, k, rri = r.dt, e.ni, r.ri\n"..., 4096) = 4096 read(3, "]\n if type(str) ~="..., 4096) = 4096 read(3, "= xml.insertafter\nxml.insert_elem"..., 4096) = 4096 read(3, " local e = collection[c]\n "..., 4096) = 4096 read(3, " return next(t) and t or nil\nend\n"..., 4096) = 4096 brk(0x1c2d3000) = 0x1c2d3000 brk(0x1c2f4000) = 0x1c2f4000 read(3, " currentdir function\n "..., 4096) = 4096 read(3, "(\"resolvers.expansions\", function"..., 4096) = 4096 read(3, "turn newlist\nend\n\n-- We also put "..., 4096) = 4096 read(3, " dirs[#dirs+1] = p"..., 4096) = 4096 read(3, "ats['base'] "..., 4096) = 4096 read(3, " is somewhat dangerous, we want t"..., 4096) = 4096 read(3, "ache(\"created: %s\",cachepath)\n "..., 4096) = 4096 read(3, "itable,...)\n else\n "..., 4096) = 4096 read(3, "m-%d\"),\n time = os.date"..., 4096) = 4096 read(3, "ile.dirname, file.basename, file."..., 4096) = 4096 read(3, "alue and value ~= \"\" then\n "..., 4096) = 4096 read(3, " end\n "..., 4096) = 4096 read(3, " instance.files[tag] = { }\n"..., 4096) = 4096 read(3, " if vv ~= \"\" and not h[vv]"..., 4096) = 4096 brk(0x1c315000) = 0x1c315000 read(3, "e[ps] then\n ep"..., 4096) = 4096 read(3, " if not blobfile then\n "..., 4096) = 4096 read(3, " local forcedname, ok, suffix = \""..., 4096) = 4096 read(3, "rt_resolvers(\"forcing filetype '%"..., 4096) = 4096 read(3, "esolvers(\"match to '%s' in hash f"..., 4096) = 4096 read(3, " bname = files[rname]\n "..., 4096) = 4096 read(3, " local result = command(file"..., 4096) = 4096 read(3, "bsolete.find_file = resolvers.fi"..., 4096) = 4096 read(3, "limit\n\nif not modules then module"..., 4096) = 4096 read(3, " shared = data.unique, data.share"..., 4096) = 4096 brk(0x1c336000) = 0x1c336000 read(3, " end\n else\n"..., 4096) = 4096 read(3, " report_resolvers(\"zip fin"..., 4096) = 4096 read(3, "\n filter = format(\"^%s/(.+"..., 4096) = 4096 read(3, "solvers.finders, resolvers.opener"..., 4096) = 4096 read(3, "olvers(\"! locating '%s'\",name)\n "..., 4096) = 4096 read(3, "resolvers.cleanpath(oldname)\n "..., 4096) = 4096 read(3, "olvers = resolvers\n\nlocal functio"..., 4096) = 4096 read(3, " else\n re"..., 4096) = 4096 read(3, "os.platform == \"unix\" and \"\\\\\\\\\" "..., 4096) = 4096 read(3, " .. \"/../../../texmf-dist/tex/con"..., 4096) = 4096 brk(0x1c357000) = 0x1c357000 read(3, "tions = {\n [\"lua\"] = \"luatex -"..., 4096) = 4096 read(3, "ormat\n local path, nam"..., 4096) = 4096 read(3, "mpleline()\n logs.simpl"..., 4096) = 4096 read(3, "\n end\n end\nend\n\nfunctio"..., 4096) = 4096 read(3, "te but only if --autogenerate\n "..., 4096) = 4096 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 brk(0x1c3e1000) = 0x1c3e1000 uname({sys="Linux", node="aine.fiee.net", ...}) = 0 --- SIGTERM (Terminated) @ 0 (0) --- +++ killed by SIGTERM +++ (I guess I could have shortened some lines, but didn't want to delete something important...) Greetlings, Hraban ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-08 10:00 ` Henning Hraban Ramm @ 2010-10-08 11:46 ` Florian Wobbe 2010-10-08 13:47 ` Henning Hraban Ramm 0 siblings, 1 reply; 46+ messages in thread From: Florian Wobbe @ 2010-10-08 11:46 UTC (permalink / raw) To: mailing list for ConTeXt users 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-08 11:46 ` Florian Wobbe @ 2010-10-08 13:47 ` Henning Hraban Ramm 2010-10-08 13:54 ` luigi scarso 2010-10-08 13:54 ` Taco Hoekwater 0 siblings, 2 replies; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-08 13:47 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2010-10-08 um 13:46 schrieb Florian Wobbe: > Right, so you are not even getting to the point where luatex is > called. This is still texlua executing instructions from mtxrun. >> strace -p 14256 >> attach: ptrace(PTRACE_ATTACH, ...): Operation not permitted >> (as the same user as well as as root) > > Something to do with SElinux? As far as I can tell, SElinux isn't active. (libselinux is installed, but no other selinux package) > Here, uname -m should be called. But I guess you still have all > unames replaced by their return value I guess? Yes, I didn't reinstate the original mtxrun script. >> 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. Probably. > 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. That works: texlua call_uname.lua version #1 SMP Tue Jul 6 14:34:09 MSD 2010 release 2.6.18-028stab070.2 machine x86_64 nodename aine.fiee.net sysname Linux > 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 Now I get the defunct uname again: 16002 15978 TS 21 15:41 ? 00:00:01 \_ /var/www/xxx/bin/ python /var/www/.../manage.py run_gunicorn -c /var/www/.../gunicorn- settings.py 16210 16002 TS 14 15:42 ? 00:00:08 \_ luatex -- interaction=batchmode --fmt=/var/opt/context/tex/texmf-cache/.../ formats/cont-en --lua=/var/opt/context/tex/texmf-cache/... 16212 16210 TS 17 15:42 ? 00:00:00 \_ [uname] <defunct> (Meanwhile I switched from fcgi to gunicorn app server, but that didn't change anything WRT ConTeXt.) I get no log output. BTW: Thank you very much for your patience! I owe you! (And you, Taco, of course, and the others!) Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-08 13:47 ` Henning Hraban Ramm @ 2010-10-08 13:54 ` luigi scarso 2010-10-08 13:54 ` Taco Hoekwater 1 sibling, 0 replies; 46+ messages in thread From: luigi scarso @ 2010-10-08 13:54 UTC (permalink / raw) To: mailing list for ConTeXt users On Fri, Oct 8, 2010 at 3:47 PM, Henning Hraban Ramm <hraban@fiee.net> wrote: > Am 2010-10-08 um 13:46 schrieb Florian Wobbe: >> >> Right, so you are not even getting to the point where luatex is called. >> This is still texlua executing instructions from mtxrun. > >>> strace -p 14256 >>> attach: ptrace(PTRACE_ATTACH, ...): Operation not permitted >>> (as the same user as well as as root) >> >> Something to do with SElinux? > > As far as I can tell, SElinux isn't active. (libselinux is installed, but no > other selinux package) > >> Here, uname -m should be called. But I guess you still have all unames >> replaced by their return value I guess? > > Yes, I didn't reinstate the original mtxrun script. > >>> 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. > > Probably. > >> 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. > > That works: > > texlua call_uname.lua > > version #1 SMP Tue Jul 6 14:34:09 MSD 2010 > release 2.6.18-028stab070.2 > machine x86_64 > nodename aine.fiee.net > sysname Linux > >> 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 > > Now I get the defunct uname again: > > 16002 15978 TS 21 15:41 ? 00:00:01 \_ /var/www/xxx/bin/python > /var/www/.../manage.py run_gunicorn -c /var/www/.../gunicorn-settings.py > 16210 16002 TS 14 15:42 ? 00:00:08 \_ luatex > --interaction=batchmode > --fmt=/var/opt/context/tex/texmf-cache/.../formats/cont-en > --lua=/var/opt/context/tex/texmf-cache/... > 16212 16210 TS 17 15:42 ? 00:00:00 \_ [uname] <defunct> > > (Meanwhile I switched from fcgi to gunicorn app server, but that didn't > change anything WRT ConTeXt.) > > I get no log output. valgrind ? -- luigi ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 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 ` (2 more replies) 1 sibling, 3 replies; 46+ messages in thread From: Taco Hoekwater @ 2010-10-08 13:54 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm On 10/08/2010 03:47 PM, Henning Hraban Ramm wrote: > > 16002 15978 TS 21 15:41 ? 00:00:01 \_ /var/www/xxx/bin/python > /var/www/.../manage.py run_gunicorn -c /var/www/.../gunicorn-settings.py > 16210 16002 TS 14 15:42 ? 00:00:08 \_ luatex --interaction=batchmode > --fmt=/var/opt/context/tex/texmf-cache/.../formats/cont-en > --lua=/var/opt/context/tex/texmf-cache/... > 16212 16210 TS 17 15:42 ? 00:00:00 \_ [uname] <defunct> Hm, defunct, eh? The luatex binary itself definitely does not call uname as a process, therefore this has to be the os.resultof() function that Hans implements in l-os.lua. I am suspecting issues with redirection now, as that function is defined as: function os.resultof(command) local handle = io.popen(command,"r") return handle and handle:read("*all") or "" end and it is called like so: os.resultof('uname -m') of course this will fail/block rather horribly if uname -m does not write to STDOUT (and that is not just uname, thre are a few more uses of os.resultof()). Best wishes, Taco ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 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 15:05 ` calling ConTeXt as a background process Henning Hraban Ramm 2 siblings, 0 replies; 46+ messages in thread From: Patrick Gundlach @ 2010-10-08 14:22 UTC (permalink / raw) To: mailing list for ConTeXt users > > function os.resultof(command) > local handle = io.popen(command,"r") > return handle and handle:read("*all") or "" > end > shouldn't the handle be close()d? Patrick ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 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:08 ` Florian Wobbe 2010-10-08 15:05 ` calling ConTeXt as a background process Henning Hraban Ramm 2 siblings, 2 replies; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-08 14:30 UTC (permalink / raw) To: Taco Hoekwater; +Cc: mailing list for ConTeXt users Am 2010-10-08 um 15:54 schrieb Taco Hoekwater: > On 10/08/2010 03:47 PM, Henning Hraban Ramm wrote: >> >> 16002 15978 TS 21 15:41 ? 00:00:01 \_ /var/www/xxx/bin/python >> /var/www/.../manage.py run_gunicorn -c /var/www/.../gunicorn- >> settings.py >> 16210 16002 TS 14 15:42 ? 00:00:08 \_ luatex --interaction=batchmode >> --fmt=/var/opt/context/tex/texmf-cache/.../formats/cont-en >> --lua=/var/opt/context/tex/texmf-cache/... >> 16212 16210 TS 17 15:42 ? 00:00:00 \_ [uname] <defunct> > > Hm, defunct, eh? > > The luatex binary itself definitely does not call uname as a > process, therefore this has to be the os.resultof() function > that Hans implements in l-os.lua. I am suspecting issues with > redirection now, as that function is defined as: > > function os.resultof(command) > local handle = io.popen(command,"r") > return handle and handle:read("*all") or "" > end The version in the garden has: function os.resultof(command) ioflush() -- else messed up logging local handle = io.popen(command,"r") if not handle then -- print("unknown command '".. command .. "' in os.resultof") return "" else return handle:read("*all") or "" end end > and it is called like so: > > os.resultof('uname -m') > > of course this will fail/block rather horribly if uname -m > does not write to STDOUT (and that is not just uname, thre > are a few more uses of os.resultof()). I tried to redirect stdout and stderr to my log file, maybe that's a problem then? If I call using os.system, I can't redirect, but the result is the same. I can redirect uname's output like so: uname -m >> context.log So I guess, it's using stdout at least normally - perhaps not via os.resultof, no clue. I just don't understand why any lua script would call uname externally if it's available as os.uname? Or does os.uname call os.resultof('uname')? (Probably not, otherwise Florian's suggestion wouldn't have worked.) print(os.resultof('uname -m')) gives attempt to call field 'resultof' (a nil value) Can I import that function anyhow? I just copied it to my script and replaced ioflush with io.flush. My script now calls first os.uname and then the external one. From the shell it works like expected. And even from the server process! That alone doesn't seem to be the problem. Here's the trace: strace -ff texlua call_uname.lua execve("/var/opt/context/tex/texmf-linux-64/bin/texlua", ["texlua", "call_uname.lua"], [/* 10 vars */]) = 0 brk(0) = 0x6a38000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b8eb789f000 uname({sys="Linux", node="aine.fiee.net", ...}) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b8eb78a0000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=20573, ...}) = 0 mmap(NULL, 20573, PROT_READ, MAP_PRIVATE, 4, 0) = 0x2b8eb78a2000 close(4) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/libdl.so.2", O_RDONLY) = 4 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> \0\1\0\0\0\20\16\0\0\0\0\0\0@"..., 832) = 832 fstat(4, {st_mode=S_IFREG|0644, st_size=14616, ...}) = 0 mmap(NULL, 2109728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x2b8eb7aa0000 mprotect(0x2b8eb7aa2000, 2097152, PROT_NONE) = 0 mmap(0x2b8eb7ca2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_DENYWRITE, 4, 0x2000) = 0x2b8eb7ca2000 close(4) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/libm.so.6", O_RDONLY) = 4 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P> \0\0\0\0\0\0@"..., 832) = 832 fstat(4, {st_mode=S_IFREG|0644, st_size=534736, ...}) = 0 mmap(NULL, 2629848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x2b8eb7ca4000 mprotect(0x2b8eb7d26000, 2093056, PROT_NONE) = 0 mmap(0x2b8eb7f25000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_DENYWRITE, 4, 0x81000) = 0x2b8eb7f25000 close(4) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/libc.so.6", O_RDONLY) = 4 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> \0\1\0\0\0\300\342\1\0\0\0\0\0@"..., 832) = 832 fstat(4, {st_mode=S_IFREG|0755, st_size=1375536, ...}) = 0 mmap(NULL, 3482232, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x2b8eb7f27000 mprotect(0x2b8eb8071000, 2093056, PROT_NONE) = 0 mmap(0x2b8eb8270000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_FIXED|MAP_DENYWRITE, 4, 0x149000) = 0x2b8eb8270000 mmap(0x2b8eb8275000, 17016, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b8eb8275000 close(4) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b8eb827a000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b8eb827b000 arch_prctl(ARCH_SET_FS, 0x2b8eb827ab10) = 0 mprotect(0x2b8eb8270000, 12288, PROT_READ) = 0 mprotect(0xab0000, 8192, PROT_READ) = 0 munmap(0x2b8eb78a2000, 20573) = 0 brk(0) = 0x6a38000 brk(0x6a59000) = 0x6a59000 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 brk(0x6a7a000) = 0x6a7a000 brk(0x6a9b000) = 0x6a9b000 brk(0x6abc000) = 0x6abc000 brk(0x6add000) = 0x6add000 stat("/var/opt/context/tex/texmf-linux-64/bin/texlua", {st_mode=S_IFREG|0755, st_size=5371656, ...}) = 0 lstat("/var", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/var/opt", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/var/opt/context", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/var/opt/context/tex", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/var/opt/context/tex/texmf-linux-64", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/var/opt/context/tex/texmf-linux-64/bin", {st_mode=S_IFDIR| 0755, st_size=4096, ...}) = 0 lstat("/var/opt/context/tex/texmf-linux-64/bin/texlua", {st_mode=S_IFLNK|0777, st_size=6, ...}) = 0 readlink("/var/opt/context/tex/texmf-linux-64/bin/texlua", "luatex"..., 2048) = 6 lstat("/var/opt/context/tex/texmf-linux-64/bin/luatex", {st_mode=S_IFREG|0755, st_size=5371656, ...}) = 0 stat("call_uname.lua", {st_mode=S_IFREG|0644, st_size=365, ...}) = 0 open("call_uname.lua", O_RDONLY) = 4 close(4) = 0 open("call_uname.lua", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=365, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b8eb78a2000 read(4, "for k, v in next, os.uname() do\n "..., 4096) = 365 read(4, ""..., 4096) = 0 close(4) = 0 munmap(0x2b8eb78a2000, 4096) = 0 uname({sys="Linux", node="aine.fiee.net", ...}) = 0 fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b8eb78a2000 write(1, "version\t#1 SMP Tue Jul 6 14:34:09"..., 123version #1 SMP Tue Jul 6 14:34:09 MSD 2010 release 2.6.18-028stab070.2 machine x86_64 nodename aine.fiee.net sysname Linux ) = 123 pipe([4, 9]) = 0 clone(Process 30304 attached (waiting for parent) Process 30304 resumed (parent 30303 ready) child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2b8eb827aba0) = 30304 [pid 30304] close(4 <unfinished ...> [pid 30303] close(9) = 0 [pid 30303] fstat(4, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 [pid 30303] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2b8eb78a3000 [pid 30303] lseek(4, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek) [pid 30303] read(4, <unfinished ...> [pid 30304] <... close resumed> ) = 0 [pid 30304] dup2(9, 1) = 1 [pid 30304] close(9) = 0 [pid 30304] execve("/bin/sh", ["sh", "-c", "uname -m"], [/* 14 vars */]) = 0 [pid 30304] brk(0) = 0x15c3d000 [pid 30304] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2b0b55314000 [pid 30304] uname({sys="Linux", node="aine.fiee.net", ...}) = 0 [pid 30304] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) [pid 30304] mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2b0b55315000 [pid 30304] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) [pid 30304] open("/etc/ld.so.cache", O_RDONLY) = 4 [pid 30304] fstat(4, {st_mode=S_IFREG|0644, st_size=20573, ...}) = 0 [pid 30304] mmap(NULL, 20573, PROT_READ, MAP_PRIVATE, 4, 0) = 0x2b0b55317000 [pid 30304] close(4) = 0 [pid 30304] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) [pid 30304] open("/lib/libncurses.so.5", O_RDONLY) = 4 [pid 30304] read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> \0\1\0\0\0\320%\1\0\0\0\0\0@"..., 832) = 832 [pid 30304] fstat(4, {st_mode=S_IFREG|0644, st_size=256288, ...}) = 0 [pid 30304] mmap(NULL, 2353152, PROT_READ|PROT_EXEC, MAP_PRIVATE| MAP_DENYWRITE, 4, 0) = 0x2b0b55515000 [pid 30304] mprotect(0x2b0b55550000, 2093056, PROT_NONE) = 0 [pid 30304] mmap(0x2b0b5574f000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x3a000) = 0x2b0b5574f000 [pid 30304] close(4) = 0 [pid 30304] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) [pid 30304] open("/lib/libdl.so.2", O_RDONLY) = 4 [pid 30304] read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> \0\1\0\0\0\20\16\0\0\0\0\0\0@"..., 832) = 832 [pid 30304] fstat(4, {st_mode=S_IFREG|0644, st_size=14616, ...}) = 0 [pid 30304] mmap(NULL, 2109728, PROT_READ|PROT_EXEC, MAP_PRIVATE| MAP_DENYWRITE, 4, 0) = 0x2b0b55754000 [pid 30304] mprotect(0x2b0b55756000, 2097152, PROT_NONE) = 0 [pid 30304] mmap(0x2b0b55956000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2000) = 0x2b0b55956000 [pid 30304] close(4) = 0 [pid 30304] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) [pid 30304] open("/lib/libc.so.6", O_RDONLY) = 4 [pid 30304] read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> \0\1\0\0\0\300\342\1\0\0\0\0\0@"..., 832) = 832 [pid 30304] fstat(4, {st_mode=S_IFREG|0755, st_size=1375536, ...}) = 0 [pid 30304] mmap(NULL, 3482232, PROT_READ|PROT_EXEC, MAP_PRIVATE| MAP_DENYWRITE, 4, 0) = 0x2b0b55958000 [pid 30304] mprotect(0x2b0b55aa2000, 2093056, PROT_NONE) = 0 [pid 30304] mmap(0x2b0b55ca1000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x149000) = 0x2b0b55ca1000 [pid 30304] mmap(0x2b0b55ca6000, 17016, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b0b55ca6000 [pid 30304] close(4) = 0 [pid 30304] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2b0b55cab000 [pid 30304] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2b0b55cac000 [pid 30304] arch_prctl(ARCH_SET_FS, 0x2b0b55cabaf0) = 0 [pid 30304] mprotect(0x2b0b55ca1000, 12288, PROT_READ) = 0 [pid 30304] munmap(0x2b0b55317000, 20573) = 0 [pid 30304] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 [pid 30304] open("/dev/tty", O_RDWR|O_NONBLOCK) = -1 ENXIO (No such device or address) [pid 30304] ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff4598a270) = -1 EINVAL (Invalid argument) [pid 30304] brk(0) = 0x15c3d000 [pid 30304] brk(0x15c3e000) = 0x15c3e000 [pid 30304] brk(0x15c3f000) = 0x15c3f000 [pid 30304] getuid() = 1005 [pid 30304] getgid() = 1006 [pid 30304] geteuid() = 1005 [pid 30304] getegid() = 1006 [pid 30304] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 [pid 30304] brk(0x15c40000) = 0x15c40000 [pid 30304] open("/proc/meminfo", O_RDONLY) = 4 [pid 30304] fstat(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 [pid 30304] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2b0b55317000 [pid 30304] read(4, "MemTotal: 2097152 kB\nMemFree"..., 4096) = 771 [pid 30304] close(4) = 0 [pid 30304] munmap(0x2b0b55317000, 4096) = 0 [pid 30304] brk(0x15c41000) = 0x15c41000 [pid 30304] rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0 [pid 30304] rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0 [pid 30304] rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0 [pid 30304] rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0 [pid 30304] rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0 [pid 30304] rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0 [pid 30304] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 [pid 30304] rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0 [pid 30304] uname({sys="Linux", node="aine.fiee.net", ...}) = 0 [pid 30304] stat("/var/www/xxx/_textemp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 30304] stat(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 30304] getpid() = 30304 [pid 30304] brk(0x15c42000) = 0x15c42000 [pid 30304] getppid() = 30303 [pid 30304] stat(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 30304] stat("/var/opt/context/tex/texmf-linux-64/bin/sh", 0x7fff4598a240) = -1 ENOENT (No such file or directory) [pid 30304] stat("/var/www/xxx/bin/sh", 0x7fff4598a240) = -1 ENOENT (No such file or directory) [pid 30304] stat("/command/sh", 0x7fff4598a240) = -1 ENOENT (No such file or directory) [pid 30304] stat("/usr/local/bin/sh", 0x7fff4598a240) = -1 ENOENT (No such file or directory) [pid 30304] stat("/usr/local/sbin/sh", 0x7fff4598a240) = -1 ENOENT (No such file or directory) [pid 30304] stat("/bin/sh", {st_mode=S_IFREG|0755, st_size=797784, ...}) = 0 [pid 30304] open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 4 [pid 30304] read(4, "65536\n"..., 31) = 6 [pid 30304] close(4) = 0 [pid 30304] brk(0x15cc2000) = 0x15cc2000 [pid 30304] getgroups(65536, [1006]) = 1 [pid 30304] stat("/bin/sh", {st_mode=S_IFREG|0755, st_size=797784, ...}) = 0 [pid 30304] brk(0x15cc3000) = 0x15cc3000 [pid 30304] socket(PF_FILE, SOCK_STREAM, 0) = 4 [pid 30304] fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0 [pid 30304] connect(4, {sa_family=AF_FILE, path="/var/run/nscd/ socket"...}, 110) = 0 [pid 30304] sendto(4, "\2\0\0\0\v\0\0\0\7\0\0\0passwd\0"..., 19, MSG_NOSIGNAL, NULL, 0) = 19 [pid 30304] poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=4, revents=POLLIN|POLLHUP}]) [pid 30304] recvmsg(4, {msg_name(0)=NULL, msg_iov(2)=[{"passwd\0"..., 7}, {"\270O\3\0\0\0\0\0"..., 8}], msg_controllen=24, {cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, {9}}, msg_flags=0}, MSG_CMSG_CLOEXEC) = 15 [pid 30304] mmap(NULL, 217016, PROT_READ, MAP_SHARED, 9, 0) = 0x2b0b55317000 [pid 30304] close(9) = 0 [pid 30304] close(4) = 0 [pid 30304] brk(0x15cc4000) = 0x15cc4000 [pid 30304] getpgrp() = 30142 [pid 30304] rt_sigaction(SIGCHLD, {0x439730, [], SA_RESTORER, 0x2b0b55989f60}, {SIG_DFL}, 8) = 0 [pid 30304] getrlimit(RLIMIT_NPROC, {rlim_cur=582*1024, rlim_max=582*1024}) = 0 [pid 30304] brk(0x15cc5000) = 0x15cc5000 [pid 30304] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 [pid 30304] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 [pid 30304] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 [pid 30304] stat(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 [pid 30304] stat("/var/opt/context/tex/texmf-linux-64/bin/uname", 0x7fff4598a100) = -1 ENOENT (No such file or directory) [pid 30304] stat("/var/www/xxx/bin/uname", 0x7fff4598a100) = -1 ENOENT (No such file or directory) [pid 30304] stat("/command/uname", 0x7fff4598a100) = -1 ENOENT (No such file or directory) [pid 30304] stat("/usr/local/bin/uname", 0x7fff4598a100) = -1 ENOENT (No such file or directory) [pid 30304] stat("/usr/local/sbin/uname", 0x7fff4598a100) = -1 ENOENT (No such file or directory) [pid 30304] stat("/bin/uname", {st_mode=S_IFREG|0755, st_size=29304, ...}) = 0 [pid 30304] stat("/bin/uname", {st_mode=S_IFREG|0755, st_size=29304, ...}) = 0 [pid 30304] rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0 [pid 30304] rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_IGN}, 8) = 0 [pid 30304] rt_sigaction(SIGCHLD, {SIG_DFL}, {0x439730, [], SA_RESTORER, 0x2b0b55989f60}, 8) = 0 [pid 30304] execve("/bin/uname", ["uname", "-m"], [/* 14 vars */]) = 0 [pid 30304] brk(0) = 0x144a4000 [pid 30304] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2aee46ccf000 [pid 30304] uname({sys="Linux", node="aine.fiee.net", ...}) = 0 [pid 30304] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) [pid 30304] mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2aee46cd0000 [pid 30304] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) [pid 30304] open("/etc/ld.so.cache", O_RDONLY) = 4 [pid 30304] fstat(4, {st_mode=S_IFREG|0644, st_size=20573, ...}) = 0 [pid 30304] mmap(NULL, 20573, PROT_READ, MAP_PRIVATE, 4, 0) = 0x2aee46cd2000 [pid 30304] close(4) = 0 [pid 30304] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) [pid 30304] open("/lib/libc.so.6", O_RDONLY) = 4 [pid 30304] read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> \0\1\0\0\0\300\342\1\0\0\0\0\0@"..., 832) = 832 [pid 30304] fstat(4, {st_mode=S_IFREG|0755, st_size=1375536, ...}) = 0 [pid 30304] mmap(NULL, 3482232, PROT_READ|PROT_EXEC, MAP_PRIVATE| MAP_DENYWRITE, 4, 0) = 0x2aee46ed0000 [pid 30304] mprotect(0x2aee4701a000, 2093056, PROT_NONE) = 0 [pid 30304] mmap(0x2aee47219000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x149000) = 0x2aee47219000 [pid 30304] mmap(0x2aee4721e000, 17016, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2aee4721e000 [pid 30304] close(4) = 0 [pid 30304] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2aee47223000 [pid 30304] arch_prctl(ARCH_SET_FS, 0x2aee472236e0) = 0 [pid 30304] mprotect(0x2aee47219000, 12288, PROT_READ) = 0 [pid 30304] munmap(0x2aee46cd2000, 20573) = 0 [pid 30304] brk(0) = 0x144a4000 [pid 30304] brk(0x144c5000) = 0x144c5000 [pid 30304] uname({sys="Linux", node="aine.fiee.net", ...}) = 0 [pid 30304] fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 [pid 30304] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2aee46cd2000 [pid 30304] write(1, "x86_64\n"..., 7 <unfinished ...> [pid 30303] <... read resumed> "x86_64\n"..., 4096) = 7 [pid 30303] read(4, <unfinished ...> [pid 30304] <... write resumed> ) = 7 [pid 30304] close(1 <unfinished ...> [pid 30303] <... read resumed> ""..., 4096) = 0 [pid 30303] close(4) = 0 [pid 30303] wait4(30304, Process 30303 suspended <unfinished ...> [pid 30304] <... close resumed> ) = 0 [pid 30304] munmap(0x2aee46cd2000, 4096) = 0 [pid 30304] close(2) = 0 [pid 30304] exit_group(0) = ? Process 30303 resumed Process 30304 detached <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 30304 --- SIGCHLD (Child exited) @ 0 (0) --- munmap(0x2b8eb78a3000, 4096) = 0 write(1, "x86_64\n\n"..., 8x86_64 ) = 8 exit_group(0) = ? Greetlings, Hraban ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 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 1 sibling, 1 reply; 46+ messages in thread From: Taco Hoekwater @ 2010-10-08 14:57 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm Hi, On 10/08/2010 04:30 PM, Henning Hraban Ramm wrote: > > I just don't understand why any lua script would call uname externally > if it's available as os.uname? My guess is that this is historical. Hans? Best wishes, Taco Sorry, no smart ideas about the rest of the problems any more ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-08 14:57 ` Taco Hoekwater @ 2010-10-08 15:10 ` Hans Hagen 0 siblings, 0 replies; 46+ messages in thread From: Hans Hagen @ 2010-10-08 15:10 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Taco Hoekwater, Henning Hraban Ramm On 8-10-2010 4:57, Taco Hoekwater wrote: > > Hi, > > On 10/08/2010 04:30 PM, Henning Hraban Ramm wrote: >> >> I just don't understand why any lua script would call uname externally >> if it's available as os.uname? > > My guess is that this is historical. Hans? yes, and also related to some issues on osx where the built in uname was not yet ok (needs checking, but not today by me) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-08 14:30 ` Henning Hraban Ramm 2010-10-08 14:57 ` Taco Hoekwater @ 2010-10-08 15:08 ` Florian Wobbe 2010-10-08 19:44 ` calling ConTeXt as a background process (SOLVED) Henning Hraban Ramm 1 sibling, 1 reply; 46+ messages in thread From: Florian Wobbe @ 2010-10-08 15:08 UTC (permalink / raw) To: mailing list for ConTeXt users On Oct 8, 2010, at 16:30 , Henning Hraban Ramm wrote: > Am 2010-10-08 um 15:54 schrieb Taco Hoekwater: > >> On 10/08/2010 03:47 PM, Henning Hraban Ramm wrote: >>> >>> 16002 15978 TS 21 15:41 ? 00:00:01 \_ /var/www/xxx/bin/python >>> /var/www/.../manage.py run_gunicorn -c /var/www/.../gunicorn-settings.py >>> 16210 16002 TS 14 15:42 ? 00:00:08 \_ luatex --interaction=batchmode >>> --fmt=/var/opt/context/tex/texmf-cache/.../formats/cont-en >>> --lua=/var/opt/context/tex/texmf-cache/... >>> 16212 16210 TS 17 15:42 ? 00:00:00 \_ [uname] <defunct> >> >> Hm, defunct, eh? >> >> The luatex binary itself definitely does not call uname as a >> process, therefore this has to be the os.resultof() function >> that Hans implements in l-os.lua. I am suspecting issues with >> redirection now, as that function is defined as: >> >> function os.resultof(command) >> local handle = io.popen(command,"r") >> return handle and handle:read("*all") or "" >> end The strange thing is that running luatex --interaction=batchmode --fmt=".../formats/cont-en" --lua=".../formats/cont-en.lui" --backend=pdf hello causes luatex (or say l-os.lua) to call 'uname -m' via os.resultof However, when doing mtxrun --script context --batchmode --once hello *only* texlua calls 'uname -m' and the following luatex child does *not* anymore. Why? >> of course this will fail/block rather horribly if uname -m >> does not write to STDOUT (and that is not just uname, thre >> are a few more uses of os.resultof()). if that is the case you should not see any reads after the child forks: clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7feb7a0369d0) = 14998 [...] read(3, "x86_64\n", 4096) = 7 read(3, "", 4096) = 0 --- SIGCHLD (Child exited) @ 0 (0) --- > My script now calls first os.uname and then the external one. > From the shell it works like expected. > And even from the server process! That alone doesn't seem to be the problem. > > Here's the trace: > > strace -ff texlua call_uname.lua > > [...] I'm running out of ideas. From your script os.resultof("uname -m") works and from luatex it doesn't. What does this trace distinguish from the one of luatex? 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process (SOLVED) 2010-10-08 15:08 ` Florian Wobbe @ 2010-10-08 19:44 ` Henning Hraban Ramm 2010-10-10 8:47 ` Patrick Gundlach 2010-10-26 19:28 ` Taco Hoekwater 0 siblings, 2 replies; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-08 19:44 UTC (permalink / raw) To: mailing list for ConTeXt users Ok, the failures were the same with fcgi and gunicorn app servers. But it _works_ with django's dev server (which you must not use in production due to memory/security holes etc.). While ConTeXt runs it looks like: 5852 25767 TS 21 18:04 pts/0 00:00:00 \_ python manage.py runserver 8000 1477 5852 TS 23 18:07 pts/0 00:00:03 \_ /var/www/ cerebrale/bin/python manage.py runserver 8000 3395 1477 TS 22 18:08 pts/0 00:00:00 \_ /bin/sh -c date "+%Y-%m-%d %H:%M:%S" && cd /var/www/.../_textemp && /var/opt/ context/tex/texmf-linux-64/bin/context --purgeall --batchmode -- result="/var/www/... 3397 3395 TS 22 18:08 pts/0 00:00:00 \_ /bin/ sh /var/opt/context/tex/texmf-linux-64/bin/context --purgeall -- batchmode --result=/var/www/... 3398 3397 TS 15 18:08 pts/0 00:00:00 \_ texlua /var/opt/context/tex/texmf-linux-64/bin/mtxrun --script context --purgeall --batchmode --result=/var/www/... 3400 3398 TS 21 18:08 pts/0 00:00:00 \_ luatex --interaction=batchmode --fmt=/var/opt/context/tex/texmf- cache/.../cont-en --lua=/var/opt/context/tex... TeX completes fast, and everything seems well afterwards. But I started that app server from an active shell. Maybe that's the difference? Right, if I start gunicorn manually, it also works. So, the culprit seems to be the automatic background start of the app server via daemontools. I'll have to test other means of starting and supervising the processes - e.g. runit or supervisor. Since I like Python and don't want to replace "init" yet, I try the latter first. Some hours later: YES IT WORKS with supervisor so far! Thank you all for your patience, ideas and help! Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process (SOLVED) 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 1 sibling, 1 reply; 46+ messages in thread From: Patrick Gundlach @ 2010-10-10 8:47 UTC (permalink / raw) To: mailing list for ConTeXt users > > Thank you all for your patience, ideas and help! Sorry, that I didn't quite understand the problem/solution, could you describe in a few sentences what problem was and how you solved it? Thanks Patrick ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process (SOLVED) 2010-10-10 8:47 ` Patrick Gundlach @ 2010-10-10 9:01 ` Henning Hraban Ramm 0 siblings, 0 replies; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-10 9:01 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2010-10-10 um 10:47 schrieb Patrick Gundlach: >> Thank you all for your patience, ideas and help! > > Sorry, that I didn't quite understand the problem/solution, could > you describe in a few sentences what problem was and how you solved > it? I actually couldn't find out what the real problem was. ;-) I tried to start ConTeXt from a Django web application server. (Running ConTeXt from an active shell was no problem.) My Django FCGI processes were running under daemontools (http://cr.yp.to/daemontools.html ) supervision, i.e. started by its supervise daemon. In this setup, texlua hung at least at uname (and maybe other) calls. I found no error messages on that, I guess the environment was restricted in some way. Since I thought it might have to do with the FCGI server, I replaced that by Green Unicorn (http://gunicorn.org/), but that made no difference WRT ConTeXt. When I changed process supervision from daemontools to supervisor (http://supervisord.org/ ), I got no further problems. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process (SOLVED) 2010-10-08 19:44 ` calling ConTeXt as a background process (SOLVED) Henning Hraban Ramm 2010-10-10 8:47 ` Patrick Gundlach @ 2010-10-26 19:28 ` Taco Hoekwater 2010-10-26 20:09 ` Hans Hagen 2010-10-26 20:13 ` Henning Hraban Ramm 1 sibling, 2 replies; 46+ messages in thread From: Taco Hoekwater @ 2010-10-26 19:28 UTC (permalink / raw) To: mailing list for ConTeXt users Hi Henning, On 10/08/10 21:44, Henning Hraban Ramm wrote: > Ok, the failures were the same with fcgi and gunicorn app servers. > > But it _works_ with django's dev server (which you must not use in > production due to memory/security holes etc.). We just had a somewhat similar problem (texlua hung at 100% cpu when run via apache) and it turns out, after lots of debugging, that mtxrun cannot do anything without $HOME. Perhaps yours was a different symptom of the same problem ? try this if you want to test CPU heat generation: $ env HOME= context knuth (use one process for each available cpu thread, of course) Best wishes, Taco ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process (SOLVED) 2010-10-26 19:28 ` Taco Hoekwater @ 2010-10-26 20:09 ` Hans Hagen 2010-10-26 20:56 ` Taco Hoekwater 2010-10-26 20:13 ` Henning Hraban Ramm 1 sibling, 1 reply; 46+ messages in thread From: Hans Hagen @ 2010-10-26 20:09 UTC (permalink / raw) To: mailing list for ConTeXt users On 26-10-2010 9:28, Taco Hoekwater wrote: > > Hi Henning, > > On 10/08/10 21:44, Henning Hraban Ramm wrote: >> Ok, the failures were the same with fcgi and gunicorn app servers. >> >> But it _works_ with django's dev server (which you must not use in >> production due to memory/security holes etc.). > > We just had a somewhat similar problem (texlua hung at 100% cpu > when run via apache) and it turns out, after lots of debugging, > that mtxrun cannot do anything without $HOME. Perhaps yours was > a different symptom of the same problem ? > > try this if you want to test CPU heat generation: > > $ env HOME= context knuth so what should HOME default to then? "."? ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process (SOLVED) 2010-10-26 20:09 ` Hans Hagen @ 2010-10-26 20:56 ` Taco Hoekwater 2010-10-26 21:32 ` Hans Hagen 0 siblings, 1 reply; 46+ messages in thread From: Taco Hoekwater @ 2010-10-26 20:56 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Hans Hagen On 10/26/10 22:09, Hans Hagen wrote: > On 26-10-2010 9:28, Taco Hoekwater wrote: >> >> Hi Henning, >> >> On 10/08/10 21:44, Henning Hraban Ramm wrote: >>> Ok, the failures were the same with fcgi and gunicorn app servers. >>> >>> But it _works_ with django's dev server (which you must not use in >>> production due to memory/security holes etc.). >> >> We just had a somewhat similar problem (texlua hung at 100% cpu >> when run via apache) and it turns out, after lots of debugging, >> that mtxrun cannot do anything without $HOME. Perhaps yours was >> a different symptom of the same problem ? >> >> try this if you want to test CPU heat generation: >> >> $ env HOME= context knuth > > so what should HOME default to then? "."? Not a default is what is needed, what is needed is that it should work without a HOME at all (server processes typically dont have one). Let's sort this out offlist. Best wishes, Taco ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process (SOLVED) 2010-10-26 20:56 ` Taco Hoekwater @ 2010-10-26 21:32 ` Hans Hagen 0 siblings, 0 replies; 46+ messages in thread From: Hans Hagen @ 2010-10-26 21:32 UTC (permalink / raw) To: Taco Hoekwater; +Cc: mailing list for ConTeXt users On 26-10-2010 10:56, Taco Hoekwater wrote: > > > On 10/26/10 22:09, Hans Hagen wrote: >> On 26-10-2010 9:28, Taco Hoekwater wrote: >>> >>> Hi Henning, >>> >>> On 10/08/10 21:44, Henning Hraban Ramm wrote: >>>> Ok, the failures were the same with fcgi and gunicorn app servers. >>>> >>>> But it _works_ with django's dev server (which you must not use in >>>> production due to memory/security holes etc.). >>> >>> We just had a somewhat similar problem (texlua hung at 100% cpu >>> when run via apache) and it turns out, after lots of debugging, >>> that mtxrun cannot do anything without $HOME. Perhaps yours was >>> a different symptom of the same problem ? >>> >>> try this if you want to test CPU heat generation: >>> >>> $ env HOME= context knuth >> >> so what should HOME default to then? "."? > > Not a default is what is needed, what is needed is that it should work > without a HOME at all (server processes typically dont have one). sure, but I guess that some path specs have ~ and that we get a loop in the resolver due to this and for these patsh with ~ we need a proper default then > Let's sort this out offlist. okay Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process (SOLVED) 2010-10-26 19:28 ` Taco Hoekwater 2010-10-26 20:09 ` Hans Hagen @ 2010-10-26 20:13 ` Henning Hraban Ramm 1 sibling, 0 replies; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-26 20:13 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2010-10-26 um 21:28 schrieb Taco Hoekwater: > We just had a somewhat similar problem (texlua hung at 100% cpu > when run via apache) and it turns out, after lots of debugging, > that mtxrun cannot do anything without $HOME. Perhaps yours was > a different symptom of the same problem ? Ah, I didn't check HOME; I'll add that to my environment, just in case. (But ATM it runs well.) > try this if you want to test CPU heat generation: > $ env HOME= context knuth > (use one process for each available cpu thread, of course) ;-) I'm using a rented virtual server and won't feel the heat. (And I guess the hoster will just throttle or disable it if I try to melt it.) Thank you! Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 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 15:05 ` Henning Hraban Ramm 2 siblings, 0 replies; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-08 15:05 UTC (permalink / raw) To: mailing ConTeXt users list for Just installed Ruby, fetched the latest beta and tried texexec: 26382 26367 TS 20 16:38 ? 00:00:01 \_ /var/www/xxx/bin/ python /var/www/xxx/manage.py run_gunicorn -c /var/www/.../gunicorn- settings.py 26509 26382 TS 20 16:38 ? 00:00:00 \_ /bin/sh -c texexec --batchmode --once hello >> _context.log 26510 26509 TS 20 16:38 ? 00:00:00 \_ /bin/sh /var/ opt/context/tex/texmf-linux-64/bin/texexec --batchmode --once hello 26511 26510 TS 14 16:38 ? 00:00:21 \_ texlua / var/opt/context/tex/texmf-linux-64/bin/mtxrun --usekpse --execute texexec --batchmode --once hello 26512 26511 TS 14 16:38 ? 00:00:00 \_ [uname] <defunct> Argl, I didn't knew texexec also depends on mtxrun/lua... Ok, patching mtxrun again, now I even replace os.uname, but I get the same as above. Hraban ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-07 15:55 ` Henning Hraban Ramm 2010-10-07 16:32 ` Florian Wobbe @ 2010-10-07 18:16 ` taco 2010-10-08 8:00 ` Henning Hraban Ramm 1 sibling, 1 reply; 46+ messages in thread From: taco @ 2010-10-07 18:16 UTC (permalink / raw) To: mailing list for ConTeXt users Henning Hraban Ramm wrote: > > I can imagine that it has something to do with SElinux settings, didn't > dive in that yet. That does sound familiar, in fact. I had a hanging database server a while back because I moved it to a different location. apparmor was the culprit in that case, so perhaps it is here as well ? (Basically an application will get a 'resource unavailable' when it tries to access anything outside of the apparmor allowed directories for that service/binary). In any case, check /etc/apparmor and /etc/apparmor.d Best wishes, Taco ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-07 18:16 ` taco @ 2010-10-08 8:00 ` Henning Hraban Ramm 2010-10-08 8:12 ` Patrick Gundlach ` (2 more replies) 0 siblings, 3 replies; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-08 8:00 UTC (permalink / raw) To: mailing list for ConTeXt users Summary so far: * Machine: virtual server on Debian 5.0 (x86_64) (I thought it was Ubuntu, because I run that on my other Linux machines, sorry). * Webserver: Django 1.2/fcgi (Python 2.5) behind Nginx I can run ConTeXt without any problems from the shell, also as the same user that runs the server process. From the shell it doesn't matter if I call it as "context" (that's a shell script calling mtxrun), "mtxrun", other shell script or simple Python script. I want to run ConTeXt from the server process (at the end I want it to run via Celery/RabbitMQ, but that doesn't matter at the moment), but it hangs at the texlua process and doesn't do anything. - With an unmodified mtxrun that hangs at its external "uname" call (gets "defunct"); I patched it to just take "x86_64" instead of calling uname. - After that it doesn't matter how I call ConTeXt, it always hangs at texlua. - I tried os.system (that directly uses C's system call) and several variants of subprocess.Popen - I tried calling setuptex as well as setting PATH, TEXROOT and TEXMFOS for the environment of the process and checked that they exist in the call. - Calls of several linux tools via os.system or subprocess.Popen worked. I suspected SElinux settings, Taco hinted at AppArmor, but both aren't active, as far as I can tell. So, the problem is with the web server and texlua. Django/fcgi unfortunately swallows error messages (known problem of the fcgi mode). Next I'll try a different server setup. Unfortunately Apache with mod_wsgi or mod_python is too heavy for my virtual server (with Nginx I can run more that 5 Django sites, with Apache I had massive ressource problems with 3-4). Green Unicorn (http://gunicorn.org/) looks good for my purpose. Sorry for the OT thread, I suspected the problem being more in the LuaTeX area. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 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 8:37 ` luigi scarso 2010-10-08 10:19 ` Hans Hagen 2 siblings, 1 reply; 46+ messages in thread From: Patrick Gundlach @ 2010-10-08 8:12 UTC (permalink / raw) To: mailing list for ConTeXt users > Sorry for the OT thread, I suspected the problem being more in the LuaTeX area. I don't think it's in the LuaTeX area, for LuaTeX is just a regular process. I have to admit that I have run into similar problems with different software I tried to run from a "server process" (whatever this means) and it always took me some time to get it right. At the end it was aways clear to me why it wouldn't run (but I can't remember anymore, since it is many years ago). So I suggest to replace the LuaTeX call with different other software and see where it breaks. Use software that reads STDIN, that writes to STDOUT/STDERR and alike and see if they are ok. Patrick ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-08 8:12 ` Patrick Gundlach @ 2010-10-08 9:21 ` Henning Hraban Ramm 2010-10-08 9:27 ` luigi scarso 0 siblings, 1 reply; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-08 9:21 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2010-10-08 um 10:12 schrieb Patrick Gundlach: > I don't think it's in the LuaTeX area, for LuaTeX is just a regular > process. Hm, I suspect it might be some system call inside LuaTeX that is blocked or the like. > I have to admit that I have run into similar problems with different > software I tried to run from a "server process" (whatever this > means) and it always took me some time to get it right. At the end > it was aways clear to me why it wouldn't run (but I can't remember > anymore, since it is many years ago). So I suggest to replace the > LuaTeX call with different other software and see where it breaks. > Use software that reads STDIN, that writes to STDOUT/STDERR and > alike and see if they are ok. A simple case like python -c "print 'Hello'" works ok. I tried shell commands and simple tools (echo, set, date, touch) before, and strace works, too. Even "texlua --help" works, so it's not texlua generally. texlua --script context --batchmode --once hello gives: "Script file context not found" (at least a usable error message, nothing hangs) The same with /var/opt/context/tex/setuptex && texlua --script context --batchmode -- once hello Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-08 9:21 ` Henning Hraban Ramm @ 2010-10-08 9:27 ` luigi scarso 0 siblings, 0 replies; 46+ messages in thread From: luigi scarso @ 2010-10-08 9:27 UTC (permalink / raw) To: mailing list for ConTeXt users On Fri, Oct 8, 2010 at 11:21 AM, Henning Hraban Ramm <hraban@fiee.net> wrote: > Am 2010-10-08 um 10:12 schrieb Patrick Gundlach: > >> I don't think it's in the LuaTeX area, for LuaTeX is just a regular >> process. > > Hm, I suspect it might be some system call inside LuaTeX that is blocked or > the like. > >> I have to admit that I have run into similar problems with different >> software I tried to run from a "server process" (whatever this means) and it >> always took me some time to get it right. At the end it was aways clear to >> me why it wouldn't run (but I can't remember anymore, since it is many years >> ago). So I suggest to replace the LuaTeX call with different other software >> and see where it breaks. Use software that reads STDIN, that writes to >> STDOUT/STDERR and alike and see if they are ok. > > A simple case like > python -c "print 'Hello'" > works ok. > I tried shell commands and simple tools (echo, set, date, touch) before, and > strace works, too. > > Even "texlua --help" works, so it's not texlua generally. > > texlua --script context --batchmode --once hello > gives: "Script file context not found" > (at least a usable error message, nothing hangs) > The same with > /var/opt/context/tex/setuptex && texlua --script context --batchmode --once > hello I use something like this os.system("""bash -c 'cd /opt/luatex/minimals-new/tex ; source setuptex ; echo $PATH;cd "%(jobpath)s" && context --batch "%(filetex)s" 2>/dev/null 1>/dev/null'""" %kv) -- luigi ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-08 8:00 ` Henning Hraban Ramm 2010-10-08 8:12 ` Patrick Gundlach @ 2010-10-08 8:37 ` luigi scarso 2010-10-08 8:47 ` Henning Hraban Ramm 2010-10-08 10:19 ` Hans Hagen 2 siblings, 1 reply; 46+ messages in thread From: luigi scarso @ 2010-10-08 8:37 UTC (permalink / raw) To: mailing list for ConTeXt users On Fri, Oct 8, 2010 at 10:00 AM, Henning Hraban Ramm <hraban@fiee.net> wrote: > Summary so far: > > * Machine: virtual server on Debian 5.0 (x86_64) (I thought it was Ubuntu, > because I run that on my other Linux machines, sorry). > * Webserver: Django 1.2/fcgi (Python 2.5) behind Nginx > > I can run ConTeXt without any problems from the shell, also as the same user > that runs the server process. > From the shell it doesn't matter if I call it as "context" (that's a shell > script calling mtxrun), "mtxrun", other shell script or simple Python > script. > > I want to run ConTeXt from the server process (at the end I want it to run > via Celery/RabbitMQ, but that doesn't matter at the moment), but it hangs at > the texlua process and doesn't do anything. An user permissions/environment issue ? After this I have no other suggestions. -- luigi ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-08 8:37 ` luigi scarso @ 2010-10-08 8:47 ` Henning Hraban Ramm 2010-10-08 8:54 ` luigi scarso 0 siblings, 1 reply; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-08 8:47 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2010-10-08 um 10:37 schrieb luigi scarso: > An user permissions/environment issue ? I can't exclude that, but since the web server and its subprocesses run as the same user that I (can) use for login and got no problems running TeX as that user, I wouldn't know where to look for the wrong permissions. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-08 8:47 ` Henning Hraban Ramm @ 2010-10-08 8:54 ` luigi scarso 0 siblings, 0 replies; 46+ messages in thread From: luigi scarso @ 2010-10-08 8:54 UTC (permalink / raw) To: mailing list for ConTeXt users On Fri, Oct 8, 2010 at 10:47 AM, Henning Hraban Ramm <hraban@fiee.net> wrote: > Am 2010-10-08 um 10:37 schrieb luigi scarso: >> >> An user permissions/environment issue ? > > > I can't exclude that, but since the web server and its subprocesses run as > the same user that I (can) use for login and got no problems running TeX as > that user, I wouldn't know where to look for the wrong permissions. try to cd to a 777 dir -- luigi ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-08 8:00 ` Henning Hraban Ramm 2010-10-08 8:12 ` Patrick Gundlach 2010-10-08 8:37 ` luigi scarso @ 2010-10-08 10:19 ` Hans Hagen 2 siblings, 0 replies; 46+ messages in thread From: Hans Hagen @ 2010-10-08 10:19 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm On 8-10-2010 10:00, Henning Hraban Ramm wrote: > Sorry for the OT thread, I suspected the problem being more in the > LuaTeX area. I never had problems running luatex (texlua) on linux boxes as part of a web service so I cannot image luatex being the problem. Can you see what pdftex does? Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-07 9:00 ` Henning Hraban Ramm 2010-10-07 9:06 ` Taco Hoekwater @ 2010-10-07 10:16 ` Robin.Kirkham 2010-10-07 11:02 ` Henning Hraban Ramm 2010-10-07 10:27 ` Patrick Gundlach 2 siblings, 1 reply; 46+ messages in thread From: Robin.Kirkham @ 2010-10-07 10:16 UTC (permalink / raw) To: ntg-context Posted by Henning Hraban Ramm [hraban@fiee.net] > Am 2010-10-07 um 10:42 schrieb Taco Hoekwater: > > > On 10/07/10 09:34, Henning Hraban Ramm wrote: > >> mtxrun --script context "prd_paket --batchmode --once" > > > > When I run that last thing on the command line, I get: > > > > ! I can't find file `./prd_paket --batchmode --once'. > > <*> "./prd_paket --batchmode --once" > > > > Please type another input file name: > > Of course, prd_paket.tex is my input file. But that's there. > > > But it is hard to say whether that is the problem. If it was > > me, I would attach a gdb to the process to see where it is at > > from the backtrace (but you need a non-stripped build of > > the binary for that). > > I'd like to avoid compiling a debugging version of luatex... Hraban, Have you tried attaching to the stalled processes using strace (Linux) or dtruss (Mac)? This will tell you what system call is blocking, might give a clue. The defunct uname process in your original post suggests to me the parent did not calling wait() on the child (uname) and it exited. Best, Robin ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-07 10:16 ` Robin.Kirkham @ 2010-10-07 11:02 ` Henning Hraban Ramm 0 siblings, 0 replies; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-07 11:02 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2010-10-07 um 12:16 schrieb <Robin.Kirkham@csiro.au>: > Have you tried attaching to the stalled processes using strace (Linux) > or dtruss (Mac)? This will tell you what system call is blocking, > might > give a clue. The defunct uname process in your original post suggests > to me the parent did not calling wait() on the child (uname) and it > exited. Here's the output of strace after I killed the stalled process: execve("/var/opt/context/tex/texmf-linux-64/bin/context", ["/var/opt/ context/tex/texmf-linux"..., "--batchmode", "--once", "prd_streifband- d"], [/* 10 vars */]) = 0 brk(0) = 0x1e4bd000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ababa192000 uname({sys="Linux", node="aine.fiee.net", ...}) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ababa193000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=20573, ...}) = 0 mmap(NULL, 20573, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2ababa195000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/libncurses.so.5", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320% \1\0\0\0\0\0@"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=256288, ...}) = 0 mmap(NULL, 2353152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ababa393000 mprotect(0x2ababa3ce000, 2093056, PROT_NONE) = 0 mmap(0x2ababa5cd000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_FIXED|MAP_DENYWRITE, 3, 0x3a000) = 0x2ababa5cd000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/libdl.so.2", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> \0\1\0\0\0\20\16\0\0\0\0\0\0@"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=14616, ...}) = 0 mmap(NULL, 2109728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ababa5d2000 mprotect(0x2ababa5d4000, 2097152, PROT_NONE) = 0 mmap(0x2ababa7d4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_DENYWRITE, 3, 0x2000) = 0x2ababa7d4000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0> \0\1\0\0\0\300\342\1\0\0\0\0\0@"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1375536, ...}) = 0 mmap(NULL, 3482232, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ababa7d6000 mprotect(0x2ababa920000, 2093056, PROT_NONE) = 0 mmap(0x2ababab1f000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_FIXED|MAP_DENYWRITE, 3, 0x149000) = 0x2ababab1f000 mmap(0x2ababab24000, 17016, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ababab24000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ababab29000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ababab2a000 arch_prctl(ARCH_SET_FS, 0x2ababab29af0) = 0 mprotect(0x2ababab1f000, 12288, PROT_READ) = 0 munmap(0x2ababa195000, 20573) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 open("/dev/tty", O_RDWR|O_NONBLOCK) = -1 ENXIO (No such device or address) ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff561b3e10) = -1 EINVAL (Invalid argument) brk(0) = 0x1e4bd000 brk(0x1e4be000) = 0x1e4be000 brk(0x1e4bf000) = 0x1e4bf000 getuid() = 1005 getgid() = 1006 geteuid() = 1005 getegid() = 1006 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 brk(0x1e4c0000) = 0x1e4c0000 open("/proc/meminfo", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ababa195000 read(3, "MemTotal: 2097152 kB\nMemFree"..., 4096) = 771 close(3) = 0 munmap(0x2ababa195000, 4096) = 0 brk(0x1e4c1000) = 0x1e4c1000 rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0 uname({sys="Linux", node="aine.fiee.net", ...}) = 0 stat("/var/www/xxx/_textemp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 getpid() = 26040 getppid() = 26038 brk(0x1e4c2000) = 0x1e4c2000 socket(PF_FILE, SOCK_STREAM, 0) = 3 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = 0 sendto(3, "\2\0\0\0\v\0\0\0\7\0\0\0passwd\0"..., 19, MSG_NOSIGNAL, NULL, 0) = 19 poll([{fd=3, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=3, revents=POLLIN|POLLHUP}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(2)=[{"passwd\0"..., 7}, {"\270O \3\0\0\0\0\0"..., 8}], msg_controllen=24, {cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, {4}}, msg_flags=0}, MSG_CMSG_CLOEXEC) = 15 mmap(NULL, 217016, PROT_READ, MAP_SHARED, 4, 0) = 0x2ababa195000 close(4) = 0 close(3) = 0 brk(0x1e4c3000) = 0x1e4c3000 getpgrp() = 29995 rt_sigaction(SIGCHLD, {0x439730, [], SA_RESTORER, 0x2ababa807f60}, {SIG_DFL}, 8) = 0 getrlimit(RLIMIT_NPROC, {rlim_cur=582*1024, rlim_max=582*1024}) = 0 brk(0x1e4c4000) = 0x1e4c4000 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 open("/var/opt/context/tex/texmf-linux-64/bin/context", O_RDONLY) = 3 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff561b3e80) = -1 ENOTTY (Inappropriate ioctl for device) lseek(3, 0, SEEK_CUR) = 0 read(3, "#!/bin/sh\nmtxrun --script context"..., 80) = 39 lseek(3, 0, SEEK_SET) = 0 getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0 dup2(3, 255) = 255 close(3) = 0 fcntl(255, F_SETFD, FD_CLOEXEC) = 0 fcntl(255, F_GETFL) = 0x8000 (flags O_RDONLY| O_LARGEFILE) fstat(255, {st_mode=S_IFREG|0755, st_size=39, ...}) = 0 lseek(255, 0, SEEK_CUR) = 0 brk(0x1e4c5000) = 0x1e4c5000 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 read(255, "#!/bin/sh\nmtxrun --script context"..., 39) = 39 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 brk(0x1e4c6000) = 0x1e4c6000 stat(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat("/var/opt/context/tex/texmf-linux-64/bin/mtxrun", {st_mode=S_IFREG|0755, st_size=428842, ...}) = 0 open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 3 read(3, "65536\n"..., 31) = 6 close(3) = 0 brk(0x1e546000) = 0x1e546000 getgroups(65536, [1006]) = 1 stat("/var/opt/context/tex/texmf-linux-64/bin/mtxrun", {st_mode=S_IFREG|0755, st_size=428842, ...}) = 0 brk(0x1e547000) = 0x1e547000 rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID| SIGCHLD, child_tidptr=0x2ababab29b80) = 26041 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGINT, {0x43a340, [], SA_RESTORER, 0x2ababa807f60}, {SIG_DFL}, 8) = 0 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGTERM}], 0, NULL) = 26041 write(2, "/var/opt/context/tex/texmf-linux-"..., 116/var/opt/context/ tex/texmf-linux-64/bin/context: line 2: 26041 Terminated mtxrun --script context "$@" ) = 116 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 --- SIGCHLD (Child exited) @ 0 (0) --- wait4(-1, 0x7fff561b3b74, WNOHANG, NULL) = -1 ECHILD (No child processes) rt_sigreturn(0x8) = 0 rt_sigaction(SIGINT, {SIG_DFL}, {0x43a340, [], SA_RESTORER, 0x2ababa807f60}, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 read(255, ""..., 39) = 0 exit_group(143) = ? Can you tell what's going on? Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-07 9:00 ` Henning Hraban Ramm 2010-10-07 9:06 ` Taco Hoekwater 2010-10-07 10:16 ` Robin.Kirkham @ 2010-10-07 10:27 ` Patrick Gundlach 2010-10-07 15:44 ` Henning Hraban Ramm 2 siblings, 1 reply; 46+ messages in thread From: Patrick Gundlach @ 2010-10-07 10:27 UTC (permalink / raw) To: mailing list for ConTeXt users Hi Hraban, > > How's ConTeXt called in ConTeXtgarden Live? Any special means? Please CC me for these kind of questions, for I don't follow the list every day. I've put context live into a repo at github: http://github.com/pgundlach/contextlive and take a look at http://github.com/pgundlach/contextlive/blob/master/runtexexec.c I use fork()/exec() combination in C. Patrick ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-07 10:27 ` Patrick Gundlach @ 2010-10-07 15:44 ` Henning Hraban Ramm 2010-10-07 15:48 ` luigi scarso 0 siblings, 1 reply; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-07 15:44 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Patrick Gundlach Am 2010-10-07 um 12:27 schrieb Patrick Gundlach: >> How's ConTeXt called in ConTeXtgarden Live? Any special means? > > http://github.com/pgundlach/contextlive/blob/master/runtexexec.c > > I use fork()/exec() combination in C. Ok, I won't use C... I guess it's a problem of my specific combination of Ubuntu/SElinux, Django/fcgi and LuaTeX... :-( I found others running latex from Django in exactly the same matter as ConTeXt fails for me. But I can call other programs that way, so part of the problem is in LuaTeX. Greetlings, Hraban ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-07 15:44 ` Henning Hraban Ramm @ 2010-10-07 15:48 ` luigi scarso 2010-10-07 16:15 ` Henning Hraban Ramm 0 siblings, 1 reply; 46+ messages in thread From: luigi scarso @ 2010-10-07 15:48 UTC (permalink / raw) To: mailing list for ConTeXt users On Thu, Oct 7, 2010 at 5:44 PM, Henning Hraban Ramm <hraban@fiee.net> wrote: > Am 2010-10-07 um 12:27 schrieb Patrick Gundlach: > >>> How's ConTeXt called in ConTeXtgarden Live? Any special means? >> >> http://github.com/pgundlach/contextlive/blob/master/runtexexec.c >> >> I use fork()/exec() combination in C. > > Ok, I won't use C... > > I guess it's a problem of my specific combination of Ubuntu/SElinux, > Django/fcgi and LuaTeX... :-( > I found others running latex from Django in exactly the same matter as > ConTeXt fails for me. > But I can call other programs that way, so part of the problem is in LuaTeX. 1) Are you sure to have done source setuptex before run luatex 2) does os.system(...) in python only work ? -- luigi ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: calling ConTeXt as a background process 2010-10-07 15:48 ` luigi scarso @ 2010-10-07 16:15 ` Henning Hraban Ramm 0 siblings, 0 replies; 46+ messages in thread From: Henning Hraban Ramm @ 2010-10-07 16:15 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2010-10-07 um 17:48 schrieb luigi scarso: >>>> How's ConTeXt called in ConTeXtgarden Live? Any special means? >>> http://github.com/pgundlach/contextlive/blob/master/runtexexec.c >>> I use fork()/exec() combination in C. >> Ok, I won't use C... I saw you set TEXMFHOME - I don't need that for MkIV, do I? > 1) Are you sure to have done source setuptex before run luatex tried that and tried to set TEXROOT and TEXMFOS "manually" (and the output of "set" looks right). > 2) does os.system(...) in python only work ? Thank you, I didn't think of the easiest option! With strace I get a return code of 0, so the command seems to run through, nothing hangs, but also nothing happens. Without strace texlua hangs, and after killing it I get a 36608 (don't know what that is, it's not the PID). Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 46+ messages in thread
end of thread, other threads:[~2010-10-26 21:32 UTC | newest] Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-10-07 7:06 calling ConTeXt as a background process 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 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
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).