Closed GoogleCodeExporter closed 9 years ago
The errors all look like you're not able to get stacktraces properly. How are
you getting stack traces? Did you run configure --enable-frame-pointers, or
are you depending on libunwind? It looks like the latter, based on how you
said you ran configure above. My guess is libunwind doesn't work properly with
perftools on ubuntu 11. That's not surprising; see the INSTALL file for more
info about libunwind and perftools.
If you run ./configure --enable-frame-pointers, then these problems should go
away. See the INSTALL file (and the README) for more info.
Closing this WorkingAsIntended, even though it's not great, since we don't have
it in our power to change libunwind to work better with perftools (we've tried!)
Original comment by csilv...@gmail.com
on 19 Dec 2011 at 10:00
Thanks so much for your answer!
Now I've done:
./configure --enable-frame-pointers
make
sudo make install
then I compile my program with
-fno-omit-frame-pointer -fno-builtin-malloc -fno-builtin-calloc
-fno-builtin-realloc -fno-builtin-free
and link it to -lprofiler -ltcmalloc
Then, when setting CPUPROFILE I don't get stack traces, and HEAPPROFILE turns
on the heap tracking but then I get prof.0001.heap almost empty with no nodes.
Does it means that I cannot use perftools in Ubuntu 11.10 or is it just that
I'm doing something wrong?
Original comment by carles.f...@gmail.com
on 20 Dec 2011 at 2:16
No, it should work fine. Does 'make check' pass in this case? Is it possible
your program just isn't using enough CPU or memory to show up in profilers?
Original comment by csilv...@gmail.com
on 20 Dec 2011 at 4:14
Hi,
unfortunately, I'm unable to make perftools 1.8.3 work in Ubuntu 11.10. The
'make check' does not pass regardless including --enable-frame-pointers or not
when configuring, and I don't get results when activating CPUPROFILE or
HEAPPROFILE.
I have replicated this in Ubuntu 10.04 and it works; I can get stack traces and
nice diagrams with pprof.
Original comment by carles.f...@gmail.com
on 20 Dec 2011 at 11:08
Hmm, weird. Unfortunately, I don't have access to an ubuntu 11 machine, but
will try to track one day. If you're able to debug this in any way, it would
be very helpful! Probably stacktrace_unittest would be the easiest case to
look at.
Original comment by csilv...@gmail.com
on 20 Dec 2011 at 11:21
OK, I got an ubuntu 11 instance on vmware. I ran the perftools 'make check'
and it failed in much the way you saw (though not totally -- the stacktrace
unittest worked, for instance). Then I ran 'make distclean' and did it again,
and the run completed successfully.
Can you try that -- running 'make check' again, or maybe doing 'make distclean'
and then rerunning from the configure step? I don't know why that would help,
but it seems to have, for me.
Another thing you can try is ./configure ... CXXFLAGS=-g. See how things work
for you with optimization turned off.
Original comment by csilv...@gmail.com
on 21 Dec 2011 at 4:16
I installed a fresh ubuntu 11.10 and run
./configure --enable-frame-pointers
make
make check
... 9 of 43 tests failed
make distclean
./configure --enable-frame-pointers
make
make check
... 9 of 43 tests failed
./configure --enable-frame-pointers CXXFLAGS=-g
make
make check
.. and the run gets frozen at Testing ./heap-checker_unittest with
HEAPCHECK=normal
I will continue looking at this.
Original comment by carles.f...@gmail.com
on 22 Dec 2011 at 12:43
Yeah, you're definitely seeing different failures than I was. I don't know
what's different about our configurations -- except mine is running under
vmware -- but clearly something is.
Original comment by csilv...@gmail.com
on 22 Dec 2011 at 1:43
I installed Ubuntu 11.10 on Virtual Box, and updated everything. I tried with
google-perftools1.9 and problems persist:
./configure --enable-frame-pointers
make
make check
... 10 of 43 tests failed
and then I did it again:
make distclean
./configure --enable-frame-pointers
make
make check
9 of 43 tests failed
Curious...
Original comment by carles.f...@gmail.com
on 24 Dec 2011 at 12:01
Well, given that you used a fresh install, I have to imagine that others are
going to have the same problem. I wonder what it is, and why I couldn't
reproduce it. I'm home for the holidays now, but will look into it when I'm
back. In the meantime, feel free to dig into it yourself!
Original comment by csilv...@gmail.com
on 24 Dec 2011 at 12:07
I am unable to reproduce this issue as well. Is this still an issue for you? I
suspect that this is not a widespread problem otherwise we would have seen many
more reports of this issue. Or perhaps most have moved on to newer versions.
Can you give gperftools-2.0 a try on your setup?
Original comment by chapp...@gmail.com
on 2 Mar 2012 at 7:15
On my Ubuntu 11.10 (32bit, but it appears to be running on 64bit hardware -
there's "lm" in flags in /proc/cpuinfo)
It also fails 9 testcases, though --enable-frame-pointers didn't seem to change
anything (i.e. still 9 test cases failing).
Original comment by d.kulin...@gmail.com
on 2 Mar 2012 at 7:29
Hi,
thanks for the follow up. I've tried gperftools-2.0 in Ubuntu 11.10 and it
built smoothly :-)
Best regards,
Carles
Original comment by carles.f...@gmail.com
on 4 Mar 2012 at 12:54
Hmmmm ... I just built gperftools on a freshly installed Ubuntu 11.10 and I am
seeing the same 'make check' results as d.kulinski. I am actually kind of
surprised that we haven't seen more noise on this issue. I'll look deeper into
the issue.
Original comment by chapp...@gmail.com
on 22 Apr 2012 at 1:41
So I also built 1.10, 1.9, and 1.8.3 agaisnt Ubuntu 11.10 and they all fail the
same unit tests. I also built the same packages and ran unit tests on a RedHat
machine (CentOS release 5.7) and they all passed. So this appears to be an
issue with something internally that has changed with Ubuntu 11.x. When I run
the heap profiler unit tests all of the profiles seem to be empty other than
the maps related context. So I suspect that it has something to do with hooks
not being overridden correctly. Unfortunately this also means that the heap
profiler and checker are not functional at all currently for Ubuntu 11.x users.
Original comment by chapp...@gmail.com
on 3 May 2012 at 2:43
Well... to answer the question why there was not as much noise on this. The
reason was that the binary packages could be installed on that version so as
long people were able to use it it wasn't much of an issue that it didn't
compile.
Original comment by derek4...@gmail.com
on 3 May 2012 at 6:56
I have found the underlying issue here. It looks like as of gcc 4.6
-fomit-frame-pointer is automatically enabled when optimizations like -O2 are
specified. To confirm you can run:
echo 'int main() {return 0;}' > test.c && gcc -v -Q -march=native -O2 test.c -o
test && rm test.c test | grep omit
I manually added -fno-omit-frame-pointer to the Makefile and did a clean build
and everything worked as expected. So it looks like the fix here is going to be
explicitly making the configure option --enable-frame-pointers the default and
have it apply to all relevant targets.
Original comment by chapp...@gmail.com
on 4 May 2012 at 5:44
Original comment by chapp...@gmail.com
on 4 May 2012 at 5:27
Original comment by chapp...@gmail.com
on 4 May 2012 at 5:39
this has now been committed to the main trunk and will be in the next release.
Original comment by chapp...@gmail.com
on 16 May 2012 at 1:29
Issue 407 has been merged into this issue.
Original comment by chapp...@gmail.com
on 11 Mar 2013 at 2:04
Original issue reported on code.google.com by
carles.f...@gmail.com
on 18 Dec 2011 at 6:05Attachments: