You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See the reproduction. It will deadlock. The problem seems (at least to me) to be in MockInteraction - there is a write lock that is acquired in accept and that causes the deadlock.
To Reproduce
classFoo {
voidbar() {
}
}
...
def called =falsedef foo
foo =Mock(Foo) {
bar() >> {
if (!called) {
called =trueThread.start { foo.bar() }.join()
}
}
}
foo.bar()
This PR reverts the changes of PR #1885 and hopefully fixes#583, #1882,
and #1899 properly without the fallout of the previous PR.
All interaction handling stays synchronized, but the response generation
happens unsynchronized.
Co-authored-by: Leonard Brünings <leonard.bruenings@gradle.com>
Describe the bug
See the reproduction. It will deadlock. The problem seems (at least to me) to be in
MockInteraction
- there is a write lock that is acquired inaccept
and that causes the deadlock.To Reproduce
Expected behavior
No deadlock
Actual behavior
Deadlock
Java version
21.0.2
Buildtool version
Gradle 8.6
What operating system are you using
Linux
Dependencies
Only Spock.
Additional context
Ported from #1882 (comment)
cc @leonard84
The text was updated successfully, but these errors were encountered: