RFR: 8261391: ZGC crash - SEGV in RevokeOneBias::do_thread

Robbin Ehn rehn at openjdk.java.net
Wed Feb 17 09:48:41 UTC 2021


On Tue, 16 Feb 2021 17:55:44 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> Handshakes may contain oop Handles from the requesting thread.
>> A handshake may be executed by another thread than the requester.
>> We must make sure any such Handle is safe to use by other threads before executing the handshake.
>> This change-set adds SWS::start_process() for the requesting thread also (we already do this for the target JavaThread).
>> 
>> Passes t1-5
>
> src/hotspot/share/runtime/handshake.cpp line 289:
> 
>> 287:   StackWatermarkSet::start_processing(current_target, StackWatermarkKind::gc);
>> 288:   if (_requester != NULL && _requester != executioner && _requester->is_Java_thread()) {
>> 289:     // The handshake closure may contains oop Handles from the _requester.
> 
> nit typo: s/contains/contain/

Fixed

> src/hotspot/share/runtime/handshake.cpp line 282:
> 
>> 280: };
>> 281: 
>> 282: void HandshakeOperation::prepare(JavaThread* current_target, Thread* executioner) {
> 
> I don't think `executioner` is good name here since it doesn't look
> like the Thread passed via that parameter is killing anything.
> Perhaps you mean `executer` - as in the Thread that is executing
> some specific code/function.
> 
> Or maybe go with `executing_thread` to be very clear.

Fixed

> src/hotspot/share/runtime/handshake.cpp line 66:
> 
>> 64:     _requester(requester) {}
>> 65:   virtual ~HandshakeOperation() {}
>> 66:   void prepare(JavaThread* current_target, Thread* executioner);
> 
> I don't think `executioner` is good name here since it doesn't look
> like the Thread passed via that parameter is killing anything.
> Perhaps you mean `executer` - as in the Thread that is executing
> some specific code/function.
> 
> Or maybe go with `executing_thread` to be very clear.

Fixed

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

PR: https://git.openjdk.java.net/jdk/pull/2571


More information about the hotspot-runtime-dev mailing list