Strange behaviour of luarocks

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Strange behaviour of luarocks

Bernd Eggink
Since some time (don't know exactly when) any call of 'luarocks', even a
call without parameters, ends with a segmentation fault. Everything goes
well until that point, however. Neither re-compiling luarocks from the
sources nor 'luarocks install luarocks` changes this behaviour.
I'm on Linux, distribution is Crux. This is what 'strace luarocks`
prints out:

...
write(1, "\tLua version: 5.3\n", 18     Lua version: 5.3
)    = 18
write(1, "\tConfiguration files:\n", 22 Configuration files:
) = 22
write(1, "\t\tSystem: /etc/luarocks/config-5"..., 44            System:
/etc/luarocks/config-5.3.lua (ok)
) = 44
write(1, "\t\tUser  : /root/.luarocks/config"..., 53            User  :
/root/.luarocks/config-5.3.lua (not found)
) = 53
write(1, "\n", 1
)                       = 1
write(1, "\tRocks trees in use: \n", 22 Rocks trees in use:
) = 22
write(1, "\t\t/root/.luarocks (\"user\")\n", 27         /root/.luarocks
("user")
) = 27
write(1, "\t\t/usr (\"system\")\n", 18          /usr ("system")
) = 18
getcwd("/root", 4096)                   = 6
chdir("/")                              = 0
rt_sigaction(SIGINT, {SIG_DFL, [],
SA_RESTORER|SA_INTERRUPT|SA_NODEFER|SA_RESETHAND, 0x7f1862e71570},
{0x4041c0, [], SA_RESTORERUPT|SA_NODEFER|SA_RESETHAND, 0x7f1862e71570},
8) = 0
munmap(0x7f1862396000, 2258536)         = 0
munmap(0x7f186215e000, 2322944)         = 0
munmap(0x7f1861f56000, 2128864)         = 0
munmap(0x7f1861d39000, 2213040)         = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR,
si_addr=0x7f1861d44170} ---
+++ killed by SIGSEGV +++
Segmentation fault

Any ideas?

Greetings
Bernd

Reply | Threaded
Open this post in threaded view
|

Re: Strange behaviour of luarocks

Ignacio Burgueño-2
It may be some C module that is being required. Edit your config file (/etc/luarocks/config-5.3.lua) and add the following:
use_fs_modules = false

Also, does simply running the intepreter segfaults? Can you try to get a stack trace by using gdb?

Reply | Threaded
Open this post in threaded view
|

Re: Strange behaviour of luarocks: issue with luasec

Bernd Eggink
In reply to this post by Bernd Eggink
Am 26.02.2016 um 12:00 schrieb Bernd Eggink:
> Since some time (don't know exactly when) any call of 'luarocks', even a
> call without parameters, ends with a segmentation fault.

I think I found the culprit. Some time ago I had followed the advice
luarocks prints when installing a rock:

"Warning: falling back to curl - install luasec to get native HTTPS
support".

and installed luasec. This module causes an "undefined symbol:
luaL_checkint" error when luarocks requires "ssl.https" (in fs/lua.lua,
line 559), which indicates that it isn't suited for Lua 5.3 (although
the home page says "lua >= 5.1"). After removing luasec the segfault was
gone. Perhaps the above-mentioned warning should be modified if luarocks
is used under 5.3

Regards,
Bernd

Reply | Threaded
Open this post in threaded view
|

Re: Strange behaviour of luarocks: issue with luasec

Ignacio Burgueño-2
Good!
It is worth noting that the latest LuaSec release (0.6a or something) does support Lua 5.3. If you feel like trying, give this last version a go.

Regards,
Ignacio
Reply | Threaded
Open this post in threaded view
|

Re: Strange behaviour of luarocks: issue with luasec

Bernd Eggink
Am 27.02.2016 um 18:52 schrieb Ignacio Burgueño:
> Good!
> It is worth noting that the latest LuaSec release (0.6a or something)
> does support Lua 5.3. If you feel like trying, give this last version a go.

The latest version is scm-1. I was able to install it by downloading the
rockspec first (a direct install didn't work). And yes, it seems to work
under 5.3, and luarocks no longer spits out the segfault message.

- Bernd