Passengers on a train in Boston had a chaotic and terrifying commute this week, and it reveals an important issue with transportation in the United States. A viral social media post shows passengers breaking windows and jumping out of smoky cabins after a train overheated underground during rush hour.

Twitter/StuartLong81 - twitter.com

Around 4:40 p.m. on Wednesday a train in the Massachusetts Bay Transportation Authority (MBTA) system had a mechanical issue, causing smoke to fill the cars, according to the Boston Globe. However, because the train started to leave the platform before the incident, the doors remained close. After two minutes of smoke filling the cars, passengers started smashing windows and jumping out onto the platform.

The MBTA said in a statement that the train driver had begun opening doors to let passengers out, but there was no communication to the passengers. “Because no announcement had been made on the intercom, some passengers, understandably, began to self-evacuate through windows,” according to the MBTA statement to the Boston Globe. Five people were treated for smoke inhalation.

Boston City Council President Michelle Wu, who uses the same subway that experienced the malfunction, said that the incident is another example of why the the train system needs revenue pay for repairs and updates.

"There frankly has not been enough revenue and investment to keep up our infrastructure and to provide the level of service that our growing city and our growing state need to have," Wu told local station WHDH.

Like other mass transportation systems across the country, the MBTA is funded by a mix of state and federal funding and that funding has a significant impact on updates to the system. However, the American Society of Civil Engineers reported back in 2013 that many places' transit systems are deteriorating and "many transit agencies are struggling to maintain aging and obsolete fleets and facilities amid an economic downturn that has reduced their funding, forcing service cuts and fare increases." About 3.6 trillion dollars will be needed by 2020 to raise the broader U.S. infrastructure to acceptable levels, according to the ASCE.

State funding for roads and transportation fell by 15 percent from 2002 to 2012, according to Pew Charitable Trust.

The Republican platform for this election season includes plans to cut funding for mass transit, bike share programs, and sidewalk improvements, according to The Washington Post.

However, Republican presidential nominee Donald Trump doesn't share that view. Trump has said trains are important for Americans and he's consistently said that the U.S. needs to spend much more money on roads and trains.

At a rally in March, Trump said that the U.S. needs trains that operate as efficiently as the ones in China.

“They have trains that go 300 miles per hour,” said Trump. “We have trains that go chug … chug … chug.”

Trump wants to spend $1 trillion on infrastructure, relying heavily on private investments and avoiding new taxes, according to Yahoo Finance.

Infrastructure spending seems to be an item that Trump and Democratic presidential nominee Hillary Clinton agree on, or at least in principle.

Clinton also supports increased infrastructure spending, but $275 billion of her plan would come from government funding and another $225 billion would come from private investors, according to Yahoo Finance.

Beyond the presidential candidates, mass transit lobbying group American Public Transportation Association says there will be $200 billion worth of public transportation funding on ballots in less than two weeks. There will be 31 local communities, counties and states with public transit measures on the ballot on Nov. 8.