Philip Martin wrote:
Blair Zajac blair@orcaware.com writes:
Is there an easy way that you found to run valgrind over
Subversion and it's test suite?
No, there isn't. For the python tests I use a shared build and edit
the libtool script subversion/clients/cmdline/svn changing the exec
line from
exec $program ${1+$@}
to
exec valgrind -q --trace-children=yes $program ${1+$@}
That's what I do too. Kind a pain.
To make life easier for myself and anybody else who wants to run
valgrind, I've attached a patch that modifies all of the libtool
wrapper shell scripts to run valgrind.
You need to apply the patch after running make.
Do you get simple errors like these? I'm on RedHat 8.0
% valgrind svn --version
==23319== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux.
==23319== Copyright (C) 2002, and GNU GPL'd, by Julian Seward.
==23319== Using valgrind-1.9.3, a program instrumentation system for x86-linux.
==23319== Copyright (C) 2000-2002, and GNU GPL'd, by Julian Seward.
==23319== Estimated CPU clock rate is 349 MHz
==23319== For more details, rerun with: -v
==23319==
==23319== pthread_mutex_unlock: mutex is not locked
==23319== at 0x4067FA0E: __pthread_mutex_unlock (vg_libpthread.c:986)
==23319== by 0x42062577: _IO_fclose@@GLIBC_2.1 (in /lib/i686/libc-2.2.93.so)
==23319== by 0x420EA7F8: nss_parse_file (in /lib/i686/libc-2.2.93.so)
==23319== by 0x420EA3C9: __GI___nss_database_lookup (in /lib/i686/libc-2.2.93.so)
==23319==
==23319== pthread_mutex_destroy: mutex is still in use
==23319== at 0x406851A9: __pthread_mutex_destroy (vg_libpthread.c:1000)
==23319== by 0x4207003B: _IO_default_finish_internal (in /lib/i686/libc-2.2.93.so)
==23319== by 0x4206DD6C: _IO_file_finish@@GLIBC_2.1 (in /lib/i686/libc-2.2.93.so)
==23319== by 0x420624EA: _IO_fclose@@GLIBC_2.1 (in /lib/i686/libc-2.2.93.so)
==23319==
==23319== pthread_mutex_unlock: mutex is not locked
==23319== at 0x4067FA0E: __pthread_mutex_unlock (vg_libpthread.c:986)
==23319== by 0x42062577: _IO_fclose@@GLIBC_2.1 (in /lib/i686/libc-2.2.93.so)
==23319== by 0x41FF8868: _nss_files_getpwuid_r (in /lib/libnss_files-2.2.93.so)
==23319== by 0x420ADB13: getpwuid_r@@GLIBC_2.1.2 (in /lib/i686/libc-2.2.93.so)
==23319==
==23319== pthread_mutex_unlock: mutex is not locked
==23319== at 0x4067FA0E: __pthread_mutex_unlock (vg_libpthread.c:986)
==23319== by 0x42062577: _IO_fclose@@GLIBC_2.1 (in /lib/i686/libc-2.2.93.so)
==23319== by 0x41FF863C: _nss_files_getpwnam_r (in /lib/libnss_files-2.2.93.so)
==23319== by 0x420AD943: getpwnam_r@@GLIBC_2.1.2 (in /lib/i686/libc-2.2.93.so)
svn, version 0.16.1 (dev build)
compiled Jan 14 2003, 11:44:13
Copyright (C) 2000-2003 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
The following repository access (RA) modules are available:
* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
- handles 'http' schema
- handles 'https' schema
* ra_local : Module for accessing a repository on local disk.
- handles 'file' schema
* ra_svn : Module for accessing a repository using the svn network protocol.
- handles 'svn' schema
==23319==
==23319== ERROR SUMMARY: 17 errors from 4 contexts (suppressed: 4 from 1)
==23319== malloc/free: in use at exit: 1684 bytes in 11 blocks.
==23319== malloc/free: 98 allocs, 87 frees, 65624 bytes allocated.
==23319== For a detailed leak analysis, rerun with: --leak-check=yes
==23319== For counts of detected errors, rerun with: -v
It's not too easy to debug when you have errors like these on
the most simple of commands.
Best,
Blair
--
Blair Zajac blair@orcaware.com
Plots of your system's performance - http://www.orcaware.com/orca/
diff -ru ../s.orig/subversion/clients/cmdline/svn ./subversion/clients/cmdline/svn
--- ../s.orig/subversion/clients/cmdline/svn 2003-01-21 16:00:18.000000000 -0800
+++ ./subversion/clients/cmdline/svn 2003-01-21 16:01:10.000000000 -0800
@@ -106,7 +106,7 @@
PATH=$progdir:$PATH
export PATH
- exec $program ${1+$@}
+ exec valgrind -q --trace-children=yes $program ${1+$@}
$echo $0: cannot exec $program ${1+$@}
exit 1
diff -ru ../s.orig/subversion/svnadmin/svnadmin ./subversion/svnadmin/svnadmin
--- ../s.orig/subversion/svnadmin/svnadmin 2003-01-21 16:00:20.000000000 -0800
+++ ./subversion/svnadmin/svnadmin 2003-01-21 16:01:30.000000000 -0800
@@ -106,7 +106,7 @@
PATH=$progdir:$PATH
export PATH
- exec $program ${1+$@}
+ exec valgrind -q --trace-children=yes $program ${1+$@}
$echo $0: cannot exec $program ${1+$@}
exit 1
diff -ru ../s.orig/subversion/svnlook/svnlook ./subversion/svnlook/svnlook
--- ../s.orig/subversion/svnlook/svnlook 2003-01-21 16:00:21.000000000 -0800
+++ ./subversion/svnlook/svnlook 2003-01-21 16:01:21.000000000 -0800
@@ -106,7 +106,7 @@
PATH=$progdir:$PATH
export PATH
- exec $program ${1+$@}
+ exec valgrind -q --trace-children=yes $program ${1+$@}
$echo $0: cannot exec $program ${1+$@}
exit 1
diff -ru ../s.orig/subversion/tests/libsvn_delta/random-test ./subversion/tests/libsvn_delta/random-test
--- ../s.orig/subversion/tests/libsvn_delta/random-test 2003-01-21 15:55:46.000000000 -0800
+++ ./subversion/tests/libsvn_delta/random-test 2003-01-21 16:33:54.000000000 -0800
@@ -106,7 +106,7 @@
PATH=$progdir:$PATH
export PATH
- exec $program ${1+$@}
+ exec valgrind -q --trace-children=yes $program ${1+$@}
$echo $0: cannot exec $program ${1+$@}
exit 1
diff -ru ../s.orig/subversion/tests/libsvn_subr/hashdump-test ./subversion/tests/libsvn_subr/hashdump-test
--- ../s.orig/subversion/tests/libsvn_subr/hashdump-test 2003-01-21 15:55:41.000000000 -0800
+++ ./subversion/tests/libsvn_subr/hashdump-test 2003-01-21 16:32:05.000000000 -0800
@@ -106,7 +106,7 @@
PATH=$progdir:$PATH
export PATH
- exec $program ${1+$@}
+ exec valgrind -q --trace-children=yes $program ${1+$@}
$echo $0: cannot exec $program ${1+$@}
exit 1
diff -ru ../s.orig/subversion/tests/libsvn_subr/path-test ./subversion/tests/libsvn_subr/path-test
--- ../s.orig/subversion/tests/libsvn_subr/path-test 2003-01-21 15:55:44.000000000 -0800
+++ ./subversion/tests/libsvn_subr/path-test 2003-01-21 16:34:00.000000000 -0800
@@ -106,7 +106,7 @@
PATH=$progdir:$PATH
export PATH
- exec $program ${1+$@}
+ exec valgrind -q --trace-children=yes $program ${1+$@}
$echo $0: cannot exec $program ${1+$@}
exit 1
diff -ru ../s.orig/subversion/tests/libsvn_subr/stream-test ./subversion/tests/libsvn_subr/stream-test
--- ../s.orig/subversion/tests/libsvn_subr/stream-test 2003-01-21 15:55:48.000000000 -0800
+++ ./subversion/tests/libsvn_subr/stream-test 2003-01-21 16:33:48.000000000 -0800
@@ -106,7 +106,7 @@
PATH=$progdir:$PATH
export PATH
- exec $program ${1+$@}
+ exec valgrind -q --trace-children=yes $program ${1+$@}
$echo $0: cannot exec $program ${1+$@}
exit 1
diff -ru ../s.orig/subversion/tests/libsvn_subr/stringtest ./subversion/tests/libsvn_subr/stringtest
--- ../s.orig/subversion/tests/libsvn_subr/stringtest 2003-01-21 15:55:49.000000000 -0800
+++ ./subversion/tests/libsvn_subr/stringtest 2003-01-21 16:33:43.000000000 -0800
@@ -106,7 +106,7 @@
PATH=$progdir:$PATH
export PATH
- exec $program ${1+$@}
+ exec valgrind -q --trace-children=yes $program ${1+$@}
$echo $0: cannot exec $program ${1+$@}
exit 1
diff -ru ../s.orig/subversion/tests/libsvn_subr/time-test ./subversion/tests/libsvn_subr/time-test
--- ../s.orig/subversion/tests/libsvn_subr/time-test 2003-01-21 15:55:53.000000000 -0800
+++ ./subversion/tests/libsvn_subr/time-test 2003-01-21 16:33:36.000000000 -0800
@@ -106,7 +106,7 @@
PATH=$progdir:$PATH
export PATH
- exec $program ${1+$@}
+ exec valgrind -q --trace-children=yes $program ${1+$@}
$echo $0: cannot exec $program ${1+$@}
exit 1
diff -ru ../s.orig/subversion/tests/libsvn_wc/translate-test ./subversion/tests/libsvn_wc/translate-test
--- ../s.orig/subversion/tests/libsvn_wc/translate-test 2003-01-21 15:55:56.000000000 -0800
+++ ./subversion/tests/libsvn_wc/translate-test 2003-01-21 16:33:27.000000000 -0800
@@ -106,7 +106,7 @@
PATH=$progdir:$PATH
export PATH
- exec $program ${1+$@}
+ exec valgrind -q --trace-children=yes $program ${1+$@}
$echo $0: cannot exec $program ${1+$@}
exit 1
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 14 02:05:43 2006