JDK-8367609 : serviceability/sa/ClhsdbPmap.java fails when built with Clang
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: svc-agent
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • Submitted: 2025-09-14
  • Updated: 2025-09-15
Related Reports
Causes :  
Relates :  
Description
The problem seems to be in read_lib_segments (ps_core.c), this check is too harsh:

ROUNDUP(existing_map->memsz, page_size) != ROUNDUP(lib_php->p_memsz, page_size)

existing_map->memsz is 0xe24000, while the rhs is 0xe23000. According to the NT_FILE entry, this segment of libjvm.so has a file offset of 0x67f000. It seems that the linker aligned it down according to the page size (0x1000). The offset of the same segment according to "readelf -l libjvm.so" is 0x67fc80. This additional offset should be added to p_memsz to obtain the 0xe24000, which we see in the core dump.

I see a similar failure was reported in JDK-8337196.
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/27274 Date: 2025-09-14 23:16:00 +0000
14-09-2025