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