MEXICO CITY — It is difficult to say whether the Cubana de Aviación airliner’s crash in Havana a few weeks ago or the mock elections in Venezuela on May 20 are the best illustration of the utter bankruptcy of the 21st century socialism that Hugo Chávez and Raúl Castro have so loudly touted. They are both tragedies that have cost avoidable deaths and caricatures of what is to come in both countries.Cuba paid a heavy price for the initial, and perhaps enduring, successes of its revolution: education, health and dignity. But from the very beginning — with the exception of a few years between the collapse of the Soviet Union and the end of its subsidies to Cuba in 1992 and the advent of Venezuelan support in 1999 — it always found someone to pay the bills. The next option was meant to be the United States. That no longer seems possible.Venezuela, for its part, embarked on a perilous course with the election of Hugo Chávez in 1998 that was spurred further after a failed national oil workers strike in late 2002 and early 2003: building socialism after the Cold War, with support from Cuba and practically no one else. Cuban intelligence and security backing for Caracas continues, but high oil prices disappeared in 2014, and so did the Venezuelan government’s Saudi Arabian-like generosity to Havana. The glory days have been over for a long time; all that matters today is survival.Barely months after the beginning of a transfer of power from the Castro era to a different, if not entirely new, arrangement in Havana, the island once again faces enormous economic and social challenges. They stem from three problems with no solutions.First is the fall of tourism from the United States and the new tough line on Cuba adopted by the Trump administration. Through March of this year, the number of visitors from the United States is down more than 40 percent compared with 2017. This is partly because of travel warnings over safety issued by Washington, partly because of new travel restrictions put in place by President Trump and because after the initial boom of nostalgic tourism, Cuba is now competing for normal travelers with the rest of the Caribbean. Its beauty and charm do not easily outweigh other destinations’ far superior services and infrastructure, and lower prices. Today myriad start-up businesses — always thought to be too small and numerous to survive — that sprang up for United States visitors are failing as a result of falling tourism.Second, American sanctions and Cuban fear of economic reforms have rendered the push for greater foreign investment somewhat futile. After an initial rush of highly publicized announcements, some United States companies have proved reluctant to run risks, particularly given Mr. Trump’s hostility toward all things Obama, and his dependence on Florida for re-election.The economy has stopped growing, scarcities have re-emerged and new opportunities for employment and hard-currency earnings are not appearing. If one adds to this the government’s decision to suspend new cuentapropista or private self-employment permits, it is no surprise to discover that economic prospects are dim. Hence the appropriateness of the metaphor regarding the crash outside Havana: like the Cuban economy, the plane was old, poorly maintained, leased by the national airline because it was the only one it could afford, and the rest of Cubana de Aviación’s domestic fleet had already been grounded.Which brings us to the third source of concern. Venezuela is no longer able to subsidize Cuba’s transition to a Vietnam-style socialist economy the way it did before.True, reports from Houston last month suggested that Petróleos de Venezuela, known as Pdvsa, the country’s state-owned oil firm, purchased $440 million of crude oil on the open market and delivered it to Cuba at below cost and on credit. Cuba consumes roughly 170,000 barrels of oil a day and produces about 50,000. The difference has been made up by Venezuela, which formerly dispatched enough crude to address all of Cuba’s needs, allowing it to re-export some at a profit and pay for it through highly subsidized mechanisms. The fact that Pdvsa had to shop on the open market for Cuba´s oil shows that Venezuela no longer has that capacity. The country’s hard currency shortfalls, because of collapsing oil production — down 28 percent over the last 12 months — has also cut its ability to pay top dollar for Cuban doctors, teachers and intelligence personnel.The alternative for Cuba was thought to reside in normalization with the United States, which has stalled following the end of the Obama administration. Venezuela, however, means more to the island country than hard currency and oil. Despite ongoing flirtations with China and Russia, it is Cuba’s only unconditional ally in the world, which is why the Venezuelan debacle is so worrisome.The international community has intensified sanctions against President Nicolás Maduro’s dictatorship. But this will produce little effect in Caracas unless Washington imposes oil-related restrictions: expropriating Citgo, the Pdvsa-owned oil company, or forbidding oil exports and imports to and from Venezuela. But for this not to play into Mr. Maduro’s hands, the Latin Americans and the Europeans would be obliged to support the measures and adopt similar ones.Herein lies the central question involving Venezuela, and ultimately, Cuba itself. At its annual assembly on June 5, the Organization of American States might consider a motion to suspend Venezuela; it will probably fail, but a stand will have been taken by the region’s democracies.In the ensuing confrontation, anything can occur. The international community can decide, cynically but not illogically, that the country’s crisis is too dangerous to be left to Venezuelans. In this case, the only way to press the Maduro government to change course seems to be oil-based sanctions, led by but not limited to Washington.This outcome would hit Cuba especially hard. If the current severe economic downturn produces widespread discontent (as in 1994, for example, with the so-called Maleconazo), the island regime will face a social crisis lacking the two fundamental remedies it always enjoyed. First, of course, was the Castros: Miguel Díaz-Canel, the new president, will have to deal with a major predicament without Fidel or Raúl Castro’s prestige. Second, he cannot count on the safety valve used repeatedly by the ruling brothers: migration to Miami, because the end of the wet-feet-dry-feet era entails the end of sailing, smuggling or swimming to the United States. Cuba has not faced discontent without those factors since the revolution, in 1959.It is anybody’s guess how the regime will fare if unrest flares. The only certainty is the utter failure of so-called 21st century socialism, in Venezuela as such, in Cuba by another name.Jorge G. Castañeda, Mexico’s foreign minister from 2000 to 2003, is a professor at New York University, a member of the board of Human Rights Watch and a contributing opinion writer. Follow The New York Times Opinion section on Facebook and Twitter, and sign up for the Opinion Today newsletter.