|
From: Léo . <nac...@ho...> - 2013-09-24 07:49:45
|
Hello,
I'm working on a project for my training period.My project works fine but i would track and fix eventual memory leak before using callgring for optimization.I already use valgrind on this project but since i add libiconv, valgrind seem not work anymore.
symptoms:Valgrind end processing but don't display any results on memory usage. But not display error too.
I'v try some ways to run valgrind:valgrind ./Runvalgrind -v ./Runvalgrind -v --leak-check=full ./Runvalgrind -v --leak-check=full --show-reachable=yes ./Runvalgrind -v --leak-check=full --show-reachable=yes --tool=memcheck ./RunBut i have always the folow result :postgre@debian:/media/sf_oxy$ valgrind -v -v -v ./Run==4551== Memcheck, a memory error detector==4551== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.==4551== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info==4551== Command: ./Run==4551== --4551-- Valgrind options:--4551-- --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp--4551-- -v--4551-- -v--4551-- -v--4551-- Contents of /proc/version:--4551-- Linux version 3.2.0-4-486 (deb...@li...) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 Debian 3.2.46-1+deb7u1--4551-- Arch and hwcaps: X86, x86-sse1-sse2--4551-- Page sizes: currently 4096, max supported 4096--4551-- Valgrind library directory: /usr/lib/valgrind--4551-- TT/TC: VG_(init_tt_tc) (startup of code management)--4551-- TT/TC: cache: 8 sectors of 27597024 bytes each = 220776192 total--4551-- TT/TC: table: 524168 total entries, max occupancy 340704 (65%)--4551-- Reading syms from /lib/i386-linux-gnu/ld-2.13.so (0x4000000)--4551-- svma 0x0000000820, avma 0x0004000820--4551-- Considering /lib/i386-linux-gnu/ld-2.13.so ..--4551-- .. CRC mismatch (computed 734636b7 wanted cf830bae)--4551-- Considering /usr/lib/debug/lib/i386-linux-gnu/ld-2.13.so ..--4551-- .. CRC is valid--4551-- summarise_context(loc_start = 0x60): cannot summarise(why=1): 0x69: [0]={ 48(r3) { u u u c-40 u u c-48 c-44 c-4 u u u u u u u u u u u }--4551-- summarise_context(loc_start = 0x69): cannot summarise(why=1): 0x6c: [0]={ 48(r3) { u u u c-40 u u u c-44 c-4 u u u u u u u u u u u }--4551-- summarise_context(loc_start = 0x6c): cannot summarise(why=1): 0x7b: [0]={ 48(r3) { u u u c-40 u u u u c-4 u u u u u u u u u u u }==4551== Adding active redirection:--4551-- new: 0x04016860 (index ) R-> (0000.0) 0x380552df ???==4551== Adding active redirection:--4551-- new: 0x04016a40 (strlen ) R-> (0000.0) 0x38055304 ???--4551-- Reading syms from /media/sf_oxy/Run (0x8048000)--4551-- svma 0x000804b390, avma 0x000804b390--4551-- summarise_context(loc_start = 0x4): cannot summarise(why=1): 0xb: [0]={ 0(r1) { u u u u u u u u c-4 u u u u u u u u u u u }--4551-- summarise_context(loc_start = 0xb): cannot summarise(why=1): 0xf: [0]={ 0(r1) { u u u u u ve{*((dwr5)+(0x0))} u u c-4 u u u u u u u u u u u }--4551-- summarise_context(loc_start = 0x9ad): cannot summarise(why=1): 0x9ae: [0]={ 0(r1) { u u u ve{*((dwr5)+(0xfffffffc))} u ve{*((dwr5)+(0x0))} u u c-4 u u u u u u u u u u u }--4551-- summarise_context(loc_start = 0x9ae): cannot summarise(why=1): 0x9af: [0]={ 0(r1) { u u u u u ve{*((dwr5)+(0x0))} u u c-4 u u u u u u u u u u u }--4551-- summarise_context(loc_start = 0x9af): cannot summarise(why=1): 0x9b2: [0]={ 0(r1) { u u u u u u u u c-4 u u u u u u u u u u u }--4551-- Reading syms from /usr/lib/valgrind/memcheck-x86-linux (0x38000000)--4551-- svma 0x0038000000, avma 0x0038000000--4551-- Considering /usr/lib/valgrind/memcheck-x86-linux ..--4551-- .. CRC mismatch (computed f9c53117 wanted 8a91a8b2)--4551-- Considering /usr/lib/debug/usr/lib/valgrind/memcheck-x86-linux ..--4551-- .. CRC is valid--4551-- object doesn't have a dynamic symbol table--4551-- summarise_context(loc_start = 0x5): cannot summarise(why=1): 0xc: [0]={ 0(r7) { u u u u u u u c-8 c-4 u u u u u u u u u u u }--4551-- summarise_context(loc_start = 0xc): cannot summarise(why=1): 0xf: [0]={ 0(r7) { u u u u u ve{*((dwr5)+(0x0))} u c-8 c-4 u u u u u u u u u u u }--4551-- summarise_context(loc_start = 0x5): cannot summarise(why=1): 0xc: [0]={ 0(r7) { u u u u u u u c-8 c-4 u u u u u u u u u u u }--4551-- summarise_context(loc_start = 0xc): cannot summarise(why=1): 0xf: [0]={ 0(r7) { u u u u u ve{*((dwr5)+(0x0))} u c-8 c-4 u u u u u u u u u u u }--4551-- summarise_context(loc_start = 0x1c6): cannot summarise(why=1): 0x1c7: [0]={ {*((dwr5)+(0xfffffffc))} { u u u ve{*((dwr5)+(0xfffffff4))} u ve{*((dwr5)+(0x0))} ve{*((dwr5)+(0xfffffff8))} c-8 c-4 u u u u u u u u u u u } [1]={ 0(r7) { u u u u u ve{*((dwr5)+(0x0))} u u c-4 u u u u u u u u u u u }--4551-- summarise_context(loc_start = 0x1c7): cannot summarise(why=1): 0x1ca: [0]={ {*((dwr5)+(0xfffffffc))} { u u u ve{*((dwr5)+(0xfffffff4))} u ve{*((dwr5)+(0x0))} ve{*((dwr5)+(0xfffffff8))} c-8 c-4 u u u u u u u u u u u } [1]={ 0(r7) { u u u u u u u u c-4 u u u u u u u u u u u }--4551-- Reading suppressions file: /usr/lib/valgrind/debian-libc6-dbg.supp--4551-- Reading suppressions file: /usr/lib/valgrind/default.supp==4551== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-4551-by-postgre-on-???==4551== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-4551-by-postgre-on-???==4551== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-4551-by-postgre-on-???==4551== ==4551== TO CONTROL THIS PROCESS USING vgdb (which you probably==4551== don't want to do, unless you know exactly what you're doing,==4551== or are doing some strange experiment):==4551== /usr/lib/valgrind/../../bin/vgdb --pid=4551 ...command...==4551== ==4551== TO DEBUG THIS PROCESS USING GDB: start GDB like this==4551== /path/to/gdb ./Run==4551== and then give GDB the following command==4551== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=4551==4551== --pid is optional if only one valgrind process is running==4551== --4551-- TT/TC: initialise sector 0--4551-- REDIR: 0x4016a40 (strlen) redirected to 0x38055304 (vgPlain_x86_linux_REDIR_FOR_strlen)--4551-- REDIR: 0x4016860 (index) redirected to 0x380552df (vgPlain_x86_linux_REDIR_FOR_index)--4551-- Reading syms from /usr/lib/valgrind/vgpreload_core-x86-linux.so (0x4021000)--4551-- svma 0x0000000430, avma 0x0004021430--4551-- Considering /usr/lib/valgrind/vgpreload_core-x86-linux.so ..--4551-- .. CRC mismatch (computed bbadfadd wanted 39de28c9)--4551-- Considering /usr/lib/debug/usr/lib/valgrind/vgpreload_core-x86-linux.so ..--4551-- .. CRC is valid--4551-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so (0x4024000)--4551-- svma 0x0000002200, avma 0x0004026200--4551-- Considering /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so ..--4551-- .. CRC mismatch (computed 9b401e29 wanted 9e97adf8)--4551-- Considering /usr/lib/debug/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so ..--4551-- .. CRC is valid==4551== Adding active redirection:--4551-- new: 0x04016eb0 (stpcpy ) R-> (2020.0) 0x0402aa00 stpcpy--4551-- Reading syms from /usr/lib/libpq.so.5.6 (0x4047000)--4551-- svma 0x0000006310, avma 0x000404d310--4551-- Considering /usr/lib/libpq.so.5.6 ..--4551-- .. CRC mismatch (computed 9900f0af wanted fdb01b3e)--4551-- object doesn't have a symbol table--4551-- Reading syms from /usr/local/lib/libiconv.so.2.5.1 (0x4073000)--4551-- svma 0x00000012c0, avma 0x00040742c0--4551-- Reading syms from /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17 (0x4155000)--4551-- svma 0x000004b040, avma 0x00041a0040--4551-- Considering /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17 ..--4551-- .. CRC mismatch (computed c3328608 wanted 737126b2)--4551-- Considering /usr/lib/debug/usr/lib/i386-linux-gnu/libstdc++.so.6.0.17 ..--4551-- .. CRC is valid==4551== Adding active redirection:--4551-- new: 0x041a24a0 (operator delete(void) R-> (1005.0) 0x04027130 operator delete(void*)==4551== Adding active redirection:--4551-- new: 0x041a24d0 (operator delete(void) R-> (1005.0) 0x04026fd0 operator delete(void*, std::nothrow_t const&)==4551== Adding active redirection:--4551-- new: 0x041a24f0 (operator delete[](vo) R-> (1005.0) 0x04026d10 operator delete[](void*)==4551== Adding active redirection:--4551-- new: 0x041a2510 (operator delete[](vo) R-> (1005.0) 0x04026bb0 operator delete[](void*, std::nothrow_t const&)==4551== Adding active redirection:--4551-- new: 0x041a4790 (operator new(unsigne) R-> (1003.0) 0x04027df0 operator new(unsigned int)==4551== Adding active redirection:--4551-- new: 0x041a4820 (operator new(unsigne) R-> (1001.0) 0x04027c30 operator new(unsigned int, std::nothrow_t const&)==4551== Adding active redirection:--4551-- new: 0x041a48a0 (operator new[](unsig) R-> (1003.0) 0x04027890 operator new[](unsigned int)==4551== Adding active redirection:--4551-- new: 0x041a48e0 (operator new[](unsig) R-> (1001.0) 0x040276d0 operator new[](unsigned int, std::nothrow_t const&)[...] Some CRC pass some other fail--4551-- svma 0x0000000750, avma 0x0004989750--4551-- object doesn't have a symbol table--4551-- REDIR: 0x4316ab0 (strcmp) redirected to 0x40215c0 (_vgnU_ifunc_wrapper)==4551== Adding active redirection:[...]--4551-- REDIR: 0x43b6990 (__memcpy_chk_ssse3) redirected to 0x402b1f0 (__memcpy_chk)NOTICE: la relation « adres » existe déjà, poursuite du traitement--4551-- REDIR: 0x4317330 (strncpy) redirected to 0x4028c20 (strncpy)Create SQL Structure : 1sRun processingData : 0sProcessus arrêtépostgre@debian:/media/sf_oxy$
(A can past you the full version if need)As you ca see the process end without any error nor results, and i don't know why. Do you have any idea or track to solve this issue
some more information on the project:Build options :g++ \-W -Wall -Wextra -pedantic -ansi -std=c++11 \-o Run \-g -O0 \[MycppFiles] \-pthread \-lpq -I /usr/local/pgsql/lib/ \-liconv -I /usr/local/lib/ \-I /usr/include/postgresql
Libs used :postgre@debian:/media/sf_oxy$ ldd Runlinux-gate.so.1 => (0xb7730000)libpq.so.5 => /usr/lib/libpq.so.5 (0xb76ec000)libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0xb760a000)libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb751d000)libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xb74f7000)libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb74da000)libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xb74c1000)libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xb735e000)libssl.so.1.0.0 => /usr/lib/i386-linux-gnu/i686/cmov/libssl.so.1.0.0 (0xb7305000)libcrypto.so.1.0.0 => /usr/lib/i386-linux-gnu/i686/cmov/libcrypto.so.1.0.0 (0xb7146000)libkrb5.so.3 => /usr/lib/i386-linux-gnu/libkrb5.so.3 (0xb7074000)libcom_err.so.2 => /lib/i386-linux-gnu/libcom_err.so.2 (0xb706f000)libgssapi_krb5.so.2 => /usr/lib/i386-linux-gnu/libgssapi_krb5.so.2 (0xb7031000)libldap_r-2.4.so.2 => /usr/lib/i386-linux-gnu/libldap_r-2.4.so.2 (0xb6fde000)/lib/ld-linux.so.2 (0xb7731000)libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xb6fda000)libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb6fc1000)libk5crypto.so.3 => /usr/lib/i386-linux-gnu/libk5crypto.so.3 (0xb6f97000)libkrb5support.so.0 => /usr/lib/i386-linux-gnu/libkrb5support.so.0 (0xb6f8e000)libkeyutils.so.1 => /lib/i386-linux-gnu/libkeyutils.so.1 (0xb6f88000)libresolv.so.2 => /lib/i386-linux-gnu/i686/cmov/libresolv.so.2 (0xb6f74000)liblber-2.4.so.2 => /usr/lib/i386-linux-gnu/liblber-2.4.so.2 (0xb6f65000)libsasl2.so.2 => /usr/lib/i386-linux-gnu/libsasl2.so.2 (0xb6f49000)libgnutls.so.26 => /usr/lib/i386-linux-gnu/libgnutls.so.26 (0xb6e80000)libgcrypt.so.11 => /lib/i386-linux-gnu/libgcrypt.so.11 (0xb6dfa000)libtasn1.so.3 => /usr/lib/i386-linux-gnu/libtasn1.so.3 (0xb6de8000)libp11-kit.so.0 => /usr/lib/i386-linux-gnu/libp11-kit.so.0 (0xb6dd6000)libgpg-error.so.0 => /lib/i386-linux-gnu/libgpg-error.so.0 (0xb6dd2000)
Output when i run ./Runpostgre@debian:/media/sf_oxy$ ./RunConstructeur : 1sNOTICE: la relation « adres » existe déjà, poursuite du traitementCreate SQL Structure : 0sRun processingData : 0swait end processing : 129sTemps d'execution total : 130 Appuyez sur une touche pour continuer...
Thank you in advance for you help.
|