Brazil is in seriously bad shape.

The government is incredibly corrupt (on the Corruption Perceptions Index it is on par with India and China), with its leaders more concerned with spending money the country doesn't have on hosting a fancy sports day than they are with education. It's no wonder that millions of Brazilians came out to protest the corruption 2 years ago.

Also the economy has faced negative economic growth for most of the past two years, and is not looking likely to become positive again any time soon. This combined with the corruption caused the government to rack up debt (up from 51.5% of GDP in 2013 to 69.5% in 2016), which could easily lead to the government defaulting on its bonds (which already have high bond yields of 10.5%, which if you don't know what that means, it means investors want to lend to Brazil at 10% interest as they think Brazil might not be able to pay them back). Argentina recently defaulted for the second time due to similar issues, so I'm not talking out of my ass here.

These issues have lead us to here, where the police nationwide have gone on strike due to lack of payment, and as a result there is nationwide chaos. Dead bodies in the street, armed robbery rampant, rape, riots and burning vehicles - it is being called the Brazilian 'Purge', as in the movie.

Brazil is in seriously bad shape, and there is very little the government can do to turn the situation around.

EDIT: @BlackLabel has pointed out that the police strike is only regional (in Espirito Santo), not nationwide as I was led to believe.