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

Commit d8e0824

Browse files
Lichtsoyihau
authored andcommitted
v1.18 - Adds error log for replacements in ProgramCache::assign_program(). (#1401)
Adds error log for replacements in ProgramCache::assign_program().
1 parent 130c83b commit d8e0824

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

program-runtime/src/loaded_programs.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,10 @@ impl<FG: ForkGraph> LoadedPrograms<FG> {
766766
false
767767
} else {
768768
// Something is wrong, I can feel it ...
769+
error!(
770+
"ProgramCache::assign_program() failed key={:?} existing={:?} entry={:?}",
771+
key, slot_versions, entry
772+
);
769773
self.stats.replacements.fetch_add(1, Ordering::Relaxed);
770774
true
771775
}
@@ -1036,6 +1040,7 @@ impl<FG: ForkGraph> LoadedPrograms<FG> {
10361040
self.stats.lost_insertions.fetch_add(1, Ordering::Relaxed);
10371041
}
10381042
let was_occupied = self.assign_program(key, loaded_program);
1043+
debug_assert!(!was_occupied, "Unexpected replacement of an entry");
10391044
self.loading_task_waiter.notify();
10401045
was_occupied
10411046
}

runtime/src/bank.rs

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

51465146
if programs_loaded_for_tx_batch.borrow().hit_max_limit {
5147+
error!("Discarding TX batch {:#?}", batch.sanitized_transactions());
51475148
return LoadAndExecuteTransactionsOutput {
51485149
loaded_transactions: vec![],
51495150
execution_results: vec![],

0 commit comments

Comments
 (0)