Eventually they ran out of other people's money. While not the fault of socialist policies no government ever really executes them because those in power still see themselves above the people and refuse to live under the same conditions.
This is not a socialism issue, any government run by the corrupt can end up here. It is more a failed form of fascism which also occurs in the US
That' cannot be emphasized enough. This isn't the type of oil coming out of Texas or ND. It requires more money, infrastructure, and expertise to refine properly. Canada has this problem with the oil sands, but they have all three to deal with it.
When I consulted up there, most of the reliability engineering organizations were Venezuelans. Canada should send Venezuela a big thank you card for the amazing people they got due to Chavez driving out professionals.
If the price of oil extraction in Venezuela for a barrel is 60 dollars and the market price is 40(the price in Saudi Arabia is very low), you have a serious problem.
You will even have to LOOSE money in order to sustain a regular extraction, hoping the price returns to higher levels.
If you stop production, sometimes it is very expensive to restart it again, as geological forces over time close the things that you open, so you need to maintain some activity.