RFR: 8252921: NMT overwrite memory type for region assert when building dynamic archive [v6]
David Holmes
dholmes at openjdk.java.net
Tue Sep 22 09:16:09 UTC 2020
On Mon, 21 Sep 2020 14:19:44 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
>> Thread stack is currently unregistered with NMT in Thread's destructor. Apparently, only Java thread invokes destructor
>> before thread exits. For NonJavaThread, e.g. ConcurrentGCThread, thread may exit while its "Thread" object continues
>> alive, therefore, its thread stack is still "alive" from NMT perspective. Once thread exits, the virtual memory for the
>> thread stack can be reserved again, that confused NMT. The solution is to move thread stack unregistration code to
>> post_run() method.
>
> Zhengyu Gu has updated the pull request incrementally with two additional commits since the last revision:
>
> - Fix indents
> - Back out thread stack cleaning, to be addressed by JDK-8253429
Thanks for restoring those bits. Dealing with the way non-JavaThreads terminate is a known issue (there may already be
an open JBS issue for that) and that is best dealt with directly in that context rather than as part of this change.
Thanks.
-------------
Marked as reviewed by dholmes (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/185
More information about the hotspot-runtime-dev
mailing list