TIANJIN, a northern mega-city, has produced some of China’s wittiest comedians. It is a good thing that its 15m residents have a sense of humour. Their hometown was, at points over the past decade, the fastest-growing of China’s 31 provincial-level regions. Since the beginning of last year it has been the slowest (see chart). Businesses joke that the sole part of the local economy that is expanding these days is the value of assets seized from corrupt officials. The city’s sharp deceleration serves as a stress test of China’s economic problems, and as a warning of the difficulty in fixing them.

Other areas of China are also grappling with subdued growth. Commodity-producing regions have struggled to adapt to a modernising economy, as has the rust-belt north-east. But Tianjin stands out as a place that should be doing better. It boasts a busy port and good universities. A skilled manufacturing hub, it has attracted firms from Airbus to Motorola. Just half an hour from Beijing by train, it is well situated.

The problem is that the city’s planners got far ahead of themselves. They built a big new financial district, which they billed as China’s Manhattan, in the Binhai district, on the city’s far-east side. Nearly 70% of offices there are vacant, according to Jones Lang LaSalle, a property-services firm. That flatters the reality. One whole floor of the New Finance Building, a glistening complex, has been converted into “escape rooms” for adventure games. “The buildings are great,” Zhang Junkai, a port worker who lives nearby, says with a wry smile. “It’s just that we don’t have enough people in them.”

Some 60km away, on the city’s western fringes, the waste is even more striking. A private developer wanted to create a high-tech zone, anchored by the world’s fifth-tallest skyscraper. Construction all but stopped a few years ago. The skyscraper’s skeleton is nearly 600 metres tall, and surrounded by a dozen other abandoned building sites, which are a short drive from a fledgling polo club, itself ringed by empty luxury residences.

Corruption fuelled the excesses. In the city centre, Zhao Jin, a property magnate, paid off bureaucrats to flout zoning rules. He had permission to build three towers of no more than 35 storeys, but instead went for 66 storeys. He and the bureaucrats (some of them, anyway) are now in jail; his development, an unfinished eyesore, was listed for demolition. In another case, at the port, managers of a chemical warehouse exploited connections to pass inspections on matters from fire safety to chemicals handling. In August 2015 a massive explosion obliterated the warehouse and the surrounding area, killing 173.

The deadly blast seems to have marked a turning point. Huang Xingguo, mayor since 2007, was jailed last year for corruption. Li Hongzhong, Tianjin’s new Communist Party boss, has presided over a clean-up. Corruption investigations in the first half of this year have already exceeded the total for 2015. The government has also changed its economic course. It has tightened its belt, budgeting nearly 15% less spending this year. Once-busy building sites have attracted scavengers. Ads for metal-recycling services are plastered on construction walls in the high-tech zone.

Tianjin, along with a handful of other Chinese regions, has admitted that its economic record was grossly inflated. Binhai, which accounts for half the city’s output, declared in January that its GDP was a third smaller than previously reported. Partly as a result of correcting for past fabrication, Tianjin’s annual GDP growth has averaged just 3.5% since 2017, compared with 13.5% under Mr Huang, a precipitous drop.

Tianjin’s woes are an extreme version of China’s. Over the past decade cities have rushed to expand. Yang Weimin, a senior official, revealed this year that, based on electricity usage, China’s housing vacancy rate is higher than Japan’s, which stands at 13%. In downtown Tianjin that is almost palpable. Colonial buildings, dating to the 19th century, have been beautifully restored. Yet they are eerily quiet. “All the units have been sold, but few people have moved in,” says a guard at the Tai’an Avenue luxury complex.

The question of whether Tianjin can recover, then, is of national salience. Coming clean about its problems is a good first step. But in two other ways, the Tianjin example is worrying. First, local officials appear willing to tolerate only a limited reckoning. Tianjin, like other parts of China, has relied on government-owned companies to pay for investments. Zhang Zhiwei, an economist with Deutsche Bank, has estimated that in Tianjin these companies only have enough revenue to cover about 40% of what they owe in interest, the third-worst ratio among China’s provinces. Tianjin is, he says, a “pilot experiment” for how the government will resolve its debts.

The experiment is not going all that well. In May two city-owned developers flirted with defaults on loans that together were worth 700m yuan ($103m). In both cases they conveniently came up with cash in the end. But some analysts saw that as a missed opportunity. In the absence of genuine defaults banks will go on lending to rotten state firms, knowing the government will always prop them up. “China hasn’t killed off this implicit guarantee,” Mr Zhang says.

Second, Tianjin shows that China’s preferred solution to debt problems—growing out of them—is getting harder. As the economy slows, it takes longer to digest bad investments. Binhai is not a ghost city, but it is far from attaining critical mass. The train to Tianjin’s centre is a tenth full during rush hour. The big excitement these days is that the Juilliard School, an American performing-arts conservatory, will open a campus in Binhai next year, its first such venture abroad. But it is also a marker of reduced ambitions. The Juilliard will occupy just one new building. Planners hoped that many more would house big firms by now.

The appeal of Tianjin for foreign investors has waned amid soaring labour costs. Its GDP per person has passed $17,000, ten times higher than in the late 1990s, when manufacturing firms flocked to the city. Samsung, a South Korean electronics giant, once operated several factories in Tianjin. It has shifted its focus to Vietnam, where labour is much cheaper.

It does not help that Tianjin is also one of China’s most rapidly ageing cities. Nearly a quarter of those with local hukou, or residency permits, are more than 60 years old, up from a tenth in the 1980s. As pension and health-care costs rise, social-security provisions will consume nearly half of Tianjin’s pared-down budget this year. Younger migrants have also started to drift away to faster-growing regions in China’s interior. Tianjin lost 52,000 residents last year, its first such decline in five decades.

In May the city made a bold move to attract young professionals. It offered hukous, usually hard to obtain in big cities, to anyone under 40 with a university degree willing to live in Tianjin. In one day 300,000 people applied. With a Tianjin hukou, they could send children to local schools, a big enticement. But many applicants simply wanted to base their families in the city. So officials added a condition, requiring applicants to work there, too. Just 5,800 applicants made the first cut.

There is one big wild card in Tianjin’s future. The central government talks of unifying it with Beijing, to create a huge city cluster. If it truly did that, and moved some government functions from Beijing, Tianjin’s office gluts could vanish, says Tin Sun of CBRE, an international property agency. So far it has taken only baby steps.

In the meantime Tianjin is trying to pick itself up. It is pitching itself to companies in Beijing as a location for back-offices. Tech firms, including Bytedance, a developer of popular apps, have based censorship teams in Tianjin. This is not the glitzy future of the city’s dreams, but it pays the rent. On July 17th, when Tianjin officials reported a grim batch of economic data, they added a rallying cry: “we must summon the courage that it takes to roll a rock up a mountain.” A worthy ambition, so long as they can avoid the fate of Sisyphus.