abstract: Maximum principles at infinity (or "almost maximum principles") are a powerful tool to investigate the geometry of Riemannian manifolds. In particular, in this talk I will focus on Ekeland's principle, on the Omori-Yau principles and their weak versions, in the sense of Pigola-Rigoli-Setti. These last have nice probabilistic counterparts in terms of stochastic and martingale completeness of a manifold, which in turn are related to potential theory. After a brief survey on the known sufficient conditions for their validity, the aim is to describe an underlying duality with the existence of suitable exhaustion functions called Evans-Khas'minskii potentials. Duality holds for a broad class of fully-nonlinear operators of geometric interest, and allows to discover new relations between the principles. Our methods use the approach to nonlinear PDEs pioneered by Krylov ('95) and Harvey-Lawson ('09 - ), and involve the study of viscosity ``almost solutions" of obstacle type problems.\\ This based on joint works with M. Rigoli, A.G. Setti, D. Valtorta and L.F. Pessoa.