agave: solAcctReadCache panics in v2.2 because DCOU is still enabled in release builds
Problem
Every 2-6 hours one of our RPC servers throws the following panic error:
ERROR solana_metrics::metrics] datapoint: panic program="validator" thread="solAcctReadCache" one=1i message="panicked at accounts-db/src/read_only_accounts_cache.rs:390:38:
2025-05-27 23:56:27.355
2: core::panicking::panic
2025-05-27 23:56:27.355
1: core::panicking::panic_fmt
2025-05-27 23:56:27.355
thread 'solAcctReadCache' panicked at accounts-db/src/read_only_accounts_cache.rs:390:38:
Proposed Solution
I don’t have one.
Version Info
v2.2.14-jito
Additional Information
I have 5 other RPC nodes running the exact same configuration that have never displayed this panic error. I looked into the file that was throwing this panic error and it seems that there were some significant changes somewhere after v2.1.21 (commit fb52893)
Seeing this I reverted back to v2.1.21 and have not had any issues since which was about 36 hours ago. Where as before I had this panic error crash the node about 8 times in a span of 24 hours on v2.2.14.
Workaround
Build from source with
$ cargo build --release --package agave-validator --bin agave-validator
or
$ scripts/cargo-install-all.sh
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 3
- Comments: 18 (2 by maintainers)
(thanks for using dcou.)
@brooksprumo if production binaries are built like the following, dcou will be enabled unfortunately… which will be fixed once cargo stabilizes this (https://github.com/rust-lang/cargo/issues/14774, specifically,
feature-unification = "package"):The quickest workaround are like this:
more robust handling is existing here: https://github.com/anza-xyz/agave/blob/8e60bf233e3818744022dd7f2350d0788798551a/scripts/cargo-install-all.sh
come to think of it, seeing other various minor handling there, i think using
cargo build --releaseis simplistic for real production system deployment. don’t take me wrong, i always appreciate to building from source. 😃Maybe, we should advertise
scripts/cargo-install-all.sha bit louder or should we provide more purpose-build tiny script out of it? cc: @yihauFacing the same thing with 2.1.21
Line 390 is behind a DCOU block, which should not be visible in the agave-validator binary: https://github.com/anza-xyz/agave/blob/e2b577603e06fed3eaba420d6c0261ee7ff11c65/accounts-db/src/read_only_accounts_cache.rs#L387-L391
So that’s a little strange.
Can you please provide the full stack trace?