  We study a generalized ergodic problem (E), which is a Hamilton-Jacobi
equation of contact type, in the flat $n$-dimensional torus. We first obtain
existence of solutions to this problem under quite general assumptions. Various
examples are presented and analyzed to show that (E) does not have unique
solutions in general. We then study uniqueness structures of solutions to (E)
in the convex setting by using the nonlinear adjoint method.
