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)

Most upvoted comments

@ryoqun If you would be able to help look into why DCOU is getting enabled in release builds, that would be much appreciated!

(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"):

# assuming run in the workspace top directory, not in the `solana-validator` dir
$ cargo build --release 

The quickest workaround are like this:

$ cargo build --release --package solana-validator --bin solana-validator
# and various other binaries.

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 --release is 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.sh a bit louder or should we provide more purpose-build tiny script out of it? cc: @yihau

Facing the same thing with 2.1.21

[2025-06-09T06:14:21.281878188Z ERROR solana_metrics::metrics] datapoint: panic program="validator" thread="solReplayStage" one=1i message="panicked at core/src/replay_stage.rs:1550:25:
    We have tried to repair duplicate slot: 345600000 more than 10 times and are unable to freeze a block with bankhash 4iHbA152yJpFuP1qcizv2wtUowr4p6YmnPYjeRLxuWfE, instead we have a block with bankhash Some(41azjgymXVzV19Hc5ehPwa1rh9ubo3NskQJMJAAzdzrs). This is most likely a bug in the runtime. At this point manual intervention is needed to make progress. Exiting" location="core/src/replay_stage.rs:1550:25" version="2.1.21 (src:8a085eeb; feat:1416569292, client:Agave)"

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?