Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8346717: serviceability/dcmd/vm/SystemDumpMapTest.java failing on Windows with "Stack base not yet set for thread id" #22870

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/hotspot/share/nmt/memMapPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static bool vma_touches_thread_stack(const void* from, const void* to, const Thr
// kernel. That can happen, e.g., for non-java threads that don't have guard pages.
// Therefore we go for the simplest way here and check for intersection between VMA and thread stack.
// Note it is possible to encounter a brand new thread that has not yet initialized its stack fields.
return range_intersects(from, to, (const void*)t->stack_end(), (const void*)t->stack_base_or_null());
return t->stack_base_or_null() != nullptr && range_intersects(from, to, (const void*)t->stack_end(), (const void*)t->stack_base());
}

struct GCThreadClosure : public ThreadClosure {
Expand Down
12 changes: 12 additions & 0 deletions test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@
import jdk.test.lib.dcmd.JMXExecutor;
import jdk.test.lib.process.OutputAnalyzer;

/*
* @test
* @summary Test of diagnostic command System.map using ZGC
* @library /test/lib
* @requires (os.family == "linux" | os.family == "windows" | os.family == "mac")
* @modules java.base/jdk.internal.misc
* java.compiler
* java.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
* @run testng/othervm -XX:+UsePerfData -XX:+UseZGC SystemMapTest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add separate testcase for ZGC. It is expected that hotspot tests are usually executed to ensure that all functionality works with any GC.
If you want to add it to ensure that regression testcase is always executed even no ZGC is set then please

  1. add
    * @requires vm.gc.Z
    So testcase is not executed if non-ZGC GC (Parallel/Serial etc) is set explicitly.
  2. Add
    * @bug 8346717
  3. Add id like
    * @test id=zgc
    to make testcase name clearer.

*/

/*
* @test
* @summary Test of diagnostic command System.map
Expand Down