Please sign in to comment.
Reference: ZD-19531 Looking at , one notices that three threads are in an effective dead lock state around synchronizeOnMark. I extracted relevant part into . Thread #1661 is trying to report a discovered mark, but blocking . Thread #1665 is inside synchronizeOnMark, on markCountLock.wait() . Thread #1667 is stuck on Future.get() and hasn't returned , which holds the lock that blocks  from unblocking . The root problem is that synchronizeOnMark method is never meant to be concurrently executed. But given the way the lock is used, if one thread gets to wait(), it's possible that another thread would come along and go into this function. In this change, I'm preventing that by introducing another lock to serialize the execution of the entire synchronizeOnMark() call. I'm not using the "this" object for locking because it's already used for another purpose (see the lock() method) I'm not yet clear on why the synchronizeOnMark() method is called concurrently to begin with. The interaction with the -T option of Maven is suspected.  https://gist.github.com/kohsuke/374c22e737a77c9b0421#file-gistfile1-txt-L2  https://gist.github.com/kohsuke/374c22e737a77c9b0421#file-gistfile1-txt-L34  https://gist.github.com/kohsuke/374c22e737a77c9b0421#file-gistfile1-txt-L71  https://gist.github.com/abayer/7ff4de807c6373eec40d  https://gist.github.com/kohsuke/374c22e737a77c9b0421
- Loading branch information...
Showing with 22 additions and 15 deletions.