RFR: 8253694: Remove Thread::muxAcquire() from ThreadCrashProtection()

Markus Grönlund mgronlun at openjdk.java.net
Wed Sep 30 09:56:24 UTC 2020


On Wed, 30 Sep 2020 06:51:41 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> Hi Patricio,
>> 
>> This seems fine, but I'm wondering what the motivation for this change was? Adding more per-thread state is arguably
>> just adding to the clutter of per-thread state. I don't know if this approach was considered when @robehn fixed
>> JDK-8183925.  Thanks,
>> David
>
> I don't think so.
> 
> I have not seen crash protection catching anything since pre-JDK 9. (we did a lot of fixes to the stack-walking code)
> I would remove it completely instead :) Not sure what JFR team says...

Like David I would also like to know more about the motivation. Is the feature expected to be used by a larger number
of threads? If so, there might be concerns about scalability that was not considered initially.

I agree that we have seen less, and for a long time almost no, asserts related to thread sampling in our testing with
fastdebug builds (only product builds run with the protection). At the same time, I am not sure how representative that
is considering all the code that is out there.  We should also keep in mind that we have upcoming features that will
have slightly different stack layouts which will affect how stackwalking is achieved, so I would recommend keeping the
established safety mechanism.

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

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


More information about the hotspot-runtime-dev mailing list