supranational / blst

Multilingual BLS12-381 signature library
Apache License 2.0
471 stars 177 forks source link

Github CI errors with SIGILL: illegal instruction #117

Closed metachris closed 2 years ago

metachris commented 2 years ago

Often Github CI errors out with SIGILL: illegal instruction

Example: https://github.com/flashbots/mev-boost/runs/6590134526?check_suite_focus=true

rax    0x9a783fd6c10a651b
rbx    0xef5b40
rcx    0xef5ae0
rdx    0x2b6cedcb87925c23
rdi    0x7f3533a88d70
rsi    0x7f3533a88cf0
rbp    0xb0b8203fa0631f2b
rsp    0x7f3533a88b58
r8     0xfffffffeffffffff
r9     0x1626c509109076fc
r10    0x269225443ef59ae5
r11    0x2c75cea78c00f8cf
r12    0x67ea124eb4c[80](https://github.com/flashbots/mev-boost/runs/6590134526?check_suite_focus=true#step:8:81)372
r13    0x311b22b1a5048b9d
r14    0x4d16a109bf961c7d
r15    0x0
rip    0xb6a[85](https://github.com/flashbots/mev-boost/runs/6590134526?check_suite_focus=true#step:8:86)7
rflags 0x10246
cs     0x33
fs     0x0
gs     0x0
make: *** [Makefile:61: run-mergemock-relay] Error 2
cd ./mergemock && ./mergemock consensus --slot-time=4s --engine http://127.0.0.1:8551 --builder http://127.0.0.1:18550 --slot-bound 10
time="2022-05-25T10:15:15Z" level="info" msg="Loaded JWT secret" val="a21a16ec22a940990922220e4ab5bf4c2310f55622220e4ab5bf4c2310f55656"
SIGILL: illegal instruction
PC=0xb6a857 m=7 sigcode=2
signal arrived during cgo execution
instruction bytes: 0xf3 0x4c 0xf 0x38 0xf6 0xdd 0x66 0x4d 0xf 0x38 0xf6 0xe1 0xc4 0x62 0xd3 0xf6

goroutine 9 [syscall]:
runtime.cgocall(0xb4ad80, 0xc000175588)
    /opt/hostedtoolcache/go/1.18.2/x64/src/runtime/cgocall.go:157 +0x5c fp=0xc000175560 sp=0xc000175528 pc=0x4219fc
github.com/supranational/blst/bindings/go._Cfunc_blst_keygen(0xc00003[87](https://github.com/flashbots/mev-boost/runs/6590134526?check_suite_focus=true#step:8:88)e0, 0xc0000387c0, 0x20, 0x0, 0x0)
    _cgo_gotypes.go:372 +0x45 fp=0xc0001755[88](https://github.com/flashbots/mev-boost/runs/6590134526?check_suite_focus=true#step:8:89) sp=0xc000175560 pc=0x[89](https://github.com/flashbots/mev-boost/runs/6590134526?check_suite_focus=true#step:8:90)3705
github.com/supranational/blst/bindings/go.KeyGen({0xc0000387c0, 0x20, 0x140bc40?}, {0x0, 0x0, 0xcbd680?})
    /home/runner/go/pkg/mod/github.com/supranational/blst@v0.3.7/bindings/go/blst.go:135 +0x9c fp=0xc0001755c8 sp=0xc000175588 pc=0x8961bc
github.com/prysmaticlabs/prysm/crypto/bls/blst.RandKey()
    /home/runner/go/pkg/mod/github.com/prysmaticlabs/prysm@v1.4.2-0.20220515031444-3d38[90](https://github.com/flashbots/mev-boost/runs/6590134526?check_suite_focus=true#step:8:91)205f40/crypto/bls/blst/secret_key.go:32 +0xae fp=0xc000175650 sp=0xc0001755c8 pc=0x8d7f4e
main.(*ConsensusCmd).Run(0xc0000ce000, {0xedd710?, 0xc00007f040}, {0x0?, 0xc0000da600?, 0x21?})
    /home/runner/work/mev-boost/mev-boost/mergemock/consensus.go:125 +0x66c fp=0xc000175950 sp=0xc000175650 pc=0xb1bacc
github.com/protolambda/ask.(*CommandDescription).Execute(0xc00009e400, {0xedd710, 0xc00007f040}, 0x0?, {0xc000134020, 0x7, 0x7})
    /home/runner/go/pkg/mod/github.com/protolambda/ask@v0.1.2/ask.go:574 +0x6e7 fp=0xc000175c60 sp=0xc000175950 pc=0xb06387
github.com/protolambda/ask.(*CommandDescription).Execute(0xc00009e380, {0xedd710, 0xc00007f040}, 0x0?, {0xc000134010, 0x8, 0x8})
    /home/runner/go/pkg/mod/github.com/protolambda/ask@v0.1.2/ask.go:476 +0x1b3 fp=0xc000175f70 sp=0xc000175c60 pc=0xb05e53
main.main.func2()
    /home/runner/work/mev-boost/mev-boost/mergemock/main.go:64 +0x85 fp=0xc000175fe0 sp=0xc000175f70 pc=0xb25305
runtime.goexit()
    /opt/hostedtoolcache/go/1.18.2/x64/src/runtime/asm_amd64.s:1571 +0x1 fp=0xc000175fe8 sp=0xc000175fe0 pc=0x48[93](https://github.com/flashbots/mev-boost/runs/6590134526?check_suite_focus=true#step:8:94)61
created by main.main
    /home/runner/work/mev-boost/mev-boost/mergemock/main.go:63 +0x1d1

See also: https://github.com/protolambda/mergemock/issues/39

nisdas commented 2 years ago

https://github.com/supranational/blst/issues/115

You need to enable the portable build on your CI. https://github.com/supranational/blst/blob/master/bindings/go/README.md#build

metachris commented 2 years ago

thanks!

dot-asm commented 2 years ago

Just in case, c9a86c6d4c379d6fbf5b635257517a21919c3249 attempts to improve the messaging. Cheers.