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

Illegal instruction trap is generated if CPU doesn't support AVX #371

Closed
pepyakin opened this issue Jul 25, 2018 · 0 comments · Fixed by #386
Closed

Illegal instruction trap is generated if CPU doesn't support AVX #371

pepyakin opened this issue Jul 25, 2018 · 0 comments · Fixed by #386
Labels
difficulty:hard difficulty:moderate priority:important The changes needed are critical for libp2p, or are blocking another project

Comments

@pepyakin
Copy link

pepyakin commented Jul 25, 2018

Looks like it tries to execute vpslldq instruction which requires AVX{1,2}, but my machine doesn't have it.

->  0x5555562028a1 <+129>: vpslldq $0x4, %xmm1, %xmm3        ; xmm3 = zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11]
    0x5555562028a6 <+134>: pxor   %xmm3, %xmm1
    0x5555562028aa <+138>: vpslldq $0x4, %xmm1, %xmm3        ; xmm3 = zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11]
    0x5555562028af <+143>: pxor   %xmm3, %xmm1
  * frame #0: 0x00005555562028a1 polkadot`rust_crypto_aesni_setup_working_key_128 + 129
    frame #1: 0x0000555556202837 polkadot`rust_crypto_aesni_setup_working_key_128 + 23
    frame #2: 0x0000555556202630 polkadot`crypto::aesni::setup_working_key_aesni_128::h3663a60c3718d2d7 + 16
    frame #3: 0x00005555561f7d68 polkadot`crypto::aes::ctr::hcd409ae49fa76732 + 232
    frame #4: 0x0000555556031601 polkadot`ring::agreement::agree_ephemeral::h74eb15fb2edfa616 + 897
    frame #5: 0x0000555555f8de54 polkadot`_$LT$futures..future..chain..Chain$LT$A$C$$u20$B$C$$u20$C$GT$$GT$::poll::h27b51bbc1bda4625 + 3668
    frame #6: 0x0000555555fdc39f polkadot`_$LT$futures..future..chain..Chain$LT$A$C$$u20$B$C$$u20$C$GT$$GT$::poll::hbd5d8a806eef6f2c + 63
    frame #7: 0x0000555555feb6af polkadot`_$LT$futures..future..chain..Chain$LT$A$C$$u20$B$C$$u20$C$GT$$GT$::poll::hda8e240e7f410487 + 63
    frame #8: 0x0000555555ffee59 polkadot`_$LT$futures..future..and_then..AndThen$LT$A$C$$u20$B$C$$u20$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::h153de392f1fb87e7 + 9
    frame #9: 0x0000555555e8f76c polkadot`_$LT$futures..future..map..Map$LT$A$C$$u20$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::hcb62ac26a84a7ad0 + 44
    frame #10: 0x0000555555e7e65c polkadot`_$LT$futures..future..map..Map$LT$A$C$$u20$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::h0a8842799bca4069 + 44
    frame #11: 0x0000555555f2509f polkadot`_$LT$futures..future..map_err..MapErr$LT$A$C$$u20$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::hdbac12a0d69b8468 + 31
    frame #12: 0x0000555555e91ff6 polkadot`_$LT$futures..future..map..Map$LT$A$C$$u20$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::hf39e99045591f7c0 + 38
    frame #13: 0x0000555555e7de5c polkadot`_$LT$futures..future..map..Map$LT$A$C$$u20$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::h0057167040c9ddc1 + 44
    frame #14: 0x0000555555fc6849 polkadot`_$LT$futures..future..chain..Chain$LT$A$C$$u20$B$C$$u20$C$GT$$GT$::poll::h9305c651f8ceaa44 + 137
    frame #15: 0x0000555555fec8ae polkadot`_$LT$futures..future..chain..Chain$LT$A$C$$u20$B$C$$u20$C$GT$$GT$::poll::hdb54c7f4dc6a2510 + 62
    frame #16: 0x0000555555e4be79 polkadot`_$LT$futures..future..then..Then$LT$A$C$$u20$B$C$$u20$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::he1d3dcfbf4904e54 + 9
    frame #17: 0x0000555555ff1bd3 polkadot`_$LT$futures..future..chain..Chain$LT$A$C$$u20$B$C$$u20$C$GT$$GT$::poll::he21d4d650693447e + 195
    frame #18: 0x0000555555ffeea9 polkadot`_$LT$futures..future..and_then..AndThen$LT$A$C$$u20$B$C$$u20$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::h4e16cad16a536a33 + 9
    frame #19: 0x0000555555e8dccb polkadot`_$LT$futures..future..map..Map$LT$A$C$$u20$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::hbca47f9d43cc00dd + 43
    frame #20: 0x0000555555fe61a0 polkadot`_$LT$futures..future..chain..Chain$LT$A$C$$u20$B$C$$u20$C$GT$$GT$::poll::hcd9ff43778395cab + 64
    frame #21: 0x0000555555ffef29 polkadot`_$LT$futures..future..and_then..AndThen$LT$A$C$$u20$B$C$$u20$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::h7dc9ae63efad2ede + 9
    frame #22: 0x0000555555ff55e2 polkadot`_$LT$futures..future..chain..Chain$LT$A$C$$u20$B$C$$u20$C$GT$$GT$::poll::hed0b30134f388106 + 50
    frame #23: 0x0000555555f1d852 polkadot`futures::task_impl::std::set::h962902082f312aa6 + 130
    frame #24: 0x0000555555e50a79 polkadot`_$LT$futures..stream..futures_unordered..FuturesUnordered$LT$T$GT$$u20$as$u20$futures..stream..Stream$GT$::poll::heffa6c843be40025 + 617
    frame #25: 0x0000555556002bdf polkadot`_$LT$libp2p_core..connection_reuse..ConnectionReuseListener$LT$S$C$$u20$F$C$$u20$M$GT$$u20$as$u20$futures..stream..Stream$GT$::poll::hbfe9d23db4791808 + 1375
    frame #26: 0x00005555560194d7 polkadot`_$LT$futures..stream..map..Map$LT$S$C$$u20$F$GT$$u20$as$u20$futures..stream..Stream$GT$::poll::h90878f87300b8050 + 39
    frame #27: 0x00005555560185fe polkadot`_$LT$futures..stream..map..Map$LT$S$C$$u20$F$GT$$u20$as$u20$futures..stream..Stream$GT$::poll::h27a8e42746d4e47b + 30
    frame #28: 0x000055555601977c polkadot`_$LT$futures..stream..map..Map$LT$S$C$$u20$F$GT$$u20$as$u20$futures..stream..Stream$GT$::poll::hba0b883fdaa5b328 + 28
    frame #29: 0x0000555556019030 polkadot`_$LT$futures..stream..map..Map$LT$S$C$$u20$F$GT$$u20$as$u20$futures..stream..Stream$GT$::poll::h6de6e2d04dfcad87 + 32
    frame #30: 0x000055555601887c polkadot`_$LT$futures..stream..map..Map$LT$S$C$$u20$F$GT$$u20$as$u20$futures..stream..Stream$GT$::poll::h3dcc1c4847d7d040 + 28
    frame #31: 0x00005555560193fc polkadot`_$LT$futures..stream..map..Map$LT$S$C$$u20$F$GT$$u20$as$u20$futures..stream..Stream$GT$::poll::h8a8694102ee21c09 + 28
    frame #32: 0x0000555555e6caa5 polkadot`_$LT$futures..stream..future..StreamFuture$LT$S$GT$$u20$as$u20$futures..future..Future$GT$::poll::hbda08797a16737c8 + 37
    frame #33: 0x0000555555f1d5e2 polkadot`futures::task_impl::std::set::h4e7a6c5a59757a94 + 130
    frame #34: 0x0000555555e5006d polkadot`_$LT$futures..stream..futures_unordered..FuturesUnordered$LT$T$GT$$u20$as$u20$futures..stream..Stream$GT$::poll::hca74359bd3b70669 + 493
    frame #35: 0x0000555555e97e30 polkadot`_$LT$libp2p_core..swarm..SwarmFuture$LT$T$C$$u20$H$C$$u20$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::h2e6559812f41a075 + 1856
    frame #36: 0x0000555555e4a2e2 polkadot`_$LT$futures..future..select..Select$LT$A$C$$u20$B$GT$$u20$as$u20$futures..future..Future$GT$::poll::h5d58f35b3fad104b + 50
    frame #37: 0x0000555555f1f2fc polkadot`_$LT$futures..future..map_err..MapErr$LT$A$C$$u20$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::h2da93e1c7b44bb16 + 28
    frame #38: 0x0000555555ffc848 polkadot`_$LT$futures..future..chain..Chain$LT$A$C$$u20$B$C$$u20$C$GT$$GT$::poll::hfe714b9af01ebddb + 56
    frame #39: 0x0000555555e4aa11 polkadot`_$LT$futures..future..select..Select$LT$A$C$$u20$B$GT$$u20$as$u20$futures..future..Future$GT$::poll::he146a2ec3c64c76d + 49
    frame #40: 0x0000555555f255dc polkadot`_$LT$futures..future..map_err..MapErr$LT$A$C$$u20$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::heb7da32b455c3146 + 28
    frame #41: 0x0000555555fbd508 polkadot`_$LT$futures..future..chain..Chain$LT$A$C$$u20$B$C$$u20$C$GT$$GT$::poll::h8279397b5e006739 + 56
...

my flags from cpuinfo

fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc arch_perfmon rep_good nopl pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes rdrand hypervisor lahf_lm 3dnowprefetch retpoline kaiser tsc_adjust smep erms arat

Might moving to RustCrypto help?

See the original issue in paritytech/polkadot#358

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:hard difficulty:moderate priority:important The changes needed are critical for libp2p, or are blocking another project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants