RFR: 8252921: NMT overwrite memory type for region assert when building dynamic archive [v5]

Zhengyu Gu zgu at openjdk.java.net
Mon Sep 21 12:45:18 UTC 2020


On Mon, 21 Sep 2020 12:32:59 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

>> I've tried without clearing stack_base and stack_size and also reverted the change in stack_base() in thread.hpp.
>> It passed tier1 testing. I'll run more test.
>
>> Sorry but I just don't see any need for clearing stack_base or stack_size, and then you don't need to mess with the
>> assertion in stack_base().
> 
> Well, without cleaning stack_base and stack_size, the thread appears to be live and running, which contradicts NMT
> report (and maybe others, e.g. smap, etc.)
> My initial thought is to filter out terminated thread in Threads::print_on_error(), but it does not seem to have a way.

- JavaThread guarantees to delete 'this' before thread exits.
- NonJavaThread object can outlive thread. Zeroing thread stack/size is a way to indicate liveness of the actual thread.
  I was chasing a race before I realized the thread actual dead, very confusing to see 'G1 Main Marker' as live thread in
  hs_err file.

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

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


More information about the hotspot-runtime-dev mailing list