diff --git a/program-runtime/src/loaded_programs.rs b/program-runtime/src/loaded_programs.rs index 7527ee45f08d48..b9c7d97cdbc251 100644 --- a/program-runtime/src/loaded_programs.rs +++ b/program-runtime/src/loaded_programs.rs @@ -766,6 +766,10 @@ impl LoadedPrograms { false } else { // Something is wrong, I can feel it ... + error!( + "ProgramCache::assign_program() failed key={:?} existing={:?} entry={:?}", + key, slot_versions, entry + ); self.stats.replacements.fetch_add(1, Ordering::Relaxed); true } @@ -1036,6 +1040,7 @@ impl LoadedPrograms { self.stats.lost_insertions.fetch_add(1, Ordering::Relaxed); } let was_occupied = self.assign_program(key, loaded_program); + debug_assert!(!was_occupied, "Unexpected replacement of an entry"); self.loading_task_waiter.notify(); was_occupied } diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index bc018b722b4fcf..fb8a36408a6679 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -5144,6 +5144,7 @@ impl Bank { )); if programs_loaded_for_tx_batch.borrow().hit_max_limit { + error!("Discarding TX batch {:#?}", batch.sanitized_transactions()); return LoadAndExecuteTransactionsOutput { loaded_transactions: vec![], execution_results: vec![],