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 <blp@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
.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 "\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
.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
.
.PP
The following options control file locations. They should only be
log_failure_msg "strace not installed, running $daemon without it"
fi
;;
log_failure_msg "strace not installed, running $daemon without it"
fi
;;
+ glibc)
+ set env MALLOC_CHECK_=2 MALLOC_PERTURB_=165 "$@"
+ ;;