RFR: 8311981: Test gc/stringdedup/TestStringDeduplicationAgeThreshold.java#ZGenerational timed out

Daniel D. Daugherty dcubed at openjdk.org
Fri Aug 11 18:35:32 UTC 2023


On Fri, 11 Aug 2023 05:09:31 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Please see the JBS issue for full details on the underlying deadlock issue (credit to @stefank for discovering it) and the proposed solution (credit @pchilano and @xmas92 ). Quite simply we make `HandshakeState::has_operation()` non-blocking by using a `try_lock` and conservatively return `true` to indicate an operation may be pending. By not blocking we avoid the deadlock scenario. All usages of the changed code have been examined to see that they are safe with this change (they all basically just take a safe slow path to see if there really is an operation).
> 
> Testing:
> - tiers 1-4, 7
> - the failing string dedup test was run under our tier7 conditions, 10 times on linux-x64-debug and windows-x64-debug
> 
> Given the nature of the deadlock this testing is not sufficient to claims success as we probably only saw 1 failure in many hundreds of runs. So if anyone has suggestions for additional testing please speak up. Otherwise we are relying on "correctness by design" - we've removed a blocking condition that leads to the 3-way deadlock, and examined the code paths affected.
> 
> Thanks.

Thumbs up. The call site analysis is complicated. The only one that
bothers my brain are the suspend cases, but I've convinced myself
that these are okay even if we have errant duplicate calls.

Thanks for including the detailed call site analysis in
https://bugs.openjdk.org/browse/JDK-8311981?focusedCommentId=14603344&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14603344

@robehn - do you have time to take a peak at this one since it is Handshake related?

-------------

Marked as reviewed by dcubed (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15240#pullrequestreview-1574178204
PR Comment: https://git.openjdk.org/jdk/pull/15240#issuecomment-1675190272
PR Comment: https://git.openjdk.org/jdk/pull/15240#issuecomment-1675196326


More information about the hotspot-runtime-dev mailing list