steemit / steem

The blockchain for Smart Media Tokens (SMTs) and decentralized applications.
https://steem.com
Other
1.95k stars 790 forks source link

[develop] steem binary in docker image: Illegal instruction on non-AWS machines #2335

Open Gandalf-the-Grey opened 6 years ago

Gandalf-the-Grey commented 6 years ago

Binary taken from current steemit/steem:develop results in Illegal instruction when executed on non-AWS instance.

Program terminated with signal SIGILL, Illegal instruction.
#0  0x000000000127dde9 in rocksdb::LRUCache::LRUCache(unsigned long, int, bool, double) ()

Thread 1 (Thread 0x7f67125fba00 (LWP 13372)):
#0  0x000000000127dde9 in rocksdb::LRUCache::LRUCache(unsigned long, int, bool, double) ()
#1  0x000000000127e2b7 in rocksdb::NewLRUCache(unsigned long, int, bool, double) ()
#2  0x0000000001202258 in rocksdb::BlockBasedTableFactory::BlockBasedTableFactory(rocksdb::BlockBasedTableOptions const&) ()
#3  0x00000000011ea22d in rocksdb::ColumnFamilyOptions::ColumnFamilyOptions() ()
#4  0x0000000000d755c3 in __static_initialization_and_destruction_0(int, int) [clone .constprop.1293] ()
#5  0x0000000001d81a6d in __libc_csu_init ()
#6  0x00007f67117077bf in __libc_start_main (main=0xd6a750 <main>, argc=1, argv=0x7fffabc8d218, init=0x1d81a20 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffabc8d208) at ../csu/libc-start.c:247
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, 140080650941195, 140080654743504, 1, 140736075452952, 140736075452968, 1, 140080664491706}, mask_was_saved = 28}}, priv = {pad = {0x1d81a20 <__libc_csu_init>, 0x7fffabc8d218, 0x1, 0xd6a750 <main>}, data = {prev = 0x1d81a20 <__libc_csu_init>, cleanup = 0x7fffabc8d218, canceltype = 1}}}
        not_first_call = <optimized out>
#7  0x0000000000e59939 in _start ()
theoreticalbts commented 6 years ago

I found out by running in GDB that the binary includes an instruction uses the AVX-512 zmm registers. We need to think about what CPU our image should be built to target...