-
Bug
-
Resolution: Fixed
-
P4
-
13, 17, 21, 22
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8323352 | 21.0.3-oracle | Thomas Stuefe | P4 | Resolved | Fixed | b01 |
JDK-8319712 | 21.0.2 | Thomas Stuefe | P4 | Resolved | Fixed | b07 |
JDK-8333342 | 17.0.13 | Martin Doerr | P4 | Resolved | Fixed | b01 |
Amount of threads reported incorrectly for summary and detail diff when used by jcmd. During comparison to baseline threads amount is always reported as 0 on non-AIX platforms:
$ jcmd <PID> VM.native_memory baseline
$ jcmd <PID> VM.native_memory summary.diff
...
Thread (reserved=23622KB +1027KB, committed=1358KB +107KB)
(thread #0)
(stack: reserved=23552KB +1024KB, committed=1288KB +104KB)
(malloc=45KB +2KB #142 +6)
(arena=25KB +1d #44 +2)
...
This is happening because ThreadStackTracker::track_as_vm() condition is ignored during MallocMemorySnapshot collection and thread count is always reported as malloc count of allocations for mtThreadStack:
inline size_t thread_count() const {
MallocMemorySnapshot* s = const_cast<MallocMemorySnapshot*>(this);
return s->by_type(mtThreadStack)->malloc_count();
}
MallocMemorySnapshot::thread_count() should consider ThreadStackTracker::track_as_vm().
Issue is not reproducible if ThreadStackTracker::track_as_vm() == false.
- backported by
-
JDK-8319712 NMT: summary diff reports threads count incorrectly
- Resolved
-
JDK-8323352 NMT: summary diff reports threads count incorrectly
- Resolved
-
JDK-8333342 NMT: summary diff reports threads count incorrectly
- Resolved
- relates to
-
JDK-8318474 Fix memory reporter for thread_count
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/a058ad15
-
Commit openjdk/jdk21u/31c759dd
-
Commit openjdk/jdk/37aed6f4
-
Review openjdk/jdk17u-dev/2084
-
Review openjdk/jdk21u/310
-
Review openjdk/jdk/15490