[SERVER-44010] heap_profiler.cpp has a few bugs Created: 15/Oct/19  Updated: 30/Oct/23

Status: Backlog
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Billy Donahue Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: sa-remove-fv-backlog-22
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-41787 heapprofile may crash Closed
is related to SERVER-68978 Log memory allocations triggered by a... Backlog
Assigned Teams:
Service Arch
Operating System: ALL
Participants:
Story Points: 2

 Description   

In file heap_profiler.cpp

  • member functions like size(), hash(), operator==, need const.
  • Consider replacing private HashTable implementation with standard one.
  • L479 bounds on j are infinite if numFrames < skipEndFrames. (This was fixed as a side-effect of SERVER-45357)
  • L486 first paren isn't necessarily start of function params.
    for example, "_Z1gIEPFviEv" demangles to "void (*g<>())(int)", a function returning a function pointer. Maybe just don't demangle.
  • L502 StringData receives a dangling reference.
    (This was fixed as a side-effect of SERVER-45357)
     
  • sortByActiveBytes comparator is not a stable order as the elements can shift position during the sort. Fix this comparator (SERVER-41787). 

 

 

 

 



 Comments   
Comment by Ivan Fefer [ 30/Oct/23 ]

Also, I was not able to find jstests they use heap profiler. If we are going to support this, we need to add some.

Comment by Billy Donahue [ 21/Jul/21 ]

in light of SERVER-41787, it looks like heap_profiler.cpp still runs, so we have to handle its bugs.

Comment by Eric Milkie [ 13/Aug/20 ]

It isn't supported and isn't used often enough to warrant fixing the bugs, so we have no long-term plans to fix them.

Comment by Billy Donahue [ 13/Aug/20 ]

Some of these are really really real bugs.

Why is it being closed? Is heap_profiler.cpp being removed?

Generated at Thu Feb 08 05:04:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.