Closed GoogleCodeExporter closed 9 years ago
This is google-perfrools 1.6
Original comment by alkondratenko
on 29 Jan 2011 at 11:38
Futher details:
[root@rhel56 google-perftools-1.6]# LD_LIBRARY_PATH=/opt/test/lib
LD_PRELOAD=/opt/test/lib/libtcmalloc.so /bin/echo
Segmentation fault (core dumped)
[root@rhel56 google-perftools-1.6]# gdb /bin/echo /tmp/core.
core.18390 core.3745 core.3876 core.3876.log core.4193
[root@rhel56 google-perftools-1.6]# gdb /bin/echo /tmp/core.4193
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-32.el5)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /bin/echo...(no debugging symbols found)...done.
warning: core file may not match specified executable file.
Cannot access memory at address 0x540000003c
(gdb) q
[root@rhel56 google-perftools-1.6]# gdb /bin/echo /tmp/core.18390
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-32.el5)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /bin/echo...(no debugging symbols found)...done.
Reading symbols from /opt/test/lib/libtcmalloc.so...done.
Loaded symbols for /opt/test/lib/libtcmalloc.so
Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /usr/lib64/libstdc++.so.6...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib64/libstdc++.so.6
Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libgcc_s.so.1
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
warning: no loadable sections found in added symbol-file system-supplied DSO at
0x7fff00981000
Core was generated by `/bin/echo'.
Program terminated with signal 11, Segmentation fault.
#0 base::VDSOSupport::ElfMemImage::GetNumSymbols (this=0x7fff0082b660) at
src/base/vdso_support.cc:139
139 return hash_[1];
(gdb) p hash_
$1 = (const Elf64_Word *) 0xffffffffff700120
(gdb) p *hash_
Cannot access memory at address 0xffffffffff700120
(gdb) q
Original comment by alkondratenko
on 30 Jan 2011 at 12:20
Weird. I wonder if it's a security feature or something. Doesn't RHEL have
various security modules set by default?
I'll ask our local vdso expert to take a look and see if he can figure out
what's going on here. In the meantime, you can disable the vdso stuff by
changing the line
#if defined(__ELF__) && defined(__GLIBC__)
to
#if 0
in src/base/vdso_support.h
Hopefully that will get tcmalloc working for you again.
Alternately, you may find that using libtcmalloc_minimal works properly for you
(of course, you can't do heap-profiling or -checking in that case.)
Original comment by csilv...@gmail.com
on 1 Feb 2011 at 7:08
This is perftools-1.6, which does not have a fix for the RPATH in VDSO issue
http://code.google.com/p/chromium/issues/detail?id=63802
I suspect this is exact duplicate of the above chromium issue: hash_ has been
erroneously relocated.
Alexander,
Could you build perftools from SVN and verify this is fixed in the latest trunk?
If you can't, please dump your VDSO:
gdb any-64-bit-exe-with-symbols
break main
run
# breakpoint hit
info auxv
# note the address of AT_SYSINFO, e.g. 0x7fff00981000 (could be different on
every execution)
dump memory vdso64.so 0x7fff00981000 0x7fff00981000+4096
quit
and attach output from 'readelf --all vdso64.so' to this issue.
Thanks,
Original comment by ppluzhni...@google.com
on 1 Feb 2011 at 7:34
Latest svn code works fine. However I've already prepared two patches. First
disables GetCPU which is unused in current codebase. And seconds makes possible
to disable vdso usage via environment variable.
Original comment by alkondratenko
on 1 Feb 2011 at 3:43
Attachments:
Thanks for these patches. You're right GetCPU isn't used in perftools and we
could remove it. But given that the problem has been resolved another way, I
think I'll leave it in by now. (Maybe one day we can use it to make tcmalloc
better?)
I wish there was some way to say "just turn off vdso if it crashes", since
that's the only reason we wouldn't want to use it. I'd rather not put in an
envvar; I could make it a compile-time option, but it's rare enough (hopefully
non-existent, anymore) that it may make sense to just have folks edit it by
hand. I'll think about it.
Anyway, a new release should be out shortly, with a fix.
Original comment by csilv...@gmail.com
on 2 Feb 2011 at 12:20
Original comment by csilv...@gmail.com
on 3 Feb 2011 at 7:22
This should be fixed in perftools 1.7, just released.
Original comment by csilv...@gmail.com
on 5 Feb 2011 at 12:25
Original issue reported on code.google.com by
alkondratenko
on 29 Jan 2011 at 11:37