RFR: 8261391: ZGC crash - SEGV in RevokeOneBias::do_thread [v3]

David Holmes dholmes at openjdk.java.net
Mon Feb 22 05:18:49 UTC 2021


On Wed, 17 Feb 2021 19:50:00 GMT, Robbin Ehn <rehn 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
>
> Robbin Ehn has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Tiny spelling error

Marked as reviewed by dholmes (Reviewer).

src/hotspot/share/runtime/handshake.cpp line 291:

> 289:     // Only when the target is not executing the handshake itself.
> 290:     StackWatermarkSet::start_processing(current_target, StackWatermarkKind::gc);
> 291:   }

As per my comment to Erik, this situation seems like a programming error to me as there you should not be a way for the target to create a Handle that the executing thread then gets a hold off - data should only flow one way from the requesting thread to the executing thread.

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

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


More information about the hotspot-runtime-dev mailing list