core_analyzer icon indicating copy to clipboard operation
core_analyzer copied to clipboard

tcmalloc not auto detected while upgraded to 16.3 from 12.1

Open fish2bird opened this issue 6 months ago • 1 comments

Describe the bug

Same coredump with tcmalloc, previous version can detect and heap /v as expected

but new core_analyzer failed.

(gdb) heap /v
Failed to extract heap metadata from gv mp_
==================================================================================
== The memory manager is assumed to be glibc 2.34                                ==
== If this is not true, please debug with another machine with matching glibc   ==
==================================================================================
failed to init heap

after switch_heap tc, all comes back

(gdb) switch_heap tc
switch to heap tc

(gdb) heap /v
  size_class   num_spans  block_size  inuse_blks inuse_bytes   free_blks  free_bytes
.
.
.

To Reproduce Steps to reproduce the behavior:

Expected behavior

detect tcmalloc

Screenshots

Desktop (please complete the following information):

  • OS : EulerOS V2R12
  • tcmalloc = gperftools 4.5.10
  • libc = 2.34
  • all debug symbol loaded
  • gdb 16.3
(gdb) info sharedlibrary c.so
From                To                  Syms Read   Shared Object Library
0x00007ff49ec4caa0  0x00007ff49ec6f873  Yes         fakeroot/usr/lib64/libtcmalloc.so.4
0x00007ff49e55a400  0x00007ff49e6c9af9  Yes         fakeroot/usr/lib64/libc.so.6
(gdb) p gv
No symbol "gv" in current context.
(gdb) p mp_
$1 = {trim_threshold = 131072, top_pad = 131072, mmap_threshold = 131072, arena_test = 8, arena_max = 0, thp_pagesize = 0, hp_pagesize = 0, hp_flags = 0, n_mmaps = 0, n_mmaps_max = 65536, max_n_mmaps = 0, no_dyn_threshold = 0, mmapped_mem = 0, max_mmapped_mem = 0,
  sbrk_base = 0x0, tcache_bins = 64, tcache_max_bytes = 1032, tcache_count = 7, tcache_unsorted_limit = 0}

Additional context

I debugged new version, found out lookup_symbol("TCMalloc_PageMap2<35>", 0, VAR_DOMAIN, 0).symbol got nullptr

but gdb 12.1 returns valid symbol ptr.

fish2bird avatar Nov 01 '25 07:11 fish2bird