My favorites | Sign in
Project Home Downloads Wiki Issues Source Code Search
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 407: Hooked allocator frame not found, returning empty trace message is displayed in heapprofiler
3 people starred this issue and may be notified of changes. Back to list
Status:  Duplicate
Merged:  issue 385
Owner:  chapp...@gmail.com
Closed:  Mar 2013


Sign in to add a comment
 
Reported by bokun.c...@gmail.com, Feb 27, 2012
What steps will reproduce the problem?
1. i built gperf 2.0 in the cross compile environment for arm
2. there is no issue to use tcmalloc and cpu profiler
3. but, when i use heap profiler, there is an error like below
   "Hooked allocator frame not found, returning empty trace"

What is the expected output? What do you see instead?

<expected output>
Dumping heap profile to ./mybin.hprof.0161.heap (1 MB allocated cumulatively, 1 MB currently in use)

<current output>
Hooked allocator frame not found, returning empty trace

i tried to use ./configure --enable-frame-pointers, but same error is happened again

What version of the product are you using? On what operating system?
O/S : linux 2.6.36
perf : 2.0

Please provide any additional information below.
- i used scratchbox2 to build tcmalloc for arm


libprofiler.so.0.3.0
247 KB   Download
libtcmalloc.so.4.1.0
1.9 MB   Download
Mar 1, 2012
#1 meng.mob...@gmail.com
I did almost exact the same thing you have done and got exact the same problem, but my OS is Linux 2.6.32.12-0.7 with  Intel X64, buiding with g++.
  

Mar 2, 2012
Project Member #2 chapp...@gmail.com
The function generating this message seems to have a comment regarding this issue. Refer to the comment at the end of the function MallocHook_GetCallerStackTrace in the file src/malloc_hook.cc. If that doesn't work then I would do the following:

1. Set a breakpoint in this function using gdb and generate a full backtrace.
2. Instrument this function to print out the backtrace as it is generating it.

From the results above we should be able to further determine where things are going wrong.

-Dave
Mar 5, 2012
#4 bokun.c...@gmail.com
I added callstack


(gdb)  b MallocHook_GetCallerStackTrace
Breakpoint 2 at 0x401afd60: file src/malloc_hook.cc, line 655.
(gdb) c
Continuing.

Breakpoint 2, MallocHook_GetCallerStackTrace (result=0xbecd66b8, max_depth=32, skip_count=4) at src/malloc_hook.cc:655
1: x/i $pc
=> 0x401afd60 <MallocHook_GetCallerStackTrace(void**, int, int)+8>:
    ldr r10, [pc, #404] ; 0x401afefc <MallocHook_GetCallerStackTrace(void**, int, int)+420>

(gdb) bt full
#0  MallocHook_GetCallerStackTrace (result=0xbecd66b8, max_depth=32, skip_count=4) at src/malloc_hook.cc:655
        stack =           {0x400fa020,
          0x0,
          0x1,
          0x2d5,
          0x0,
          0x400fa020,
          0x40197c7e,
          0x40197c7e,
          0x401917e4,
          0x40190d04,
          0x1,
          0x4018dfb4,
          0x400fa1d8,
          0xe16ee263,
          0xbecd6714,
          0x401912d4,
          0x400fa020,
          0x40197c7e,
          0xffffffff,
          0xbecd66fc,
          0x401d5560,
          0x400cb4c0,
          0x41025000,
          0x400cb000,
          0x400fa020,
          0x4a690,
          0x4018b000,
          0xbecd6824,
          0x4100db38,
          0x0,
          0x1,
          0x1,
          0x0,
          0xbecd6734,
          0x401912d4,
          0xbecd6700,
          0x401d5560,
          0x15588,
          0xbecd66b8,
          0x1,
          0x3e8,
          0x3e8,
          0x0,
          0xc4000}
        depth = <value optimized out>
#1  0x401b7914 in RecordAlloc (ptr=0xc4000, size=1000) at src/heap-profiler.cc:303
        stack =           {0x0,
          0x400fa1d8,
          0x41025000,
          0x0,
          0x40190d04,
          0x400fa020,
          0xbecd679c,
          0xffffffff,
          0xbecd6768,
          0xc4000,
          0x400cb4c0,
          0x41025000,
          0x400cb000,
          0x400fa020,
          0x4ac28,
          0x4018b000,
          0xbecd6824,
          0x4100db38,
          0x0,
          0x1,
          0x1,
          0x0,
          0x400fa020,
          0x40190d04,
          0x400cb4c0,
          0xc4000,
          0x3e8,
          0xbecd675c,
          0x928e0,
          0x928e0,
          0xc4000,
          0x0,
          0x3e8}
        depth = <value optimized out>
#2  NewHook (ptr=0xc4000, size=1000) at src/heap-profiler.cc:326
No locals.
#3  0x401b00f4 in MallocHook::InvokeNewHookSlow (p=0xc4000, s=1000) at src/malloc_hook.cc:525
        i = <value optimized out>
        hooks =           {0x401b78e4 <NewHook(void const*, size_t)>,

          0x928e0 <std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_insert<false>(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar
_t, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&) const+1756>,
          0xc4000,
          0,
          0x3e8,
          0xbecd6824,
          0x41014018}
        num_hooks = 1
#4  0x401bf12c in InvokeNewHook (size=1000) at src/malloc_hook-inl.h:161
        hook = <value optimized out>
#5  tc_malloc (size=1000) at src/tcmalloc.cc:1493
        result = 0xc4000
#6  0x00008ad0 in main () at multithread_heapprofiler.c:99
        pAtr = 0x8b44 "\370E-\351"
        p_thread =           {34748,
          35144,
          35732,
          1104460656,
          0}
        status = 0
        j = 0
        rotate = 0
Jun 19, 2012
#5 michael....@gmail.com
I found the same problem with GCC 4.7 on Fedora 17. I got it to work by manually editing the makefile to add -fno-omit-frame-pointers, as per revision 150.
Mar 10, 2013
Project Member #6 chapp...@gmail.com
-fno-omit-frame-pointers is now explicitly specified for i386 as gcc changed the default to omit. Code is on the trunk at the present time waiting for release. Refer to issue-385.
Status: Duplicate
Owner: chapp...@gmail.com
Mergedinto: 385
Sign in to add a comment

Powered by Google Project Hosting