I have an application that is unresponsive and seems to be in a deadlock or something like a deadlock. See the two threads below. Notice that the My-Thread@101c
It is hard to tell with the little information you give us. Then the code is full of bad coding practice that basically every second line could cause some issues. So all I can do is some sophisticated guesses:
The line 134 does not contain anything that could cause a lock, so the information in the stacktrace has to be off. I assume that commit is true, as otherwise the code would hang on the executor creation, which is sufficiently complex for the JVM to not optimize that out of the stacktrace. Therefore the line where it hangs has to be the clock.latch() call. I don't know what it does, but given the try/finally structure it has to be something important, maybe related to threading.
Then the "why does it hang". As you already stated two threads try to access the Swing thread for some work, but at least one never returns, which obviously results in a deadlock of all Swing components. To block the Swing thread someone has to at least call it, but no single line in the code presented does that, so again: sophisticated guessing.
The first synchronized statement cannot be the reason, as it has already been passed, the second is not in the stacktrace but considering that this one might be faulty, it could probably be just in the progress of being called thanks to JVM code re-ordering for optimization.
That leaves two candidates for this issue: the one is the clock.latch(), which can cause an issue, but only if it internally does any form of synchronization, for example being declared as synchronized void latch(), although I cannot tell how this would block as there is too little information. But based on the code presented, I assume that the rest of the program is in equal bad shape, so that isn't this far off. The second possibility is the synchronized(pendingEntries), but again: there is no evidence in the data presented that could cause this, but given the example anything goes.