Gradle build stuck during test execution

I have a build that gets stuck everytime we execute our tests. The build is a multi-project build.

The following is the thread dump of the gradle daemon. I see 3 TaskProcessors all trying to stop the tests but all of them seem to be waiting on a condition that i cant seem to figure out