Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit b04a806

Browse files
Lichtsoyihau
authored andcommitted
v1.17 - Adds error log for replacements in ProgramCache::assign_program(). (#1400)
Adds error log for replacements in ProgramCache::assign_program().
1 parent 6a2c857 commit b04a806

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

program-runtime/src/loaded_programs.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,8 +677,13 @@ impl<FG: ForkGraph> LoadedPrograms<FG> {
677677
(false, entry)
678678
} else {
679679
// Something is wrong, I can feel it ...
680+
let existing = existing.clone();
681+
error!(
682+
"ProgramCache::assign_program() failed key={:?} existing={:?} entry={:?}",
683+
key, slot_versions, entry
684+
);
680685
self.stats.replacements.fetch_add(1, Ordering::Relaxed);
681-
(true, existing.clone())
686+
(true, existing)
682687
}
683688
}
684689
Err(index) => {
@@ -699,7 +704,7 @@ impl<FG: ForkGraph> LoadedPrograms<FG> {
699704
entry: Arc<LoadedProgram>,
700705
) -> (bool, Arc<LoadedProgram>) {
701706
let (was_occupied, entry) = self.replenish(key, entry);
702-
debug_assert!(!was_occupied);
707+
debug_assert!(!was_occupied, "Unexpected replacement of an entry");
703708
(was_occupied, entry)
704709
}
705710

runtime/src/bank.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5223,6 +5223,7 @@ impl Bank {
52235223
));
52245224

52255225
if programs_loaded_for_tx_batch.borrow().hit_max_limit {
5226+
error!("Discarding TX batch {:#?}", batch.sanitized_transactions());
52265227
return LoadAndExecuteTransactionsOutput {
52275228
loaded_transactions: vec![],
52285229
execution_results: vec![],

0 commit comments

Comments
 (0)