This work deals with the analysis of the contact complementarity problem, for Lagrangian systems subjected to unilateral constraints, and with a singular mass matrix and redundant constraints. Previous results by the authors on existence and uniqueness of solutions of some classes of variational inequalities, are used to characterize the well-posedness of the contact problem. Criteria involving conditions on the tangent cone and the constraints gradient, are given. It is shown that the proposed criteria easily extend to the case where the system is also subjected to a set of bilateral holonomic constraints, in addition to the unilateral ones. In a second part it is shown how basic convex analysis may be used to show the equivalence between the Lagrangian and the Hamiltonian formalisms, when the mass matrix is singular.