From 37368939f90560160232f59cfd4ccd58df0d5fcf Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 1 Oct 2012 13:37:47 -0700 Subject: [PATCH] ovs-ctl: Add support for glibc malloc debugging. Unlike valgrind, glibc's built-in features for malloc debugging are cheap enough that one can run with them enabled all the time, at least in test scenarios. Signed-off-by: Ben Pfaff Acked-by: Kyle Mestery --- utilities/ovs-ctl.8 | 12 +++++++++--- utilities/ovs-lib.in | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/utilities/ovs-ctl.8 b/utilities/ovs-ctl.8 index 22db06b2..8cbd3cf8 100644 --- a/utilities/ovs-ctl.8 +++ b/utilities/ovs-ctl.8 @@ -198,15 +198,21 @@ Run the daemon under \fBvalgrind\fR(1), if it is installed, logging to .IP "\fBstrace\fR" Run the daemon under \fBstrace\fR(1), if it is installed, logging to \fIdaemon\fB.strace.log.\fIpid\fR in the log directory. +. +.IP "\fBglibc\fR" +Enable GNU C library features designed to find memory errors. .RE . .IP By default, no wrapper is used. . .IP -Wrappers greatly slow daemon operations so they should not be used in -production. They also produce voluminous logs that can quickly fill -small disk partitions. +Each of the wrappers can expose bugs in Open vSwitch that lead to +incorrect operation, including crashes. The \fBvalgring\fR and +\fBstrace\fR wrappers greatly slow daemon operations so they should +not be used in production. They also produce voluminous logs that can +quickly fill small disk partitions. The \fBglibc\fR wrapper is less +resource-intensive but still somewhat slows the daemons. . .PP The following options control file locations. They should only be diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in index 01f4dedd..b787b1ce 100644 --- a/utilities/ovs-lib.in +++ b/utilities/ovs-lib.in @@ -140,6 +140,9 @@ start_daemon () { log_failure_msg "strace not installed, running $daemon without it" fi ;; + glibc) + set env MALLOC_CHECK_=2 MALLOC_PERTURB_=165 "$@" + ;; '') ;; *) -- 2.30.2