[httperf] University Engineering Team Plans for 0.8.1 and beyond
Mark Nottingham
mnot at yahoo-inc.com
Wed Mar 28 16:54:57 PST 2007
Any updates on 0.81 or 0.9? It would be *really* nice to see these
out in the world...
On 2006/12/08, at 7:39 AM, Ted Bullock wrote:
> As you may have noticed, our team has sent out a number of patches to
> httperf recently.
>
> They are all attached and include the following:
> patch-httperf-0.8-compiler_warnings-2.patch
> patch-httperf-0.8-configure_fixed.patch
> patch-httperf-0.8-content-length-fix-1.patch
> patch-httperf-0.8-host_header.patch
> patch-httperf-0.8-persistent-connections-1.patch
> patch-httperf-0.8-ssl_writev-alloca-fix-robust.patch
> patch-httperf-0.8-timer-reset-1.patch
> patch-httperf-0.8-wsesslog_crash.patch
>
> These patches are all bug fixes of one type or another. The
> descriptions of each are available in the patch files themselves. Note
> that at this time we have not included a fix to the maximum File
> Descriptor problem as we are not satisfied with the current
> implementation of the solution.
>
> Our intention is to have these changes above become a bug fix 0.8.1
> release pending some additional testing and also approval from HP
> (Martin).
>
> The following patches have been verified by our team and we feel no
> changes need to be made to these:
> patch-httperf-0.8-compiler_warnings-2.patch
> patch-httperf-0.8-configure_fixed.patch
> patch-httperf-0.8-host_header.patch
> patch-httperf-0.8-ssl_writev-alloca-fix-robust.patch
>
> The following patches have not been directly verified by our team, but
> have been used in the community and we feel that they are
> acceptable as
> they stand since no complaints have arisen against them:
> patch-httperf-0.8-wsesslog_crash.patch
> patch-httperf-0.8-persistent-connections-1.patch
>
> The following patches need to be reviewed and tested by our team
> and the
> community:
> patch-httperf-0.8-content-length-fix-1.patch
> patch-httperf-0.8-timer-reset-1.patch
>
> Hopefully we can ensure that everything is satisfactory and submit
> these
> for a bug fix release 0.8.1 (including updates to change log and other
> relevant documentation). However, note that there are no proposed
> changes to cross platform usability in this release. Platforms that
> are
> currently working should continue to work after these changes, but no
> new platforms will be introduced.
>
>
> Following this, we are working at refactoring the old autotool build
> system scipts to improve cross platform compatibility. This includes
> writing the currently absent Makefile.am automake files and re-writing
> the configure.ac file to handle other platforms by default.
> Already we
> have a working patch (re-write) that allows out of the box compilation
> on the OpenBSD and Linux platforms (and likely Mac OS X and FreeBSD as
> well).
>
> -Ted
>
> # patch-httperf-0.8-compiler_warnings-2.patch
> # 2006/11/26 Ted Bullock <tbullock at canada.com>
> #
> # Fixes a couple of compiler warnings in core.c and wsesslog.c
> #
> # This patch is supposed to not introduce any new functionality
> # or change the program logic, just removed compiler warnings
> #
> # Apply with
> # tar xzf httperf-0.8.tar.gz
> # cd httperf-0.8
> # patch -p1 < ../patch-httperf-0.8-compiler_warnings-2.patch
> #
>
> #
> # gcc 4.1 complains about target pointer signedness problems
> # fix this by redefining variables with correct typedef types
> #
> diff -Naur httperf-0.8/core.c httperf/core.c
> --- httperf-0.8/core.c 2000-10-31 16:57:50.000000000 -0700
> +++ httperf/core.c 2006-11-26 02:41:26.000000000 -0700
> @@ -349,7 +349,8 @@
> static void
> do_send (Conn *conn)
> {
> - int async_errno, len;
> + int async_errno;
> + socklen_t len;
> struct iovec *iovp;
> int sd = conn->sd;
> ssize_t nsent = 0;
> @@ -768,7 +769,8 @@
> int
> core_connect (Conn *s)
> {
> - int sd, result, len, async_errno;
> + int sd, result, async_errno;
> + socklen_t len;
> struct sockaddr_in *sin;
> struct linger linger;
> int myport, optval;
> #
> # gcc 2.95.3 complains about TRUE and FALSE already being defined
> # fix this with a little bit of preprocessor conditionals
> #
> diff -ur httperf-0.8/gen/wsesslog.c httperf/gen/wsesslog.c
> --- httperf-0.8/gen/wsesslog.c 2000-10-11 17:40:46.000000000 -0600
> +++ httperf/gen/wsesslog.c 2006-11-26 18:48:51.000000000 -0700
> @@ -82,8 +82,12 @@
> file. */
> #define MAX_SESSION_TEMPLATES 1000
>
> +#ifndef TRUE
> #define TRUE (1)
> +#endif
> +#ifndef FALSE
> #define FALSE (0)
> +#endif
>
> #define SESS_PRIVATE_DATA(c) \
> ((Sess_Private_Data *) ((char *)(c) + sess_private_data_offset))
> # eof patch-httperf-0.8-compiler_warnings-2.patch
> # patch-httperf-0.8-configure_fixed.patch
> # 2000/11/05 Durval Menezes <durval at tmp.com.br>
> #
> # Fixes a problem with the "configure" setup where the "--prefix="
> # option wasn't being obeyed for the binary files
> #
> # Apply with
> # tar xzf httperf-0.8.tar.gz
> # cd httperf-0.8
> # patch -p1 < ../patch-httperf-0.8-configure_fixed.patch
> #
>
> diff -ru httperf-0.8/Makefile.in httperf-0.8-configure_fixed/
> Makefile.in
> --- httperf-0.8/Makefile.in Thu Oct 19 05:38:59 2000
> +++ httperf/Makefile.in Sun Nov 5 01:09:18 2000
> @@ -6,6 +6,7 @@
> top_builddir = .
>
> prefix = @prefix@
> +exec_prefix = @exec_prefix@
> bindir = @bindir@
> mandir = @mandir@
>
> #eof patch-httperf-0.8-configure_fixed.patch
> # patch-httperf-0.8-content-length-fix-1.patch
> # December 7, 2006 Tai Jin
> #
> # There's a bug in httperf with zero-length content.
> # The fix is to check for zero length in http.c in parse_header()
> # at line 225:
> #
> # Apply with
> # tar xzf httperf-0.8.tar.gz
> # cd httperf-0.8
> # patch -p1 < ../patch-httperf-0.8-content-length-fix-1.patch
> #
>
> diff -Naur httperf-0.8/http.c httperf/http.c
> --- httperf-0.8/http.c 2000-10-11 17:35:03.000000000 -0600
> +++ httperf/http.c 2006-12-07 01:45:14.000000000 -0700
> @@ -223,6 +223,8 @@
> {
> hdr += 15;
> s->content_length = strtoul (hdr, 0, 10);
> + if (!s->content_length)
> + s->has_body = 0;
> }
> break;
>
> #eof patch-httperf-0.8-content-length-fix-1.patch
> # patch-httperf-0.8-host_header.patch
> # 2004/01/12 Martin Arlitt
> #
> # Changes "conn->hostname" to "conn->fqdname" on line 973 of core.c,
> # and "conn->hostname_len" to "conn->fqdname_len" on line 974
> #
> # Apply with
> # tar xzf httperf-0.8.tar.gz
> # cd httperf-0.8
> # patch -p1 < ../patch-httperf-0.8-host_header.patch
> #
>
> --- httperf-0.8/core.c 2000-10-31 16:57:50.000000000 -0700
> +++ httperf/core.c 2006-11-24 18:59:17.000000000 -0700
> @@ -970,8 +970,8 @@
> else if (!call->req.iov[IE_HOST].iov_base)
> {
> /* Default call's hostname to connection's hostname: */
> - call->req.iov[IE_HOST].iov_base = (caddr_t) conn->hostname;
> - call->req.iov[IE_HOST].iov_len = conn->hostname_len;
> + call->req.iov[IE_HOST].iov_base = (caddr_t) conn->fqdname;
> + call->req.iov[IE_HOST].iov_len = conn->fqdname_len;
> }
>
> /* NOTE: the protocol version indicates what the _client_ can
>
> #eof patch-httperf-0.8-host_header.patch
> # patch-httperf-0.8-persistent-connections-1.patch
> # December 7, 2006 Ted Bullock <tbullock at canada.com>
> #
> # From discussion with Mark Nottingham on the mailing list:
> # http://www.hpl.hp.com/hosted/linux/mail-archives/httperf/2006-
> November/000317.html
> #
> # To allow persistent connections with HTTP/1.0 servers (e.g.,
> # Squid), Connection: keep-alive needs to be added to requests; e.g.,
> # core.c:70 static char http10req[] = " HTTP/1.0\r\nUser-Agent:
> # httperf/"VERSION"\r\nConnection: keep-alive\r\nHost: ";
> #
> # Apply with
> # tar xzf httperf-0.8.tar.gz
> # cd httperf-0.8
> # patch -p1 < ../patch-httperf-0.8-persistent-connections-1.patch
> #
>
> diff -Naur httperf-0.8/core.c httperf/core.c
> --- httperf-0.8/core.c 2000-10-31 16:57:50.000000000 -0700
> +++ httperf/core.c 2006-12-07 01:22:07.000000000 -0700
> @@ -68,12 +68,14 @@
> static u_long port_free_map[((MAX_IP_PORT - MIN_IP_PORT +
> BITSPERLONG)
> / BITSPERLONG)];
> static char http10req[] =
> - " HTTP/1.0\r\nUser-Agent: httperf/"VERSION"\r\nHost: ";
> + " HTTP/1.0\r\nUser-Agent: httperf/"VERSION \
> + "\r\nConnection: keep-alive\r\nHost: ";
> static char http11req[] =
> " HTTP/1.1\r\nUser-Agent: httperf/"VERSION"\r\nHost: ";
>
> static char http10req_nohost[] =
> - " HTTP/1.0\r\nUser-Agent: httperf/"VERSION"\r\n";
> + " HTTP/1.0\r\nUser-Agent: httperf/"VERSION \
> + "\r\nConnection: keep-alive\r\n";
> static char http11req_nohost[] =
> " HTTP/1.1\r\nUser-Agent: httperf/"VERSION"\r\n";
>
> #eof patch-httperf-0.8-persistent-connections-1.patch
> # patch-httperf-0.8-ssl_writev-alloca-fix-robust.patch
> # December 6, 2006 Ted Bullock
> #
> # Robust way to handle the header file that defines the alloca
> # function (alloca.h for linux) and (stdlib.h for *BSD)
> #
> # Apply with
> # tar xzf httperf-0.8.tar.gz
> # cd httperf-0.8
> # patch -p1 < ../patch-httperf-0.8-ssl_writev-alloca-fix.patch
> #
>
> diff -Naur httperf-0.8/lib/ssl_writev.c httperf/lib/ssl_writev.c
> --- httperf-0.8/lib/ssl_writev.c 2000-10-11 18:09:47.000000000 -0600
> +++ httperf/lib/ssl_writev.c 2006-12-05 22:18:06.000000000 -0700
> @@ -31,7 +31,24 @@
>
> #ifdef HAVE_OPENSSL_SSL_H
>
> -#include <alloca.h>
> +/* AIX requires this to be the first thing in the file. */
> +#ifndef __GNUC__
> +# if HAVE_ALLOCA_H
> +# include <alloca.h>
> +# else
> +# ifdef _AIX
> +#pragma alloca
> +# else
> +# ifndef alloca /* predefined by HP cc +Olibcalls */
> +char *alloca ();
> +# endif
> +# endif
> +# endif
> +#else
> +/* stdlib.h provides the alloca functionality. */
> +#include <stdlib.h>
> +#endif
> +
> #include <string.h>
>
> #include <sys/types.h>
>
> # patch-httperf-0.8-timer-reset-1.patch
> # 2006/11/24 Martin Arlitt <arlitt at granite.hpl.hp.com>
> #
> # From discussion on the mailing list:
> # http://www.hpl.hp.com/hosted/linux/mail-archives/httperf/2006-
> November/000321.html
> #
> # Fixes a discrepancy between the data produced by httperf and
> # the documentation in regards to timing.
> #
> # Apply with
> # tar xzf httperf-0.8.tar.gz
> # cd httperf-0.8
> # patch -p1 < ../patch-httperf-0.8-timer-reset-1.patch
> #
>
> diff -Naur httperf-0.8/core.c httperf/core.c
> --- httperf-0.8/core.c 2000-10-31 16:57:50.000000000 -0700
> +++ httperf/core.c 2006-11-24 02:04:06.000000000 -0700
> @@ -578,6 +578,14 @@
> {
> c = s->recvq;
> assert (c);
> + /* sets right start time, but doesn't update each packet */
> + if(s->state == S_REPLY_STATUS)
> + {
> + c->timeout = param.timeout + param.think_timeout;
> + if (c->timeout > 0.0)
> + c->timeout += timer_now ();
> + }
> +
> http_process_reply_bytes (c, &cp, &buf_len);
> if (s->state == S_REPLY_DONE)
> {
> # eof patch-httperf-0.8-timer-reset-1.patch
> # patch-httperf-0.8-wsesslog_crash.patch
> # 2001/01/09 Martin Arlitt
> #
> # Fixes a problem with the wsesslog crashing httperf due to an
> # unhandled session failure
> #
> # Apply with
> # tar xzf httperf-0.8.tar.gz
> # cd httperf-0.8
> # patch -p1 < ../patch-httperf-0.8-wsesslog_crash.patch
> #
>
> diff -urN httperf-0.8/gen/wsesslog.c httperf/httperf-0.8/gen/
> wsesslog.c
> --- httperf-0.8/gen/wsesslog.c.original Wed Oct 11 16:40:46 2000
> +++ httperf/gen/wsesslog.c Tue Jan 9 09:47:34 2001
> @@ -312,6 +312,9 @@
> sess = session_get_sess_from_call (call);
> priv = SESS_PRIVATE_DATA (sess);
>
> + if (sess->failed)
> + return;
> +
> ++priv->num_calls_destroyed;
>
> if (priv->num_calls_destroyed >= priv->total_num_reqs)
>
> #eof patch-httperf-0.8-wsesslog_crash.patch
> <httperf-0.8.1-candidate-1.tar.gz>
> _______________________________________________
> httperf mailing list
> httperf at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/httperf/
--
Mark Nottingham mnot at yahoo-inc.com
More information about the httperf
mailing list