anza-xyz / agave

Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.
https://www.anza.xyz/
Apache License 2.0
345 stars 152 forks source link

solana-test-validator Error #2636

Open hon94csl opened 1 month ago

hon94csl commented 1 month ago

solana-test-validator Error

I am running solana-test-validator on a mac m2 macOs 13.2.1 system with the following error.

Error: failed to start validator: Failed to create ledger at test-ledger: io error: Error checking to unpack genesis archive: Archive error: extra entry found: "._genesis.bin" Regular

the validator log:

[2024-08-16T16:51:33.907175000Z INFO  solana_test_validator] agave-validator 1.18.20 (src:ba9bf247; feat:4215500110, client:Agave)
[2024-08-16T16:51:33.907289000Z INFO  solana_test_validator] Starting validator with: ArgsOs {
        inner: [
            "solana-test-validator",
        ],
    }
[2024-08-16T16:51:33.907402000Z WARN  solana_perf] CUDA is disabled
[2024-08-16T16:51:33.913018000Z INFO  solana_faucet::faucet] Faucet started. Listening on: 0.0.0.0:9900
[2024-08-16T16:51:33.913036000Z INFO  solana_faucet::faucet] Faucet account address: GyzZKZiqFscxPqZrjeakH5jkmskfK5UViRAWnZ1hozFQ
[2024-08-16T16:51:33.913779000Z INFO  agave_validator::admin_rpc_service] started admin rpc service!
[2024-08-16T16:51:33.915601000Z INFO  solana_test_validator] Feature for 41tVp5qR1XwWRt5WifvtSQyuxtqQWJgEK8w91AtBqSwP deactivated
[2024-08-16T16:51:33.917386000Z INFO  solana_ledger::blockstore] Maximum open file descriptors: 1000000
[2024-08-16T16:51:33.917437000Z INFO  solana_ledger::blockstore] Opening blockstore at "test-ledger/rocksdb"
[2024-08-16T16:51:33.917787000Z WARN  solana_ledger::blockstore_db] Unable to detect Rocks columns: Error { message: "IO error: No such file or directory: While opening a file for sequentially reading: test-ledger/rocksdb/CURRENT: No such file or directory" }
[2024-08-16T16:51:33.986426000Z INFO  solana_ledger::blockstore] Opening blockstore done; blockstore open took 68ms
[2024-08-16T16:51:33.990678000Z INFO  solana_metrics::metrics] metrics disabled: environment variable not found
[2024-08-16T16:51:33.990726000Z INFO  solana_metrics::metrics] datapoint: shred_insert_is_full total_time_ms=0i slot=0i last_index=31i num_repaired=0i num_recovered=0i
[2024-08-16T16:51:34.048757000Z INFO  solana_accounts_db::hardened_unpack] Extracting "test-ledger/genesis.tar.bz2"...

What to do about this problem?

olma2077 commented 1 month ago

Confirm the problem on MacOS 14.5 and several builds of solana-cli (1.18.18, 1.18.20, 1.18.22) with starting solana-test-validator. The root casue seems to be in the following:

Possible solution would be to completely ignore any dotfiles or (if they are expected) at least MacOS-specific ._* files and don't include them into the archive in the first place.

P.S. As a workaround run validator as COPYFILE_DISABLE=1 solana-test-validator or add export COPYFILE_DISABLE=1 in your shell *rc, this will prevent system from creating ._* files and allow validator to start normally.

zilayo commented 2 weeks ago

same issue and proposed fix - https://github.com/anza-xyz/agave/issues/2838