lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Here is more information:

~/src/LuaJIT-1.1.1 $ uname -a
Darwin signal.local 8.6.1 Darwin Kernel Version 8.6.1: Tue Mar  7
16:55:45 PST 2006; root:xnu-792.9.22.obj~1/RELEASE_I386 i386 i386
~/src/LuaJIT-1.1.1 $ gcc --version
i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5341)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(gdb) file ./src/luajit
Reading symbols for shared libraries .. done
Reading symbols from /Users/kent/Apps/LuaJIT-1.1.1/src/luajit...done.
(gdb) b ldebug.c:561
Breakpoint 1 at 0x778c: file ldebug.c, line 561.
(gdb) r
Starting program: /Users/kent/Apps/LuaJIT-1.1.1/src/luajit
Reading symbols for shared libraries . done
Lua 5.1.1  Copyright (C) 1994-2006 Lua.org, PUC-Rio
LuaJIT 1.1.1  Copyright (C) 2005-2006 Mike Pall


Breakpoint 1, luaG_typeerror (L=0x304578, o=0x1805010, op=0x33b48
"call") at ldebug.c:561
561         luaG_runerror(L, "attempt to %s a %s value", op, t);
(gdb) where
#0  luaG_typeerror (L=0x304578, o=0x1805010, op=0x33b48 "call") at ldebug.c:561
#1  0x0000832d in luaD_tryfuncTM (L=0x304578, func=0x1805010) at ldo.c:249
#2  0x00008411 in luaD_precall (L=0x304578, func=0x1805010,
nresults=-1) at ldo.c:269
#3  0x00008a77 in resume (L=0x304578, ud=0x1805020) at ldo.c:395
#4  0x00007d5a in luaD_rawrunprotected (L=0x304578, f=0x8a3a <resume>,
ud=0x1805020) at ldo.c:117
#5  0x00008c79 in lua_resume (L=0x304578, nargs=1) at ldo.c:435
#6  0x00032200 in frontwrap (L=0x3000f8, st=0x302170) at ljitlib.c:294
#7  0x00016eda in jit_compile (L=0x3000f8, func=0x1800430,
st=0x302170, force=0) at ljit_core.c:183
#8  0x00017051 in luaJIT_run (L=0x3000f8, func=0x1800430, nresults=-1)
at ljit_core.c:218
#9  0x000084ad in luaD_precall (L=0x3000f8, func=0x1800430,
nresults=-1) at ldo.c:281
#10 0x000089eb in luaD_call (L=0x3000f8, func=0x1800430, nResults=-1)
at ldo.c:383
#11 0x000057e6 in f_call (L=0x3000f8, ud=0xbffff72c) at lapi.c:796
#12 0x00007d5a in luaD_rawrunprotected (L=0x3000f8, f=0x57bc <f_call>,
ud=0xbffff72c) at ldo.c:117
#13 0x00008dbb in luaD_pcall (L=0x3000f8, func=0x57bc <f_call>,
u=0xbffff72c, old_top=48, ef=32) at ldo.c:468
#14 0x0000587c in lua_pcall (L=0x3000f8, nargs=0, nresults=-1,
errfunc=1) at lapi.c:817
#15 0x0000297a in docall (L=0x3000f8, narg=0, clear=0) at lua.c:103
#16 0x00003046 in dotty (L=0x3000f8) at lua.c:223
#17 0x00003c7f in pmain (L=0x3000f8) at lua.c:438
#18 0x000087a3 in luaD_precall (L=0x3000f8, func=0x1800410,
nresults=0) at ldo.c:326
#19 0x000089eb in luaD_call (L=0x3000f8, func=0x1800410, nResults=0)
at ldo.c:383
#20 0x00005963 in f_Ccall (L=0x3000f8, ud=0xbffff994) at lapi.c:842
#21 0x00007d5a in luaD_rawrunprotected (L=0x3000f8, f=0x58b0
<f_Ccall>, ud=0xbffff994) at ldo.c:117
#22 0x00008dbb in luaD_pcall (L=0x3000f8, func=0x58b0 <f_Ccall>,
u=0xbffff994, old_top=16, ef=0) at ldo.c:468
#23 0x000059b9 in lua_cpcall (L=0x3000f8, func=0x3a84 <pmain>,
ud=0xbffff9dc) at lapi.c:852
#24 0x00003d06 in main (argc=1, argv=0xbffffa64) at lua.c:456

I hope it helps.

On 6/23/06, Mike Pall <mikelu-0606@mike.de> wrote:
Hi,

Kent Sibilev wrote:
> Coco is great and works fine on my OSX Intel. But LuaJIT gives me:
>
> [LuaJIT frontend failed: attempt to call a thread value]
>
> all the time. Do you know what might be a problem?

Actually someone else had the same problem with LuaJIT on OS X.
I gave some instructions on how to debug this further, but never
heard back. Seems it's a real issue though. :-(

I have no access to an Intel Mac, so I can't debug this myself.
Please try to help me find the problem, by answering these
questions:

Do you always get this? Even for trivial programs like:
  luajit -e 'print("Hello World!")'
  luajit -O -e 'print("Hello World!")'
Or do you get this only in specific situations or only when you
enable the LuaJIT optimizer with -O? If yes, then try -j trace to
see where it fails (or see the last function before it fails).

Can you tell me more about your system?
  uname -a
  gcc --version

Also whether you made any changes or if you are just using
'make macosx'. You might try changing the optimization flags in
src/Makefile from -O3 -fomit-frame-pointer to something less
aggressive, like -O2 and see if you get the same error.

If you know your way around the LuaJIT sources, you can try
debugging the functions 'frontwrap' and 'j_frontend' and see
where it bombs out and what's on the Lua stack before it does so.
I'm assuming the lua_call() in j_frontend is raising the error,
but I have no idea why ...

If this is not a compiler problem and nobody with an Intel Mac
can debug this, I'll probably need a (non-root) ssh login to an
Intel Mac to further diagnose the problem.

Bye,
     Mike



--
Kent
---
http://www.datanoise.com