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

trap invalid opcode / illegal instruction (core dumped) #6220

Closed
1 task done
thorstenhirsch opened this issue Jan 24, 2024 · 7 comments
Closed
1 task done

trap invalid opcode / illegal instruction (core dumped) #6220

thorstenhirsch opened this issue Jan 24, 2024 · 7 comments
Labels
C-bug An unexpected or incorrect behavior S-stale This issue/PR is stale and will close with no further activity

Comments

@thorstenhirsch
Copy link

Describe the bug

When starting reth on an Intel i5-4278U it crashes du to an invalid opcode. Is the CPU too old?
Here's how the start looks like:

2024-01-24T20:35:33.589013Z  INFO reth::cli: reth 0.1.0-alpha.16 (d8a9b58) starting
2024-01-24T20:35:33.589052Z  INFO reth::cli: Opening database path="/some/reth-eth-mainnet-data/db"
2024-01-24T20:35:33.592394Z  INFO reth::cli: Configuration loaded path="/some/reth-eth-mainnet-data/reth.toml"
2024-01-24T20:35:33.593035Z  INFO reth::cli: Database opened
2024-01-24T20:35:33.593296Z  INFO reth::cli: Pre-merge hard forks (block based):
- Frontier                         @0
- Homestead                        @1150000
- Dao                              @1920000
- Tangerine                        @2463000
- SpuriousDragon                   @2675000
- Byzantium                        @4370000
- Constantinople                   @7280000
- Petersburg                       @7280000
- Istanbul                         @9069000
- MuirGlacier                      @9200000
- Berlin                           @12244000
- London                           @12965000
- ArrowGlacier                     @13773000
- GrayGlacier                      @15050000
Merge hard forks:
- Paris                            @58750000000000000000000 (network is not known to be merged)

Post-merge hard forks (timestamp based):
- Shanghai                         @1681338455

bash: line 1:  8314 Illegal instruction     (core dumped) reth node --datadir=/some/reth-eth-mainnet-data --nat=extip:(my-ip-removed) --full

dmesg:

[ 3670.918117] traps: reth[8077] trap invalid opcode ip:55e4ca2a212e sp:7ffe9930fca8 error:0 in reth[55e4c8000000+2d1a000]

Steps to reproduce

  1. Download reth alpha16 for Linux/x86
  2. Run "reth node ..."

Node logs

No response

Platform(s)

Linux (x86)

What version/commit are you on?

alpha16

What database version are you on?

(default)

What type of node are you running?

Full via --full flag

What prune config do you use, if any?

No response

If you've built Reth from source, provide the full command you used

No response

Code of Conduct

  • I agree to follow the Code of Conduct
@thorstenhirsch thorstenhirsch added C-bug An unexpected or incorrect behavior S-needs-triage This issue needs to be labelled labels Jan 24, 2024
@Rjected
Copy link
Member

Rjected commented Jan 24, 2024

Could you try running make maxperf-no-asm and let us know if it still errors?

@DaniPopes DaniPopes removed the S-needs-triage This issue needs to be labelled label Jan 24, 2024
@DaniPopes
Copy link
Member

DaniPopes commented Jan 24, 2024

Before that can you open it in a debugger and print the stacktrace?

Is the CPU too old?

I believe we build dist binaries with RUSTFLAGS=native so it depends on the CI runners' CPU

@mattsse
Copy link
Collaborator

mattsse commented Jan 24, 2024

I believe we build dist binaries with RUSTFLAGS=native

oh? I don't think we should do that

@thorstenhirsch
Copy link
Author

Is the backtrace of gdb what you're looking for?

Thread 1 "reth" received signal SIGILL, Illegal instruction.
0x00005555576a212e in __mulx_mont_384 ()
(gdb) bt
#0  0x00005555576a212e in __mulx_mont_384 ()
#1  0x00005555576a20ab in mulx_mont_384 ()
#2  0x000055555769be94 in POINTonE1_Uncompress_Z ()
#3  0x000055555769342e in load_trusted_setup.part ()
#4  0x00005555572dda9e in core::ops::function::FnOnce::call_once ()
#5  0x000055555741127a in once_cell::imp::OnceCell<T>::initialize::{{closure}} ()
#6  0x0000555556b5f2cf in once_cell::imp::initialize_or_wait ()
#7  0x000055555570414b in once_cell::imp::OnceCell<T>::initialize ()
#8  0x0000555557412039 in reth_transaction_pool::validate::task::TransactionValidationTaskExecutor<()>::eth_builder ()
#9  0x000055555608c126 in reth::builder::NodeConfig::build_and_spawn_txpool ()
#10 0x00005555560be788 in reth::builder::NodeBuilderWithDatabase<DB>::launch::{{closure}} ()
#11 0x000055555607d9b3 in reth::runner::run_to_completion_or_panic::{{closure}} ()
#12 0x000055555605dc36 in reth::cli::Cli<Ext>::run ()
#13 0x00005555565dd1a3 in reth::main ()
#14 0x0000555555f3ad13 in std::sys_common::backtrace::__rust_begin_short_backtrace ()
#15 0x0000555555f3b799 in std::rt::lang_start ()
#16 0x00007ffff7c280d0 in __libc_start_call_main (main=main@entry=0x5555565dd930 <main>, argc=argc@entry=2, 
    argv=argv@entry=0x7fffffffdec8) at ../sysdeps/nptl/libc_start_call_main.h:58
#17 0x00007ffff7c28189 in __libc_start_main_impl (main=0x5555565dd930 <main>, argc=2, argv=0x7fffffffdec8, init=<optimized out>, 
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdeb8) at ../csu/libc-start.c:360
#18 0x0000555555747cc9 in _start ()

@Rjected
Copy link
Member

Rjected commented Feb 2, 2024

awesome, this helped narrow it down to blst, which conditions on the platform
supranational/blst@83d78c2

Let's introduce a portable feature to c-kzg-4844 which enables the blst portable feature. the binary built by the release process will use this feature. compiling from source however, should not.

@Rjected
Copy link
Member

Rjected commented Feb 2, 2024

PR here: ethereum/c-kzg-4844#389

Copy link
Contributor

This issue is stale because it has been open for 21 days with no activity.

@github-actions github-actions bot added the S-stale This issue/PR is stale and will close with no further activity label Feb 24, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug An unexpected or incorrect behavior S-stale This issue/PR is stale and will close with no further activity
Projects
Archived in project
Development

No branches or pull requests

4 participants