RFR: 8340401: DcmdMBeanPermissionsTest.java and SystemDumpMapTest.java fail with assert(_stack_base != nullptr) failed: Sanity check

Thomas Stuefe stuefe at openjdk.org
Sun Sep 22 09:23:35 UTC 2024


On Sat, 21 Sep 2024 07:54:20 GMT, David Holmes <dholmes at openjdk.org> wrote:

> > I don't think this is limited to JavaThread
> 
> @tstuefe whether other kinds of thread iterators have potential issues with the state of the threads they may observe is not relevant to the question of whether the proposed check goes in the iteration loop or the HANDLE_THREAD macro - we don't process any GC threads with HANDLE_THREAD. The JavaThread iterator can return a thread that has not yet set its stack so the code using the iterator needs to deal with that if it might be an issue.

We iterate GC threads (https://github.com/openjdk/jdk/blob/9b54225e35da5411e7a9e51320adc3b014b92261/src/hotspot/share/nmt/memMapPrinter.cpp#L226) here; it calls vma_touches_thread_stack, which is why I proposed in my last comment (https://github.com/openjdk/jdk/pull/21091#pullrequestreview-2317615786) to fix that function. Am I overlooking something?

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

PR Comment: https://git.openjdk.org/jdk/pull/21091#issuecomment-2366298213


More information about the hotspot-runtime-dev mailing list