protected void waitState(int infnum, Supplier<Long> snapSupplier, TraceExecutionState state) {
		KeyPath infPath = KeyPath.parse("Inferiors").index(infnum);
		TraceObject inf =
			Objects.requireNonNull(tb.trace.getObjectManager().getObjectByCanonicalPath(infPath));
		waitForPass(
			() -> assertEquals(state.name(), tb.objValue(inf, snapSupplier.get(), "_state")));
		waitTxDone();
	}
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