As for humanity surviving on Earth - aside from a "grey-goo" scenario, or malevolent AI bent on human extermination, I can't think of anything that would actually present a credible threat to the species. Now lot's of things could bring about the collapse of our civilization, or even *almost* wipe out the species, but even a 99.9% extermination rate would leave 7+ million people - twice the population that is estimated to have existed before the birth of agriculture. Even a 99.9999% extermination rate would leave 7+ thousand people - more than the estimated population during the worst of the last major ice age. And those few survivors would have access to a wealth of knowledge and technology undreamed of by our ancestors - I doubt they'd have trouble eventually rebuilding a new civilization, at worst it might take a few thousand years - and we've been tool-makers for over a million already.
The biggest problem that people starting to rebuild civilisation after most of us have been wiped out - is going to be energy sources, then metals.
All of the easy to get to coal, oil and metals have been strip mined and basically used up - the really hard to get to stuff (which they won't be able to get to) is going to be all that remains.
The coal and oil could eventually be replenished, but only in geological timescales (and favourable conditions)
I suspect they'll be a stone-age people until a passing UFO checks out the world that suddenly went quiet.