GOLETA, Calif. — Colorado movie theater gunman James Holmes. Sandy Hook school attacker Adam Lanza. And now Elliot Rodger.

All were young loners with no criminal history who went on shooting sprees, leaving devastated families in their wake.

Mass murderers tend to have a history of pent-up frustration and failures, are socially isolated and vengeful, blaming others for their unhappiness, experts say.

“They all display deluded thinking and a lot of rage about feeling so marginalized,” said James Garbarino, a professor of psychology at Loyola University Chicago.

Since mass killings are extremely rare, scholars say there’s no way to predict who has deadly intentions, let alone who will reach a breaking point and take action.

Past violence is a clue, but in Rodger’s case, police did not see him as a threat to himself or others during a check weeks before Friday night’s rampage near the University of California, Santa Barbara that left six victims dead and 13 injured. Rodger died of an apparent self-inflicted gunshot wound to the head after a shootout with deputies.

Pinpointing a mass killer “is not an exact science. We don’t have a foolproof way of predicting” who will turn violent, said Risdon Slate, a professor of criminology at Florida Southern College.

Before Rodger stabbed three male UCSB students in his apartment and cruised around in his black BMW firing at sorority girls and strangers, he left a trail of YouTube videos and a 140-page manifesto ranting against women and couples and lamenting his lack of a sex life.

In his postings, Rodger, a 22-year-old community college student and son of a Hollywood director, said he was a lonely and frustrated virgin.

“I’m sexually attracted to girls. But girls are not sexually attracted to me. And there’s a major problem with that – a major problem. That’s a problem that I intend to rectify. In all my magnificence and power, I will not let this fly. It’s an injustice that needs to be dealt with,” Rodger said in one of the videos.

Recent mass shootings involved young men described as loners who had trouble fitting in.

In July 2012, 24-year-old Holmes opened fire at a midnight screening of a Batman film, killing a dozen moviegoers. Five months later, 20-year-old Lanza shot 20 first-graders and six educators at Sandy Hook Elementary School in Connecticut.

Family friend Simon Astaire said Rodger was “very much a boy of solitude” who spoke few words.

“At a Christmas party, I went out to get air and there he was standing alone. I apologized for disturbing his peace, and he said it was all right. I asked, ‘How are you doing?’ He said, ‘I find things difficult.’ I walked away thinking that he was a very sad lonely boy,” Astaire said.

In his writings, Rodger said he had seen several therapists throughout his life, but it’s unclear what he was being treated for.

Experts say people with mental illness generally are not more violent than the rest of the population.