[jdk8u-dev] RFR: 8305165: [8u] ServiceThread::nmethods_do is not called to keep nmethods from being zombied while in the queue

Paul Hohensee phh at openjdk.org
Thu Mar 30 15:56:51 UTC 2023


On Wed, 29 Mar 2023 09:54:09 GMT, Joshua Zhu <jzhu at openjdk.org> wrote:

> Various Crashes in JvmtiExport::post_compiled_method_load were found in
> our production environment after users started to receive the JVMTI
> COMPILED_METHOD_LOAD event.
> ServiceThread::nmethods_do should have been called to keep nmethods from
> being zombied while in the JvmtiDeferredEventQueue, but
> JavaThead::nmethods_do is called at present.
> Make a virtual function call to the correct method to fix this issue.
> With the fix, various crashes were gone.
> This issue only exists in 8u.

Could you also add 'virtual' to the nmethods_do declaration in JavaThread? Not strictly necessary, but good code hygiene.

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

Changes requested by phh (Reviewer).

PR Review: https://git.openjdk.org/jdk8u-dev/pull/293#pullrequestreview-1365442713


More information about the jdk8u-dev mailing list