It looks to me like we aren’t correctly identifying/tracking opporunities to retry txns
I had exactly the same issue in my STM, btw, and it was due to two threads acting on retries in parallel, one beginning a retry the very same moment another added one on top.
STM.synchronized { ... }
instead of semaphore for easy scala-js compatibility (synchronized does nothing on SJS, but using Java semaphore causes linking errors)
async
was uncancelable anyway?