how to report all active memory allocations in a coredump using dbx in AIX7

0

Hi I have generated coredump for one process using gencore in AIX7. Our application reporting huge memory leak in customer's env. I followed below link to create and debug core file of the process.

https://www.ibm.com/support/pages/memory-leak-diagnosis-aix

I created core dump using below command

gencore <PID> <path_to_core>

file core
core: AIX core file fulldump 64-bit, syscmd

then I tried to report active allocations using dbx. I followed below steps.

export MALLOCDEBUG=log:extended,stack_depth:20

./syscmd -b (start the process)

unset MALLOCDEBUG

dbx ./syscmd ./core
Type 'help' for help.
[using memory image in ./core]
reading symbolic information ...

Signal 0 in . at 0x100089f64 ($t1)
0x100089f64 (???) e8610172            lwa   r3,0x170(r1)
(dbx) malloc allocation
Allocations Held by the Process:

           ADDRESS         SIZE HEAP    ALLOCATOR
0x000000011013e2f0         1232    0     YORKTOWN
0x000000011013e7d0         1232    0     YORKTOWN
0x000000011013ecb0         1232    0     YORKTOWN

It does not tell me what made these allocation Whats actually I am doing wrong.

If I attach pid of the running process to dbx, then dbx is reporting active allocations properly with proper stack information like below.

dbx -a 12386586

(dbx) malloc allocation
Allocations Held by the Process:

           ADDRESS         SIZE HEAP      PID  PTHREAD_T  CLOCKTIME      SEQ STACK TRACEBACK

                                                                             0x000000001000002b4 __start
0x00000001101d3d90           16    0 12386578 0x00000000 1608466091     4940 0x00900000000054aa0 malloc_common_debugging
                                                                             0x0090000000002ebd4 malloc@AF103_98
                                                                             0x00900000000031604 calloc_common@AF118_84
                                                                             0x000000001000a9cb4 init_obj_class_substruct
                                                                             0x000000001000a6964 create_struct_dependencies

How can I achieve same thing with core file. Both times I followed same steps. Please suggest me how to solve this problem

aix
coredump
dbx
asked on Stack Overflow Dec 20, 2020 by bhanu

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0