|
From: Nicholas N. <n.n...@gm...> - 2009-08-04 22:24:50
|
[Resending; please respond to the list, not just to me personally. That's standard etiquette for mailing lists.] On Wed, Aug 5, 2009 at 7:31 AM, Ayan Chowdhury<ach...@vm...> wrote: > Please bear with my ignorance. I am really new to valgrind debugging. > > Did you want me to run the program with valgrind -d -v option and give you the output? OR you just valgrind -d -v output? I am pasting both below. Thanks a lot for looking at them. I meant: use your original command line, but with -v and -d added (after 'valgrind', but before the name of your program). Nick > If it is without the program: > ================================== > > [root@osdc-vimcpd005 bin]# ./valgrind -d -v > --23544:1:debuglog DebugLog system started by Stage 1, level 1 logging requested > --23544:1:launcher no tool requested, defaulting to 'memcheck' > --23544:1:launcher no client specified, defaulting platform to 'x86-linux' > --23544:1:launcher launching /root/valgrind341/lib/valgrind/x86-linux/memcheck > --23544:1:debuglog DebugLog system started by Stage 2 (main), level 1 logging requested > --23544:1:main Welcome to Valgrind version 3.4.1 debug logging > --23544:1:main Checking current stack is plausible > --23544:1:main Checking initial stack was noted > --23544:1:main Starting the address space manager > --23544:1:main Address space manager is running > --23544:1:main Starting the dynamic memory manager > --23544:1:mallocfr newSuperblock at 0x61FFF000 (pszB 4194288) owner VALGRIND/tool > --23544:1:main Dynamic memory manager is running > --23544:1:main Initialise m_debuginfo > --23544:1:main Getting stage1's name > --23544:1:main Get hardware capabilities ... > --23544:1:main ... arch = X86, hwcaps = x86-sse1-sse2 > --23544:1:main Getting the working directory at startup > --23544:1:main ... /root/valgrind341/bin > --23544:1:main Split up command line > --23544:1:main (early_) Process Valgrind's command line options > --23544:1:main Create initial image > --23544:1:initimg Loading client > valgrind: no program specified > > > With the program: > ================ > > ==23409== Memcheck, a memory error detector. > ==23409== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al. > ==23409== Using LibVEX rev 1884, a library for dynamic binary translation. > ==23409== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP. > ==23409== Using valgrind-3.4.1, a dynamic binary instrumentation framework. > ==23409== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al. > ==23409== > ==23409== My PID = 23409, parent PID = 23404. Prog and args are: > ==23409== /opt/vmware/aam/bin/ftAgent > ==23409== -d > ==23409== vmware > ==23409== about > ==23409== to > ==23409== execute: > ==23409== /root/valgrind341/bin/valgrind > ==23409== -d > ==23409== -v > ==23409== --trace-children=yes > ==23409== --track-fds=yes > ==23409== --log-file=/var/log/vmware/aam/valgrind.out.%p > ==23409== --leak-check=yes > ==23409== /opt/vmware/aam/bin/ftAgent > ==23409== -d > ==23409== vmware > ==23409== > --23409-- > --23409-- Command line > --23409-- /opt/vmware/aam/bin/ftAgent > --23409-- -d > --23409-- vmware > --23409-- about > --23409-- to > --23409-- execute: > --23409-- /root/valgrind341/bin/valgrind > --23409-- -d > --23409-- -v > --23409-- --trace-children=yes > --23409-- --track-fds=yes > --23409-- --log-file=/var/log/vmware/aam/valgrind.out.%p > --23409-- --leak-check=yes > --23409-- /opt/vmware/aam/bin/ftAgent > --23409-- -d > --23409-- vmware > --23409-- Startup, with flags: > --23409-- -d > --23409-- -v > --23409-- --trace-children=yes > --23409-- --track-fds=yes > --23409-- --log-file=/var/log/vmware/aam/valgrind.out.%p > --23409-- --leak-check=yes > --23409-- Contents of /proc/version: > --23409-- Linux version 2.4.21-57.ELvmnix (mt...@pa...) (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-14)) #1 Fri Mar 13 14:33:50 PDT 2009[VMnix version 153875] > --23409-- Arch and hwcaps: X86, x86-sse1-sse2 > --23409-- Page sizes: currently 4096, max supported 4096 > --23409-- Valgrind library directory: /root/valgrind341/lib/valgrind > --23409-- Reading syms from /lib/ld-2.3.2.so (0x4000000) > --23409-- Reading syms from /opt/vmware/aam/bin/ftAgent (0x8048000) > --23409-- object doesn't have a symbol table > --23409-- Reading syms from /root/valgrind341/lib/valgrind/x86-linux/memcheck (0x38000000) > --23409-- object doesn't have a dynamic symbol table > --23409-- Reading suppressions file: /root/valgrind341/lib/valgrind/default.supp > --23409-- REDIR: 0x4012140 (index) redirected to 0x38031193 (vgPlain_x86_linux_REDIR_FOR_index) > --23409-- Reading syms from /root/valgrind341/lib/valgrind/x86-linux/vgpreload_core.so (0x4017000) > --23409-- Reading syms from /root/valgrind341/lib/valgrind/x86-linux/vgpreload_memcheck.so (0x4019000) > ==23409== WARNING: new redirection conflicts with existing -- ignoring it > --23409-- new: 0x04012140 (index ) R-> 0x0401c8dc index > --23409-- REDIR: 0x40122e0 (strlen) redirected to 0x401cb00 (strlen) > --23409-- Reading syms from /opt/vmware/aam/lib/libramd_svr.so (0x4020000) > --23409-- Reading syms from /opt/vmware/aam/lib/libadm_ramd.so (0x404b000) > --23409-- Reading syms from /opt/vmware/aam/lib/libapm_ramd.so (0x4053000) > --23409-- Reading syms from /opt/vmware/aam/lib/libatm_ramd.so (0x4071000) > --23409-- Reading syms from /opt/vmware/aam/lib/libcm_ramd.so (0x4075000) > --23409-- Reading syms from /opt/vmware/aam/lib/libfdm_ramd.so (0x4080000) > --23409-- Reading syms from /opt/vmware/aam/lib/libim_ramd.so (0x4085000) > --23409-- Reading syms from /opt/vmware/aam/lib/libnm_ramd.so (0x4092000) > --23409-- Reading syms from /opt/vmware/aam/lib/librum_ramd.so (0x40a1000) > --23409-- Reading syms from /opt/vmware/aam/lib/librmgr_clt.so (0x40ac000) > --23409-- Reading syms from /opt/vmware/aam/lib/libsam_ramd.so (0x40af000) > --23409-- Reading syms from /opt/vmware/aam/lib/libsm_pxy.so (0x40c5000) > --23409-- Reading syms from /opt/vmware/aam/lib/libsm_clt.so (0x40c8000) > --23409-- Reading syms from /opt/vmware/aam/lib/libprocmon_clt.so (0x40ca000) > --23409-- Reading syms from /opt/vmware/aam/lib/libsec_ramd.so (0x40cd000) > --23409-- Reading syms from /opt/vmware/aam/lib/libem_ramd.so (0x40d5000) > --23409-- Reading syms from /opt/vmware/aam/lib/libem.so (0x40dc000) > --23409-- Reading syms from /opt/vmware/aam/lib/libupm_ramd.so (0x40e0000) > --23409-- Reading syms from /opt/vmware/aam/lib/libramd_pxy.so (0x40e8000) > --23409-- Reading syms from /opt/vmware/aam/lib/libramd_clt.so (0x4102000) > --23409-- Reading syms from /opt/vmware/aam/lib/libapm.so (0x411c000) > --23409-- Reading syms from /opt/vmware/aam/lib/libdbm_ramd.so (0x411f000) > --23409-- Reading syms from /opt/vmware/aam/lib/libencode.so (0x41b7000) > --23409-- Reading syms from /opt/vmware/aam/lib/libconsts.so (0x4210000) > --23409-- Reading syms from /opt/vmware/aam/lib/libcommon_ramd.so (0x4256000) > --23409-- Reading syms from /opt/vmware/aam/lib/libcommon.so (0x4274000) > --23409-- Reading syms from /opt/vmware/aam/lib/librc_tnet.so (0x4288000) > --23409-- Reading syms from /opt/vmware/aam/lib/libtrace.so (0x428b000) > --23409-- Reading syms from /lib/libnsl-2.3.2.so (0x42b2000) > --23409-- Reading syms from /lib/tls/libpthread-0.60.so (0x42c7000) > --23409-- Reading syms from /lib/libdl-2.3.2.so (0x42d7000) > --23409-- Reading syms from /opt/vmware/aam/lib/libvmkuser.so.0 (0x42da000) > --23409-- Reading syms from /lib/tls/libm-2.3.2.so (0x4338000) > --23409-- Reading syms from /lib/tls/libc-2.3.2.so (0x435a000) > --23409-- Reading syms from /lib/libgcc_s-3.2.3-20040701.so.1 (0x4494000) > --23409-- object doesn't have a symbol table > --23409-- REDIR: 0x43d3fd0 (memset) redirected to 0x401d5e4 (memset) > --23409-- REDIR: 0x43d2ad0 (rindex) redirected to 0x401c804 (rindex) > --23409-- REDIR: 0x43d27a0 (strlen) redirected to 0x401cae4 (strlen) > --23409-- REDIR: 0x43d2980 (strncmp) redirected to 0x401cd14 (strncmp) > --23409-- REDIR: 0x43d2a40 (strncpy) redirected to 0x401cbf0 (strncpy) > --23409-- REDIR: 0x43d1300 (strcat) redirected to 0x401c924 (strcat) > --23409-- REDIR: 0x43d4020 (mempcpy) redirected to 0x401d7e0 (mempcpy) > --23409-- REDIR: 0x43cb1f0 (free) redirected to 0x401b874 (free) > ==23409== > ==23409== FILE DESCRIPTORS: 4 open at exit. > ==23409== Open file descriptor 3: /var/log/vmware/aam/valgrind.out.23409 > ==23409== <inherited from parent> > ==23409== > ==23409== Open file descriptor 2: > ==23409== <inherited from parent> > ==23409== > ==23409== Open file descriptor 1: > ==23409== <inherited from parent> > ==23409== > ==23409== Open file descriptor 0: /dev/null > ==23409== <inherited from parent> > ==23409== > ==23409== > ==23409== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 83 from 1) > --23409-- > --23409-- supp: 83 Ubuntu-stripped-ld.so > ==23409== malloc/free: in use at exit: 0 bytes in 0 blocks. > ==23409== malloc/free: 0 allocs, 0 frees, 0 bytes allocated. > ==23409== > ==23409== All heap blocks were freed -- no leaks are possible. > --23409-- memcheck: sanity checks: 5 cheap, 2 expensive > --23409-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use > --23409-- memcheck: auxmaps_L1: 0 searches, 0 cmps, ratio 0:10 > --23409-- memcheck: auxmaps_L2: 0 searches, 0 nodes > --23409-- memcheck: SMs: n_issued = 32 (512k, 0M) > --23409-- memcheck: SMs: n_deissued = 0 (0k, 0M) > --23409-- memcheck: SMs: max_noaccess = 65535 (1048560k, 1023M) > --23409-- memcheck: SMs: max_undefined = 0 (0k, 0M) > --23409-- memcheck: SMs: max_defined = 59 (944k, 0M) > --23409-- memcheck: SMs: max_non_DSM = 32 (512k, 0M) > --23409-- memcheck: max sec V bit nodes: 1 (0k, 0M) > --23409-- memcheck: set_sec_vbits8 calls: 1 (new: 1, updates: 0) > --23409-- memcheck: max shadow mem size: 816k, 0M > --23409-- translate: fast SP updates identified: 3,321 ( 89.5%) > --23409-- translate: generic_known SP updates identified: 111 ( 2.9%) > --23409-- translate: generic_unknown SP updates identified: 275 ( 7.4%) > --23409-- tt/tc: 5,576 tt lookups requiring 5,682 probes > --23409-- tt/tc: 5,576 fast-cache updates, 3 flushes > --23409-- transtab: new 2,678 (53,537 -> 808,737; ratio 151:10) [0 scs] > --23409-- transtab: dumped 0 (0 -> ??) > --23409-- transtab: discarded 8 (193 -> ??) > --23409-- scheduler: 592,395 jumps (bb entries). > --23409-- scheduler: 5/3,245 major/minor sched events. > --23409-- sanity: 6 cheap, 2 expensive checks. > --23409-- exectx: 769 lists, 383 contexts (avg 0 per list) > --23409-- exectx: 508 searches, 219 full compares (431 per 1000) > --23409-- exectx: 0 cmp2, 192 cmp4, 0 cmpAll > --23409-- errormgr: 10 supplist searches, 12 comparisons during search > --23409-- errormgr: 83 errlist searches, 192 comparisons during search > > > > -----Original Message----- > From: Nicholas Nethercote [mailto:n.n...@gm...] > Sent: Monday, August 03, 2009 6:19 PM > To: Ayan Chowdhury > Cc: val...@li... > Subject: Re: [Valgrind-developers] A urgent help needed > > On Tue, Aug 4, 2009 at 6:50 AM, Ayan Chowdhury<ach...@vm...> wrote: >> Hi, >> >> I was trying to get my application up with valgrind. I was using the >> following valgrind options. >> >> "/root/valgrind341/bin/valgrind --trace-children=yes --track-fds=yes >> --log-file=/var/log/vmware/aam/valgrind.out.%p --leak-check=yes >> --show-reachable=yes --leak-resolution=high --num-callers=40 >> >> But getting the following error when getting the program running. >> >> >> valgrind: mmap(0x38000000, 1503232) failed in UME with error 22 >> (Invalid argument). >> valgrind: this can be caused by executables with very large text, data >> or bss segments. > > Does your program have a very large text, data or bss segment? Eg. > does it contain any very large static arrays? > > If you give the output of "valgrind -d -v" that would be helpful. > > Nick > |