Bug 101271 - valgrind 2.2.0 fails to load debugging symbols on fedora core 3
Summary: valgrind 2.2.0 fails to load debugging symbols on fedora core 3
Status: RESOLVED DUPLICATE of bug 82301
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: 2.2.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-10 23:04 UTC by Eric Phipps
Modified: 2005-03-11 00:09 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Phipps 2005-03-10 23:04:24 UTC
Valgrind 2.2.0 fails to load debugging symbols for large executables on fedora
core 3 with the warning:

==20733== warning: mmap failed on
/home/etphipp/development/Charon_proj/Charon_src/alegra/bin/alegra_2D_charon_dbg_gnu3_revad_serial.x
==20733==          no symbols or debug info loaded

Below is the head of the output generated by "valgrind -v --tool=memcheck".  The
problem only seems to occur when run on large executables; I have run valgrind
on small executables on fedora core 3 without problem.  In this case the
executable size as reported by "ls -l" is 178903774.  

After snooping around in VG_(mmap) in vg_mylib.c.  I found VG_(find_map_space)
is returning 0 when trying to mmap the executable to read debugging symbols.  In
VG_(find_map_space), I found (limit - len) < ret, so VG_(find_map_space) is
returning 0.  In this case,

limit = 3220635647
len = 178913280
ret = 3086028800
limit-len = 3041722367

I don't understand the internals of valgrind enough to further investigate why
there is not enough space.  If there is any further information I can provide,
please let me know.

******valgrind output******
 [etphipp@wetterhorn 2elem.rf]$ valgrind -v --tool=memcheck
/home/etphipp/development/Charon_proj/Charon_src/alegra/bin/alegra_2D_charon_dbg_gnu3_revad_serial.x
2elem
==20733== Memcheck, a memory error detector for x86-linux.
==20733== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==20733== Using valgrind-2.2.0, a program supervision framework for x86-linux.
==20733== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==20733== Valgrind library directory: /usr/local/valgrind-2.2.0/lib/valgrind
==20733== Command line
==20733==   
/home/etphipp/development/Charon_proj/Charon_src/alegra/bin/alegra_2D_charon_dbg_gnu3_revad_serial.x
==20733==    2elem
==20733== Startup, with flags:
==20733==    -v
==20733==    --tool=memcheck
==20733== Contents of /proc/version:
==20733==   Linux version 2.6.10-1.770_FC3smp (bhcompile@porky.build.redhat.com)
(gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)) #1 SMP Thu Feb 24 14:20:06
EST 2005
==20733== Reading syms from
/home/etphipp/development/Charon_proj/Charon_src/alegra/bin/alegra_2D_charon_dbg_gnu3_revad_serial.x
(0x8048000)
==20733== warning: mmap failed on
/home/etphipp/development/Charon_proj/Charon_src/alegra/bin/alegra_2D_charon_dbg_gnu3_revad_serial.x
==20733==          no symbols or debug info loaded
==20733== Reading syms from /lib/ld-2.3.4.so (0x1B8E4000)
==20733==    object doesn't have any debug info
==20733== Reading syms from /usr/local/valgrind-2.2.0/lib/valgrind/stage2
(0xB0000000)
==20733== Reading syms from /lib/ld-2.3.4.so (0xB1000000)
==20733==    object doesn't have any debug info
==20733== Reading syms from
/usr/local/valgrind-2.2.0/lib/valgrind/vgskin_memcheck.so (0xB7C2F000)
==20733== Reading syms from /lib/tls/libc-2.3.4.so (0xB7E5C000)
==20733==    object doesn't have any debug info
==20733== Reading syms from /lib/libdl-2.3.4.so (0xB7F87000)
==20733==    object doesn't have any debug info
==20733== Reading suppressions file:
/usr/local/valgrind-2.2.0/lib/valgrind/default.supp
==20733== REDIRECT soname:libc.so.6(__GI___errno_location) to
soname:libpthread.so.0(__errno_location)
==20733== REDIRECT soname:libc.so.6(__errno_location) to
soname:libpthread.so.0(__errno_location)
==20733== REDIRECT soname:libc.so.6(__GI___h_errno_location) to
soname:libpthread.so.0(__h_errno_location)
==20733== REDIRECT soname:libc.so.6(__h_errno_location) to
soname:libpthread.so.0(__h_errno_location)
==20733== REDIRECT soname:libc.so.6(__GI___res_state) to
soname:libpthread.so.0(__res_state)
==20733== REDIRECT soname:libc.so.6(__res_state) to
soname:libpthread.so.0(__res_state)
==20733== REDIRECT soname:libc.so.6(stpcpy) to *vgpreload_memcheck.so*(stpcpy)
==20733== REDIRECT soname:libc.so.6(strnlen) to
*vgpreload_memcheck.so*(strnlen)==20733== REDIRECT soname:ld-linux.so.2(stpcpy)
to *vgpreload_memcheck.so*(stpcpy)
==20733== REDIRECT soname:ld-linux.so.2(strchr) to *vgpreload_memcheck.so*(strchr)
==20733==
==20733== Reading syms from /usr/local/valgrind-2.2.0/lib/valgrind/vg_inject.so
(0x1B8FC000)
==20733== Reading syms from
/usr/local/valgrind-2.2.0/lib/valgrind/vgpreload_memcheck.so (0x1B901000)
==20733== TRANSLATE: 0x1B8F5AE0 redirected to 0x1B904280
==20733== Reading syms from /usr/lib/libg2c.so.0.0.0 (0x1B924000)
==20733==    object doesn't have a symbol table
==20733==    object doesn't have any debug info
==20733== Reading syms from /usr/lib/libstdc++.so.5.0.7 (0x1B942000)
==20733==    object doesn't have a symbol table
==20733==    object doesn't have any debug info
==20733== Reading syms from /lib/tls/libm-2.3.4.so (0x987000)
==20733==    object doesn't have any debug info
==20733== Reading syms from /lib/libgcc_s-3.4.2-20041018.so.1 (0xBBA000)
==20733==    object doesn't have a symbol table
==20733==    object doesn't have any debug info
==20733== Reading syms from /lib/tls/libc-2.3.4.so (0x85B000)
==20733==    object doesn't have any debug info
Comment 1 Nicholas Nethercote 2005-03-11 00:08:21 UTC

*** This bug has been marked as a duplicate of 82301 ***
Comment 2 Nicholas Nethercote 2005-03-11 00:09:03 UTC
(Thanks for the very detailed bug report, by the way!)