Closed avpotapov00 closed 8 months ago
It seems that problem in synchronized block contract: it won't be interrupted by calling .interrupt()
.
Furthermore, if we invoked.stop()
, ThreadDeath error won't interrupt synchronized block too.
As a result, after test with deadlocks on synchronized
we have many threads in BLOCKING state, holding resources and slowing down further execution.
@avpotapov00, would ThreadDeath
interrupt the thread if it were parked via LockSupport.part()
?
We can't do much about that. As #214 mentions, a possible solution for us would be to run such "bad" tests (that produce hanging threads) in separate VMs.
When running all tests suite, after test
DeadlockOnSynchronizedTest
passed, we observe increased number of threads in the system. (see picture and dump from TeamCity)dump.txt