Fwd: :[heap leak checker]: Symbol is getting displayed in the stacktrace while using heap leak checker

38 views
Skip to first unread message

Santosh Mahto

unread,
May 4, 2012, 7:38:27 AM5/4/12
to chromium-...@chromium.org, chromium...@chromium.org



---------- Forwarded message ----------
From: Santosh Mahto <santosh.inb...@gmail.com>
Date: May 4, 4:29 pm
Subject: :[HEAP-LEAK check]: Memory Leak stacktrace is coming in
address not in form of symbol. Whatcould be problem??
To: Chromium-discuss


Hi,

Some on please reply or let me know there is possibility to get proper
symbolic information for the address.
I tried to use "Addr2line –Cfe <exe> <virtual addr>" but not able
extract proper symbol.

I appreciate for your help in advance.

Thanks & Regards,
Santosh.

On Apr 30, 4:15 pm, Santosh Mahto <santosh.inb...@gmail.com> wrote:







> +Adding more information :--------

> Debug symbols are enabled , I am able to debug the code with gdb.

> I followed the following links to check the same

>http://dev.chromium.org/developers/how-tos/using-the-heap-leak-checke...

> OUTPUT Logs:

> $ ./out/Debug/chrome
> WARNING: Perftools heap leak checker is active -- Performance may
> suffer
> [15638:15638:1129135403973:WARNING:zygote_host_linux.cc(149)] Running
> without the SUID sandbox! Seehttp://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment
> for more information on developing with the sandbox on.
> WARNING: Perftools heap leak checker is active -- Performance may
> suffer
> WARNING: Perftools heap leak checker is active -- Performance may
> suffer
> [15638:15654:1129135941428:WARNING:http_proxy_client_socket.cc(289)]
> Blocked proxy response with status 403 to CONNECT request for
> translate.googleapis.com:443.
> [15638:15638:1129139505392:WARNING:scoped_temp_dir.cc(62)] Deleting /
> tmp/.org.chromium.Chromium.mZHCkX 0x7fa724f18be0
> Leak check _main_ detected leaks of 92592 bytes in 1499 objects
> The 20 largest leaks:
> Unknown option: symbols
> Invalid option(s)

> Usage:
> pprof [options] <program> <profiles>
>    <profiles> is a space separated list of profile names.
> pprof [options] <profile>
>    <profile> is a remote form.  Symbols are obtained from host:port/
> pprof/symbol

>    Each profile name can be:
>    /path/to/profile        - a path to a profile file
>    host:port[/<service>]   - a location of a service to get profile
> from

>    The /<service> can be /pprof/heap, /pprof/profile, /pprof/growth,
> or /pprof/contention.
>    For instance: "pprofhttp://myserver.com:80/pprof/heap".
>    If /<service> is omitted, the service defaults to /pprof/profile
> (cpu profiling).

>    For more help with querying remote servers, including how to add
> the
>    necessary server-side support code, see this filename (or one like
> it):

>    /usr/doc/google-perftools-0.8/pprof_remote_servers.html

> Options:
>    --cum               Sort by cumulative data
>    --base=<base>       Subtract <base> from <profile> before display
>    --interactive       Run in interactive mode (interactive "help"
> gives help) [default]
>    --seconds=<n>       Length of time for dynamic profiles [default=30
> secs]

> Reporting Granularity:
>    --addresses         Report at address level
>    --lines             Report at source line level
>    --functions         Report at function level [default]
>    --files             Report at source file level

> Output type:
>    --text              Generate text report
>    --gv                Generate Postscript and display
>    --list=<regexp>     Generate source listing of matching routines
>    --disasm=<regexp>   Generate disassembly of matching routines
>    --dot               Generate DOT file to stdout
>    --ps                Generate Postcript to stdout
>    --pdf               Generate PDF to stdout
>    --gif               Generate GIF to stdout

> Heap-Profile Options:
>    --inuse_space       Display in-use (mega)bytes [default]
>    --inuse_objects     Display in-use objects
>    --alloc_space       Display allocated (mega)bytes
>    --alloc_objects     Display allocated objects
>    --show_bytes        Display space in bytes
>    --drop_negative     Ignore negative differences

> Contention-profile options:
>    --total_delay      Display total delay at each region [default]
>    --contentions      Display number of delays at each region
>    --mean_delay       Display mean delay at each region

> Call-graph Options:
>    --nodecount=<n>     Show at most so many nodes [default=80]
>    --nodefraction=<f>  Hide nodes below <f>*total [default=.005]
>    --edgefraction=<f>  Hide edges below <f>*total [default=.001]
>    --focus=<regexp>    Focus on nodes matching <regexp>
>    --ignore=<regexp>   Ignore nodes matching <regexp>
>    --scale=<n>         Set GV scaling [default=0]

> Miscellaneous:
>    --tools=<prefix>    Prefix for object tool pathnames
>    --test              Run unit tests
>    --help              This message
>    --version           Version information

> Examples:

> pprof /bin/ls ls.prof
>                        Outputs one line per procedure
> pprof --gv /bin/ls ls.prof
>                        Displays annotated call-graph via 'gv'
> pprof --gv --focus=Mutex /bin/ls ls.prof
>                        Restricts to code paths including a .*Mutex.*
> entry
> pprof --gv --focus=Mutex --ignore=string /bin/ls ls.prof
>                        Code paths including Mutex but not string
> pprof --list=getdir /bin/ls ls.prof
>                        (Per-line) annotated source listing for
> getdir()
> pprof --disasm=getdir /bin/ls ls.prof
>                        (Per-PC) annotated disassembly for getdir()
> pprof localhost:1234
>                        Outputs one line per procedure for localhost:
> 1234

> FATAL ERROR: Invalid option(s)

> Leak of 232 bytes in 1 objects allocated from:
>         @ 7fa731aa285d
>         @ 7fa730ddccb9
>         @ 7fa7340f0e81
>         @ 7fa733fb0f8f
>         @ 7fa733fb09b7
>         @ 7fa733faeddb
>         @ 7fa731c15891
>         @ 7fa731c15e72
>         @ 7fa730c9991d
>         @ 7fa730c998dc
>         @ 7fa7286f8c4d

> If the preceding stack traces are not enough to find the leaks, try
> running THIS shell command:

> pprof ./out/Debug/chrome "/tmp/chrome.15638._main_-end.heap" --
> inuse_objects --lines --heapcheck  --edgefraction=1e-10 --
> nodefraction=1e-10 --gv

> If you are still puzzled about why the leaks are there, try rerunning
> this program with HEAP_CHECK_TEST_POINTER_ALIGNMENT=1 and/or with
> HEAP_CHECK_MAX_POINTER_OFFSET=-1
> If the leak report occurs in a small fraction of runs, try running
> with TCMALLOC_MAX_FREE_QUEUE_SIZE of few hundred MB or with
> TCMALLOC_RECLAIM_MEMORY=false, it might help find leaks more
> repeatably
> Exiting with error code (instead of crashing) because of whole-program
> memory leaks

> $

> plz help me to resolve above issue to get the symbols for the
> callstack.

> Thanks in advance,
> Santosh.

> On Apr 30, 12:25 pm, Santosh Mahto <santosh.inb...@gmail.com> wrote:

> > Hi All

> > I am using  heap-leak check to find memory leak in Linux setup.I am
> > able to get the leak details
> > but  problem is that leak stacktrace is  coming in form of memory
> > address not in symbols.

> > I want  stacktrace to be displayed in symbols. what is the issue  ??
> > Is there any flag problem or I  am missing something??
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages