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

range end index 32 out of range for slice of length 2 #15

Open
ArrayZoneYour opened this issue Apr 14, 2024 · 7 comments
Open

range end index 32 out of range for slice of length 2 #15

ArrayZoneYour opened this issue Apr 14, 2024 · 7 comments

Comments

@ArrayZoneYour
Copy link

Thanks for providing the gpu miner implementation for ore, but I meet a runtime error and can't solve it with ease. Is it a environment setup error or platform support issue?

Environments

  • Platform: Windows 11 Pro 22H2
  • GPU model: RTX 4090
  • Cuda Version: 12.3 (12.4 Update 1 the same)
> nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Wed_Nov_22_10:30:42_Pacific_Standard_Time_2023
Cuda compilation tools, release 12.3, V12.3.107
Build cuda_12.3.r12.3/compiler.33567101_0

> nvcc -o target/release/nonce-worker-gpu ore.cu
ore.cu
tmpxft_00006530_00000000-10_ore.cudafe1.cpp
   Creating library target\release\nonce-worker-gpu.lib and object target\release\nonce-worker-gpu.exp
  • Stacktrace
> $env:RUST_BACKTRACE=1
> cargo run --release -- --rpc https://solana-mainnet.g.alchemy.com/v2/[alchemy-api-key] --priority-fee 500000 bundle-mine-gpu --max-adaptive-tip 400000 --key-folder .\wallet-keys\
    Finished `release` profile [optimized + debuginfo] target(s) in 0.76s
     Running `target\release\ore-miner.exe --rpc https://solana-mainnet.g.alchemy.com/v2/[alchemy-api-key] --priority-fee 500000 bundle-mine-gpu --max-adaptive-tip 400000 --key-folder .\wallet-keys\`
[2024-04-14T12:51:25Z INFO  ore_miner::bundle_mine_gpu] 25 keys loaded
[2024-04-14T12:51:25Z INFO  ore_miner::bundle_mine_gpu] splitted signers into batches
[2024-04-14T12:51:25Z INFO  ore_miner::bundle_mine_gpu] subscribed to jito tip stream
thread 'main' panicked at src/main.rs:181:33:
range end index 32 out of range for slice of length 2
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/8b2459c1f21187f9792d99310171a15e64feb9cf/library\std\src\panicking.rs:645
   1: core::panicking::panic_fmt
             at /rustc/8b2459c1f21187f9792d99310171a15e64feb9cf/library\core\src\panicking.rs:72
   2: core::slice::index::slice_end_index_len_fail_rt
             at /rustc/8b2459c1f21187f9792d99310171a15e64feb9cf/library\core\src\slice\index.rs:66
   3: core::slice::index::slice_end_index_len_fail
             at /rustc/8b2459c1f21187f9792d99310171a15e64feb9cf/library\core\src\slice\index.rs:59
   4: ore_miner::impl$0::mine_hashes::async_fn$0
             at .\src\main.rs:181
   5: ore_miner::impl$0::mine_hashes_gpu::async_fn$0
             at .\src\main.rs:147
   6: ore_miner::bundle_mine_gpu::impl$0::mine_with_accounts::async_fn$0
             at .\src\bundle_mine_gpu.rs:193
   7: ore_miner::main::async_block$0
             at .\src\main.rs:55
   8: tokio::runtime::park::impl$4::block_on::closure$0
             at C:\Users\ArrayZoneYour\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\park.rs:281
   9: tokio::runtime::coop::with_budget
             at C:\Users\ArrayZoneYour\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\coop.rs:107
  10: tokio::runtime::coop::budget
             at C:\Users\ArrayZoneYour\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\coop.rs:73
  11: tokio::runtime::park::CachedParkThread::block_on<enum2$<ore_miner::main::async_block_env$0> >
             at C:\Users\ArrayZoneYour\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\park.rs:281
  12: tokio::runtime::context::blocking::BlockingRegionGuard::block_on
             at C:\Users\ArrayZoneYour\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\context\blocking.rs:66
  13: tokio::runtime::scheduler::multi_thread::impl$0::block_on::closure$0
             at C:\Users\ArrayZoneYour\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\scheduler\multi_thread\mod.rs:87
  14: tokio::runtime::context::runtime::enter_runtime<tokio::runtime::scheduler::multi_thread::impl$0::block_on::closure_env$0<enum2$<ore_miner::main::async_block_env$0> >,tuple$<> >
             at C:\Users\ArrayZoneYour\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\context\runtime.rs:65
  15: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
             at C:\Users\ArrayZoneYour\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\scheduler\multi_thread\mod.rs:86
  16: tokio::runtime::runtime::Runtime::block_on<enum2$<ore_miner::main::async_block_env$0> >
             at C:\Users\ArrayZoneYour\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.37.0\src\runtime\runtime.rs:351
  17: ore_miner::main
             at .\src\main.rs:52
  18: core::ops::function::FnOnce::call_once
             at /rustc/8b2459c1f21187f9792d99310171a15e64feb9cf\library\core\src\ops\function.rs:250
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: process didn't exit successfully: `target\release\ore-miner.exe --rpc https://solana-mainnet.g.alchemy.com/v2/[alchemy-api-key] --priority-fee 500000 bundle-mine-gpu --max-adaptive-tip 400000 --key-folder .\wallet-keys\` (exit code: 101)
@qianse
Copy link

