The world market is widely open. They can sell dollars, US treasury bonds in other countries.
There are only two ways to get out of the debt trap - paid it back or default/go bankrupt. Otherwise one stays in the servitude for ever. Governments have one extra option - they can debase their currency. Imperial Spain did it.