  Massive planets form within the lifetime of protoplanetary disks and undergo
orbital migration due to planet-disk interactions. When the first planet
reaches the inner edge of the disk its migration stops and the second planet is
locked in resonance. We detail the resonant trapping comparing semi-analytical
formulae and numerical simulations in the case of two equal-mass coplanar
planets trapped in first order resonances. We describe the family of resonant
stable equilibrium points (zero-amplitude libration orbits) using expanded and
non-expanded Hamiltonians. We show that during convergent migration the planets
evolve along these families of equilibria. Eccentricity damping from the disk
leads to a final equilibrium configuration that we predict analytically. The
fact that observed multi-exoplanetary systems are rarely seen in resonances
suggests that the resonant configurations achieved by migration can become
unstable after the removal of the disk. We probe the stability of the
resonances as a function of planetary mass. To do this, we fictitiously
increase the masses of the planets, adiabatically maintaining the low-amplitude
libration regime until instability. We discuss two hypotheses for instability:
low-order secondary resonance of the libration frequency with a fast synodic
frequency, and minimal approach distance between planets. We show that
secondary resonances do not seem to impact resonant systems at low-amplitude of
libration. Resonant systems are more stable than non-resonant ones for a given
minimal distance at close encounters, but we show that the latter still play
the decisive role in the destabilisation of resonant pairs. We show that, as
the planetary mass increases and the minimal distance between planets gets
smaller in terms of mutual Hill radius, the region of stability around the
resonance center shrinks, until the equilibrium point itself becomes unstable.