qianse commented Apr 14, 2024

the same error with you。how to do

@qianse
Copy link

qianse commented Apr 14, 2024

@tonyke-bot the same error with this。how to do,Please tell me,Thanks

@shouc
Copy link
Collaborator

shouc commented Apr 15, 2024

The nonce worker crashed. Can you share the output of this command:

echo "1600000040ffffffffffffffffffffffffffffffffffffffffffffffffffffffff16e1dc4ef3f0d8c5b48c704e849a1401b2ece9996dc908aef3a8e7c3b52bb39367a6c4f30a982921716c17a91d07a0f1e4fe1523866dd77194ca009a915c54ca2ceb" | xxd -r -p | ./target/release/nonce-worker-gpu

@shouc
Copy link
Collaborator

shouc commented Apr 15, 2024

We haven’t tested on windows. You can get a cheap Linux GPU server from runpods etc

@Cryptojoyz
Copy link

The nonce worker crashed. Can you share the output of this command:

echo "1600000040ffffffffffffffffffffffffffffffffffffffffffffffffffffffff16e1dc4ef3f0d8c5b48c704e849a1401b2ece9996dc908aef3a8e7c3b52bb39367a6c4f30a982921716c17a91d07a0f1e4fe1523866dd77194ca009a915c54ca2ceb" | xxd -r -p | ./target/release/nonce-worker-gpu

it returns like that in windows:
贙`7馀涣!Dz猏7莭貄澩竣AI
Maybe it's the encoding problem?

@Kevil-hui
Copy link

We haven’t tested on windows. You can get a cheap Linux GPU server from runpods etc

the same error with this。how to do,Please tell me,Thanks

Environments
Platform: ubuntu20.04
GPU model: RTX 4090
Cuda Version: 12.0.1

cargo run --release -- --rpc https://prettiest-dark-gas.solana-mainnet.quiknode.pro/rpckey/ --priority-fee 1000000 bundle-mine-gpu --key-folder test --max-adaptive-tip 400000
Finished release profile [optimized + debuginfo] target(s) in 0.35s
Running target/release/ore-miner --rpc 'https://prettiest-dark-gas.solana-mainnet.quiknode.pro/rpckey/' --priority-fee 1000000 bundle-mine-gpu --key-folder test --max-adaptive-tip 400000
[2024-04-16T05:46:17Z INFO ore_miner::bundle_mine_gpu] 25 keys loaded
[2024-04-16T05:46:17Z INFO ore_miner::bundle_mine_gpu] splitted signers into batches
[2024-04-16T05:46:17Z INFO ore_miner::bundle_mine_gpu] subscribed to jito tip stream
[2024-04-16T05:46:47Z ERROR ore_miner::bundle_mine_gpu] fail to fetch system accounts: failed to fetch accounts: RPC request error: cluster version query failed: error sending request for url (https://prettiest-dark-gas.solana-mainnet.quiknode.pro/rpckey/): operation timed out
[2024-04-16T05:47:17Z ERROR ore_miner::bundle_mine_gpu] fail to fetch system accounts: failed to fetch accounts: RPC request error: cluster version query failed: error sending request for url (https://prettiest-dark-gas.solana-mainnet.quiknode.pro/rpckey/): operation timed out
[2024-04-16T05:47:51Z ERROR ore_miner::bundle_mine_gpu] fail to get signers balances: fail to get accounts: error sending request for url (https://prettiest-dark-gas.solana-mainnet.quiknode.pro/rpckey/): operation timed out
thread 'main' panicked at src/main.rs:184:33:
range end index 32 out of range for slice of length 6
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

@ArrayZoneYour
Copy link
Author

I have switched to Ubuntu 20.04.4 and install the latest nvidia driver (550.54.15) to make it work. But I still don't know why windows support is broken.

echo "1600000040ffffffffffffffffffffffffffffffffffffffffffffffffffffffff16e1dc4ef3f0d8c5b48c704e849a1401b2ece9996dc908aef3a8e7c3b52bb39367a6c4f30a982921716c17a91d07a0f1e4fe1523866dd77194ca009a915c54ca2ceb" | xxd -r -p | ./target/release/nonce-worker-gpu

return value is different on windows like @Cryptojoyz shared above.

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