What is success to a 19-year-old?

A million dollars? Hundreds of thousands of Twitter followers? A hit single?

For the growing number of teenage rappers who already have those things, the answer is more simple: staying out of jail.

Earlier this month, police arrested 19-year-old “Panda” rapper Desiigner on gun and drug charges. Before that, New York hot boy Bobby Shmurda, arrested almost two years ago for gang-related gun and drug crimes, was sentenced to seven years in prison as part of a plea bargain. And last month, police discovered outstanding warrants and kept teenage Florida rapper Kodak Black in prison.

Despite the recent headlines, the problem of young rappers winding up behind bars isn’t a new one. The Notorious B.I.G. spent much of his early career in and out of prison, and rival Tupac was frequently in legal trouble at the height of his legendary ’90s run.

But in the internet age, success is finding rappers younger and younger, often in the form of viral hit singles that have the capability to launch stratospheric careers. Shmurda’s “Hot N—-” has more than 100 million listens on Spotify — and Desiigner’s “Panda” peaked at No. 1 on the Billboard Hot 100 chart.

So why do these rappers — with their brand-new record deals and huge advances — keep ending up in jail?

The answer has more to do with the societal trappings of origin than anything involving rap.

Take, for example, Kodak Black. The teen rapper, with tapes full of hits such as “Skrt,” “No Flockin” and “Like Dat,” grew up in Section 8 housing in Florida’s Broward County — where almost 15 percent of people live in poverty, according to the U.S. Census. His criminal career is arguably as long as his rap career: Prior to his current sentence, a younger Kodak spent a large portion of his teenage years — he’s still only 19 — in juvie or on probation. It’s a lifestyle he’s never shied away from in his music, either.

“Growing up with no father, it’ll make you evil/ How he gon’ learn to be a man when you ain’t never teach him?/ Youngin’ can’t even read but he totin’ the Desert Eagle,” he raps on Lil Big Pac opener “Everything 1K,” an aware but emotionless observation about his life.

Unfortunately, Drake dancing to your song on Instagram doesn’t change where you came from — and neither do the money and fame of a blossoming rap career.

Social mobility — when a person moves between different classes in society — is a concept ingrained into the American consciousness: Work hard, and you can succeed. But mobility within social strata is a notoriously difficult thing to achieve. A 2014 Washington Post article titled “How the American myth of self-reliance is fueling income inequality” talked about the danger of widespread belief in “the classic American rags to riches success story — despite strong empirical evidence that belies it.”

Rap is a genre built on the rags-to-riches tale (think the careers of Jay Z and Lil Wayne) and, in the cases of absurdly young rappers like Kodak and Shmurda, it’s more of a reality than a myth. But along with that reality comes a perfect storm of conditions for legal trouble: the immaturity of youth, financial independence, and a strong bond to their pre-fame lifestyle.

Kodak was arrested in April after police saw him buying weed in Broward County and, following a car chase, discovered a gun thrown from the car. Shmurda was arrested in a 69-count indictment of his gang, GS9, which the “Hot N—-” rapper was involved in well after his newfound success.

“He’s famous,” Shmurda’s lawyer told The New York Times in 2014. “He’s rich. You think he’s going to do this stuff?”

And most people, citing the famed, flawed logic of the American dream, would say no. But if the common occurrence of rap arrests are any indication, it’s a lot harder to leave behind the ever-interlocked worlds of poverty and crime than it would appear to be from the outside — especially when you’ve barely graduated high school.

“You know they say shit real when you in the field/ Had to get it how I live, that’s just what it is,” Kodak spits on “Blood Sweat Tears Revenge,” the frighteningly mature closing track on Lil Big Pac.

It’s a mantra repeated by the likes of Lil Wayne, Twista and Ty Dolla $ign. That idea — “get it how I live” — is one of rap’s favorites. Making it out of poverty by rapping about it is the cornerstone of hip-hop’s uniquely urban take on the American dream, and many rappers subscribe to wholeheartedly.

But once you’ve made it, that idea doesn’t always go away.