It's a certainty that mass extinction has occurred on the Earth in the past. It seems pretty likely that it will happen again in the future, unless technology somehow can prevent or mitigate it. I imagine this state of affairs is probably pretty common on other inhabited planets, if any, and on many of them the frequency and severity could be much worse than here.
At this point of time, it's all about fusion. If we can survive long enough to develop fusion power than humanity has a good chance to survive anything short of a gamma ray burst.