RFR: 8262454: Handshake timeout improvements, single target, kill unfinished thread [v3]
Daniel D.Daugherty
dcubed at openjdk.java.net
Wed Mar 10 15:11:11 UTC 2021
On Wed, 10 Mar 2021 13:21:26 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> When executing a single target handshake we do not have a timeout.
>> When we timeout we should crash the thread with the non-completed handshake operation.
>>
>> VM_Handshake only had one implementer so I remove it.
>>
>> Passes t1-5.
>
> Robbin Ehn has updated the pull request incrementally with one additional commit since the last revision:
>
> Spelling error
I thought I had submitted this yesterday. Sorry about that.
src/hotspot/share/runtime/handshake.cpp line 189:
> 187: if (thr->handshake_state()->operation_pending(op)) {
> 188: log_error(handshake)("JavaThread " INTPTR_FORMAT " has not cleared handshake op: " INTPTR_FORMAT, p2i(thr), p2i(op));
> 189: target = thr;
Perhaps add a comment above this line:
// Remember the last one found for more diagnostics below.
src/hotspot/share/runtime/handshake.cpp line 204:
> 202: log_error(handshake)("No thread with an unfinished handshake op(" INTPTR_FORMAT ") found.", p2i(op));
> 203: }
> 204: fatal("Handshake timeout");
The old code did a log_stream.flush() before calling fatal().
Did you decide that wasn't necessary anymore?
Update: Or maybe the old code needed it because it was doing log_stream.print()
calls and the new code is calling log_err(handshake) which doesn't need it... Dunno...
test/hotspot/jtreg/runtime/handshake/HandshakeTimeoutTest.java line 27:
> 25: import jdk.test.lib.Utils;
> 26: import jdk.test.lib.process.ProcessTools;
> 27: import jdk.test.lib.process.OutputAnalyzer;
Should these be in alpha sort order?
-------------
Marked as reviewed by dcubed (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/2743
More information about the hotspot-runtime-dev
mailing list