Closed pdvian closed 3 months ago
Could you try to use the switch_heap
command to switch the heap tc malloc?
Could you try to use the
switch_heap
command to switch the heap tc malloc?
Thanks @Celthi. I switched to tcmalloc but tc heap manager is failing to initialize :
(gdb) switch_heap tc switch to heap tc Failed to lookup gv "kPageShift" (gdb) heap tcmalloc heap was not initialized successfully [Error] Failed to walk heap (gdb)
I am looking into it further.
I am still having trouble with the heap manager on ppc64le arch but managed to get the heap commands working for a coredump from x86_64 arch (tried it on x86_64 arch for verification purpose because we were seeing similar problems compared to ppc64le). The tcmalloc heap manager was failing to initialize because of the missing gperftools-devel package on x86_64. The core analyzer on the ppc64le debug environment does have the correct gperftools-devel ppc64le package installed but failing to lookup for type TCMalloc_PageMap2<35>::Leaf now.
gdb 9.2 - x86_64 [root@cdd4337225e4 core_analyzer]# gdb /usr/bin/app /core.1709365 GNU gdb (GDB) 9.2 ... Core was generated by `/usr/bin/app'. Program terminated with signal SIGABRT, Aborted. #0 raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:50 50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. [Current thread is 1 (Thread 0x7f5d0b792200 (LWP 6))] (gdb) heap /tb 5 Top 5 biggest in-use heap memory blocks: addr=0x55dafdd5a000 size=33554432 (32MB) addr=0x55daffd5a000 size=33554432 (32MB) addr=0x55db01d5a000 size=33554432 (32MB) addr=0x55db03d74000 size=33554432 (32MB) addr=0x55db05f18000 size=33554432 (32MB) (gdb) ref 0x55daffd5a000 Search for object type associated with 0x55daffd5a000 Address 0x55daffd5a000 belongs to heap block [0x55daffd5a000, 0x55db01d5a000] size=33554432 ------------------------- 1 ------------------------- [stack] thread 9 frame 2 rsp+120 @0x7f5cf9a71238: 0x55db00000000 |--> [heap block] 0x55daffd5a000--0x55db01d5a000 size=33554432 ------------------------- 2 ------------------------- [stack] thread 1 frame 0 set @0x7ffe0674ba30: 0x55dafffffffe |--> [heap block] 0x55daffd5a000--0x55db01d5a000 size=33554432 ------------------------- 3 ------------------------- [stack] thread 1 frame 2 rsp+12064 @0x7ffe0674ea30: 0x55daffffffff |--> [heap block] 0x55daffd5a000--0x55db01d5a000 size=33554432 ------------------------- 4 ------------------------- [stack] thread 1 frame 2 rsp+14480 @0x7ffe0674f3a0: 0x55daffffffff |--> [heap block] 0x55daffd5a000--0x55db01d5a000 size=33554432 ------------------------- 5 ------------------------- [stack] thread 1 frame 2 rsp+16256 @0x7ffe0674fa90: 0x55daffffffff |--> [heap block] 0x55daffd5a000--0x55db01d5a000 size=33554432 (gdb)
I am still having trouble with the heap manager on ppc64le arch but managed to get the heap commands working for a coredump from x86_64 arch (tried it on x86_64 arch for verification purpose because we were seeing similar problems compared to ppc64le). The tcmalloc heap manager was failing to initialize because of the missing gperftools-devel package on x86_64. The core analyzer on the ppc64le debug environment does have the correct gperftools-devel ppc64le package installed but failing to lookup for type TCMalloc_PageMap2<35>::Leaf now.
The problem seems to be with coredump (using gcore command) generated on ppc64le arch. That's why tcmalloc heap manager failed to initialize. I will re-open this issue if I am still facing the same issue.
Describe the bug Hi Michael,
I am trying to get heap commands (from core_analyzer) working for one of our applications (which is built using tcmalloc) coredump on ppc64le arch . Tried gdb-12.1 with tcmalloc (2.6.3) support but heap command reporting "failed to init heap". Configure command used for gdb-12.1 with tcmalloc build :
$PWD/../configure --with-python=/usr/bin/python3.6m --with-lzma-prefix=/usr/include CFLAGS='-g -I/usr/include' LDFLAGS='-L/usr/lib64' --with-separate-debug-dir=/usr/lib/debug --prefix=/usr
The gdb 12.1 was built with tcmalloc support :
but something is not right with my gdb12.1+tcmalloc build as heap command for simple c++ program coredump which is built with tcmalloc does not work whereas same program built without tcmalloc works perfectly fine:
I tried the
--with-separate-debug-dir
configure option as suggested in https://github.com/yanqi27/core_analyzer/issues/26#issuecomment-800364061 but no luck so far.Any suggestions ?
Thanks in advance.
To Reproduce
Expected behavior
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context glibc and gperftools version matches with coredump environment.