openresty / luajit2

OpenResty's Branch of LuaJIT 2
https://luajit.org/luajit.html
Other
1.2k stars 193 forks source link

Illegal instruction (core dumped) error when running LuaJIT on qemu-system-s390x #227

Open wojiushixiaobai opened 2 months ago

wojiushixiaobai commented 2 months ago

As the title suggests, I'm encountering an Illegal instruction (core dumped) error when running LuaJIT on qemu-system-s390x. Here are the steps to reproduce the issue:

docker run --privileged --rm tonistiigi/binfmt --install all
docker run --platform linux/s390x --rm -it openresty/openresty:1.25.3.1-3-bionic-s390x bash
luarocks --help

This issue only occurs on the linux/s390x platform. The same code does not produce this error when built on other architectures. Any help or guidance on this issue would be greatly appreciated.

lysliu commented 2 months ago

this works well on a s390x host, so it seems a bug on the qemu-system-s390x

root@e7cbf590f0b9:/# uname -a
Linux e7cbf590f0b9 4.18.0-477.27.1.el8_8.s390x #1 SMP Thu Aug 31 10:47:02 EDT 2023 s390x s390x s390x GNU/Linux
root@e7cbf590f0b9:/# luarocks --help
Usage: luarocks [-h] [--version] [--dev] [--server <server>]
       [--only-server <server>] [--only-sources <url>]
       [--namespace <namespace>] [--lua-dir <prefix>]
       [--lua-version <ver>] [--tree <tree>] [--local] [--global]
       [--no-project] [--force-lock] [--verbose] [--timeout <seconds>]
       [<command>] ...

LuaRocks 3.11.0, the Lua package manager