Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-built grin 1.0.1 binary fails with illegal instruction vmovdqa in ra_portable_serialize() #2519

Closed
dwayneem opened this issue Feb 3, 2019 · 2 comments

Comments

@dwayneem
Copy link

dwayneem commented Feb 3, 2019

Describe the bug
The prebuilt grin binary downloaded from https://github.com/mimblewimble/grin/releases/download/v1.0.1/grin-v1.0.1-487947758-linux-amd64.tgz
fails with illegal instruction
on Ubuntu Server 18.04.1, Ubuntu Server 16.05

To Reproduce
Steps to reproduce the behavior:
wget https://github.com/mimblewimble/grin/releases/download/v1.0.1/grin-v1.0.1-487947758-linux-amd64.tgz
tar -xvzf grin-v1.0.1-487947758-linux-amd64.tgz
./grin
Illegal instruction (core dumped)

cat ~/.grin/main/grin-server.log
20190203 14:34:02.870 INFO grin_util::logger - log4rs is initialized, file level: Info, stdout level: Warn, min. level: Info
20190203 14:34:02.870 INFO grin - Using configuration file at /home/dwayne/.grin/main/grin-server.toml
20190203 14:34:02.870 INFO grin - This is Grin version 1.0.1 (git v1.0.1), built for x86_64-unknown-linux-gnu by rustc 1.32.0 (9fda7c223 2019-01-16).
20190203 14:34:02.870 WARN grin::cmd::server - Starting GRIN in UI mode...
20190203 14:34:02.871 INFO grin_servers::grin::server - Starting server, genesis block: 40adad0aec27

(gdb) where
#0 0x0000555555e04ee2 in ra_portable_serialize ()
#1 0x0000555555dae1e3 in grin_store::leaf_set::LeafSet::flush ()
#2 0x0000555555d9cac8 in <grin_store::pmmr::PMMRBackend>::sync ()
#3 0x0000555555d45ec1 in grin_chain::txhashset::txhashset::extending ()
#4 0x0000555555d5ede7 in grin_chain::chain::Chain::init ()
#5 0x00005555558a65ef in grin_servers::grin::server::Server::new ()
#6 0x0000555555695294 in grin::cmd::server::start_server ()
#7 0x0000555555696939 in grin::cmd::server::server_command ()
#8 0x00005555557149cd in grin::real_main ()
#9 0x0000555555712f16 in grin::main ()
#10 0x00005555557010d3 in std::rt::lang_start::{{closure}} ()
#11 0x0000555555f5e143 in std::rt::lang_start_internal::{{closure}} ()
at src/libstd/rt.rs:59
#12 std::panicking::try::do_call () at src/libstd/panicking.rs:310
#13 0x0000555555f7474a in __rust_maybe_catch_panic ()
at src/libpanic_unwind/lib.rs:102
#14 0x0000555555f5eb14 in std::panicking::try () at src/libstd/panicking.rs:289
#15 std::panic::catch_unwind () at src/libstd/panic.rs:398
#16 std::rt::lang_start_internal () at src/libstd/rt.rs:58
#17 0x0000555555715332 in main ()

(gdb) layout asm
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk

x0x555555e04ee2 <ra_portable_serialize+274> vmovdqa 0x291c46(%rip),%xmmx
x0x555555e04eea <ra_portable_serialize+282> xor %ecx,%ecx x
x0x555555e04eec <ra_portable_serialize+284> vmovdqa 0x291c4c(%rip),%xmmx
x0x555555e04ef4 <ra_portable_serialize+292> mov 0x10(%rbx),%rax x
x0x555555e04ef8 <ra_portable_serialize+296> movzwl (%rax,%rcx,2),%eax x
x0x555555e04efc <ra_portable_serialize+300> mov %ax,(%r12) x
x0x555555e04f01 <ra_portable_serialize+305> mov 0x18(%rbx),%rax x
x0x555555e04f05 <ra_portable_serialize+309> movzbl (%rax,%rcx,1),%edx x
x0x555555e04f09 <ra_portable_serialize+313> mov 0x8(%rbx),%rax x
x0x555555e04f0d <ra_portable_serialize+317> cmp $0x4,%dl x
x0x555555e04f10 <ra_portable_serialize+320> mov (%rax,%rcx,8),%rsi x
x0x555555e04f14 <ra_portable_serialize+324> je 0x555555e04fe0 <ra_px
x0x555555e04f1a <ra_portable_serialize+330> cmp $0x2,%dl x
x0x555555e04f1d <ra_portable_serialize+333> je 0x555555e04f50 <ra_px
x0x555555e04f1f <ra_portable_serialize+335> cmp $0x3,%dl x
x0x555555e04f22 <ra_portable_serialize+338> je 0x555555e04ff8 <ra_px
x0x555555e04f28 <ra_portable_serialize+344> cmp $0x1,%dl x
x0x555555e04f2b <ra_portable_serialize+347> je 0x555555e04f50 <ra_px
x0x555555e04f2d <ra_portable_serialize+349> lea 0x29199c(%rip),%rcx x
x0x555555e04f34 <ra_portable_serialize+356> mov $0xed9,%edx x
x0x555555e04f39 <ra_portable_serialize+361> lea 0x290f68(%rip),%rsi x
x0x555555e04f40 <ra_portable_serialize+368> lea 0x2a8437(%rip),%rdi x
x0x555555e04f47 <ra_portable_serialize+375> callq 0x55555565a220 <__asx
x0x555555e04f4c <ra_portable_serialize+380> nopl 0x0(%rax) x
x0x555555e04f50 <ra_portable_serialize+384> mov (%rsi),%edx x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

If I build it from the corresponding github source it runs fine. Is the prebuilt binary being built targeting an unnecessarily modern CPU that has this vmovdqa instruction?

@dwayneem dwayneem changed the title Pre-built grin 1.0.1 binary from https://github.com/mimblewimble/grin/releases/download/v1.0.1/grin-v1.0.1-487947758-linux-amd64.tgz fails with return code 101 Pre-built grin 1.0.1 binary from https://github.com/mimblewimble/grin/releases/download/v1.0.1/grin-v1.0.1-487947758-linux-amd64.tgz fails with illegal instruction in ra_portable_serialize() Feb 3, 2019
@dwayneem dwayneem changed the title Pre-built grin 1.0.1 binary from https://github.com/mimblewimble/grin/releases/download/v1.0.1/grin-v1.0.1-487947758-linux-amd64.tgz fails with illegal instruction in ra_portable_serialize() Pre-built grin 1.0.1 binary fails with illegal instruction vmovdqa in ra_portable_serialize() Feb 3, 2019
@hashmap
Copy link
Contributor

hashmap commented Feb 3, 2019

Pretty sure it’s a duplicate of #2494

Would you mind to run cat /proc/cpuinfo | grep avx on that machine?

@hashmap
Copy link
Contributor

hashmap commented Feb 3, 2019

Oh, sorry, I was replying to the original description I saw in an email, you have confirmed already it’s AVX issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants