cherry-picks from #5884, just for debugging purpose

You don't need to review this... Just cherry-picks from #5884 to debug the oracle errors