California is a state with a mild climate and what might be described as a perfect climate in its southern portion. It absorbs hundreds of thousands of migrants annually from Mexico and Central America. These people often have family connections and are able to find work and shelter and integrate.
It obviously has a problem dealing with the homeless mentally ill and addicted people and those on very low incomes who lose their housing, often at very short notice. These are people with little or no safety net.
Between a third and a half of the entire homeless population of the US lives in California. I can't think of any state that would be successful in dealing with a problem of that magnitude, given the fact that everyone has constitutionally guaranteed rights.
A large proportion of California's homeless population has either a serious mental illness or a long-term addiction, or both. Recent initiatives to deal with the problem of homelessness include the CARE proposal, which would allow involuntary commitment of individuals to treatment programmes.
A recent study on homelessness in California revealed the financial precariousness of the previous lives of many who find themselves homeless. The market will not solve the issue of housing for those on very low incomes. Provising low income housing for those who could return to being housed is simply not going to yield enough profit to make it worthwhile. Most of those who lost their previous housing felt that an emergency allocation of funds from the state or the city they lived in would have enabled them to stave off the bailiffs.
If you're trying to suggest that it's too much socialism that has rendered California an alleged 'failed state', you couldn't be further wide of the mark. It's more socialism, not less, that will make the difference.