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

SIGILL: illegal instruction when running smartbchd init mynode --chain-id 0x2710 #28

Open
smacz42 opened this issue Oct 25, 2021 · 4 comments

Comments

@smacz42
Copy link

smacz42 commented Oct 25, 2021

Hey all,

I'm looking to run this on an older physical server while building the docker container, and ran into this:

Step 41/48 : RUN /build/smartbchd init mynode --chain-id 0x2710
 ---> Running in 191b445970c5
SIGILL: illegal instruction
PC=0xbfd520 m=0 sigcode=2
instruction bytes: 0xf 0x1 0xf9 0x48 0xc1 0xe2 0x20 0x48 0x1 0xd0 0x48 0x89 0x44 0x24 0x8 0xf

goroutine 1 [running, locked to thread]:
github.com/dterei/gotsc.BenchEnd(0x25965d4526d14)
        /go/pkg/mod/github.com/dterei/gotsc@v0.0.0-20160722215413-e78f872945c6/tsc_amd64.s:18 fp=0xc0001ff838 sp=0xc0001ff830 pc=0xbfd520
github.com/dterei/gotsc.TSCOverhead(0x6)
        /go/pkg/mod/github.com/dterei/gotsc@v0.0.0-20160722215413-e78f872945c6/tsc.go:36 +0x48 fp=0xc0001ff868 sp=0xc0001ff838 pc=0xbfd4a8
github.com/smartbch/moeingads/datatree.init.0()
        /go/pkg/mod/github.com/smartbch/moeingads@v0.3.0/datatree/tree.go:76 +0x37 fp=0xc0001ffa48 sp=0xc0001ff868 pc=0xc0bbb7
runtime.doInit(0x1d70980)
        /usr/local/go/src/runtime/proc.go:6309 +0xec fp=0xc0001ffb98 sp=0xc0001ffa48 pc=0x45e42c
runtime.doInit(0x1d6fe40)
        /usr/local/go/src/runtime/proc.go:6286 +0x72 fp=0xc0001ffce8 sp=0xc0001ffb98 pc=0x45e3b2
runtime.doInit(0x1d77920)
        /usr/local/go/src/runtime/proc.go:6286 +0x72 fp=0xc0001ffe38 sp=0xc0001ffce8 pc=0x45e3b2
runtime.doInit(0x1d7a220)
        /usr/local/go/src/runtime/proc.go:6286 +0x72 fp=0xc0001fff88 sp=0xc0001ffe38 pc=0x45e3b2
runtime.main()
        /usr/local/go/src/runtime/proc.go:208 +0x205 fp=0xc0001fffe0 sp=0xc0001fff88 pc=0x450785
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1371 +0x1 fp=0xc0001fffe8 sp=0xc0001fffe0 pc=0x488241

rax    0x25965d4526d14
rbx    0x756e6547
rcx    0x6c65746e
rdx    0x2596500000000
rdi    0x1d70a10
rsi    0xf
rbp    0xc0001ff858
rsp    0xc0001ff830
r8     0x0
r9     0x20
r10    0x7a00c056
r11    0x2
r12    0x7a00c00e
r13    0x48
r14    0x200
r15    0xffffffffffffffff
rip    0xbfd520
rflags 0x10206
cs     0x33
fs     0x0
gs     0x0
The command '/bin/sh -c /build/smartbchd init mynode --chain-id 0x2710' returned a non-zero code: 2

Here are my CPU specs:

processor       : 0                                                                                                    
vendor_id       : GenuineIntel                             
cpu family      : 6                                                                                                    
model           : 23                                       
model name      : Intel(R) Xeon(R) CPU           E5420  @ 2.50GHz                                                      
stepping        : 6                                        
microcode       : 0x60f                                                                                                                                                                                                                       
cpu MHz         : 2009.729                                                                                                                                                                                                                    cache size      : 6144 KB                                                                                                                                                                                                                     
physical id     : 0                                                                                                                                                                                                                           
siblings        : 4                                                                                                                                                                                                                           
core id         : 0                                                                                                                                                                                                                           
cpu cores       : 4                                                                                                    
apicid          : 0                                                                                                                                                                                                                           
initial apicid  : 0                                                                                                    
fpu             : yes                                                                                                                                                                                                                         
fpu_exception   : yes                                                                                                  
cpuid level     : 10                                                                                                                                                                                                                          
wp              : yes                                                                                                  
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor d
s_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 lahf_lm pti tpr_shadow vnmi flexpriority dtherm                      
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit                   
bogomips        : 4987.45                                                                                              
clflush size    : 64                                       
cache_alignment : 64                                                                                                                                                                                                                          
address sizes   : 38 bits physical, 48 bits virtual                                                                                                                                                                                           
power management:                                                                                                                                                                                                                             

Any thoughts?

@agilewalker
Copy link
Contributor

agilewalker commented Dec 8, 2021

It looks like SSE4.2 is not supported by your CPU. If that's the issue, it can be resolved by recompiling the rocksdb lib. Check out the doc

@RootBlocker
Copy link

I had that same problem with my older server with Xeon CPU. I was running ProxMox opensource VM. The CPU hardware was set to the default "kvm64". But I changed it to "host" and it seems to solve that issue.

@scherrey
Copy link

scherrey commented Feb 2, 2022

It would seem this issue is also breaking the CI for SmartBCH now. Either they need to change whatever virtual CPU the CI is running or build rocksdb without the SSE4.2 capabilities.

https://github.com/smartbch/smartbch/runs/4950130342

@sajal
Copy link

sajal commented Feb 2, 2022

It looks like SSE4.2 is not supported by your CPU. If that's the issue, it can be resolved by recompiling the rocksdb lib. Check out the doc

I think the stack trace traces to the TSC library in use, and not rocksdb yet.

I see the original call at : https://github.com/smartbch/moeingads/blob/v0.3.0/datatree/tree.go#L76 , but I cant find if anything is making use of the resulting tscOverhead value. Maybe just getting rid of it removes this class of errors? It seems to me that its leftover from when a developer was fine-tuning the algorithms.

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

5 participants