protected ManagedDomainObject waitDomainObject(String path) throws Exception {
		DomainFile df;
		long start = System.currentTimeMillis();
		while (true) {
			df = env.getProject().getProjectData().getFile(path);
			if (df != null) {
				return new ManagedDomainObject(df, false, false, monitor);
			}
			Thread.sleep(1000);
			if (System.currentTimeMillis() - start > 30000) {
				throw new TimeoutException("30 seconds expired waiting for domain file");
			}
		}
	}
This seems like a bug in gdb. AFAICT, it's a rehash or regression of
https://sourceware.org/bugzilla/show_bug.cgi?id=17247. If I attach to the
hung gdb, I get a similar stack trace, but with Python frames on the
stack. The workaround given in the comments works here, too. I hesitate
to point fingers, though, because I'm testing with a modern gdb-13.1
compiled from source on a rather un-modern distro.
Ghidra/Test/DebuggerIntegrationTest/src/test.slow/java/agent/gdb/rmi/AbstractGdbTraceRmiTest.java