  In this paper, we establish the necessary and sufficient criterion for the
contact process on Galton-Watson trees (resp. random graphs) to exhibit the
phase of extinction (resp. short survival). We prove that the survival
threshold $\lambda_1$ for a Galton-Watson tree is strictly positive if and only
if its offspring distribution $\xi$ has an exponential tail, i.e., $\mathbb{E}
e^{c\xi}<\infty$ for some $c>0$, settling a conjecture by Huang and Durrett
[12]. On the random graph with degree distribution $\mu$, we show that if $\mu$
has an exponential tail, then for small enough $\lambda$ the contact process
with the all-infected initial condition survives for $n^{1+o(1)}$-time w.h.p.
(short survival), while for large enough $\lambda$ it runs over
$e^{\Theta(n)}$-time w.h.p. (long survival). When $\mu$ is subexponential, we
prove that the contact process w.h.p. displays long survival for any fixed
$\lambda>0$.
