Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 93E4118BB9 for ; Thu, 24 Sep 2015 22:22:20 +0000 (UTC) Received: (qmail 66383 invoked by uid 500); 24 Sep 2015 22:22:20 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 66297 invoked by uid 500); 24 Sep 2015 22:22:20 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 66284 invoked by uid 99); 24 Sep 2015 22:22:20 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Sep 2015 22:22:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 97E141A078D for ; Thu, 24 Sep 2015 22:22:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.698 X-Spam-Level: X-Spam-Status: No, score=0.698 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id g3TUGpiCxS68 for ; Thu, 24 Sep 2015 22:22:18 +0000 (UTC) Received: from mail-io0-f182.google.com (mail-io0-f182.google.com [209.85.223.182]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id E8CFD253FE for ; Thu, 24 Sep 2015 22:22:17 +0000 (UTC) Received: by iofb144 with SMTP id b144so93067433iof.1 for ; Thu, 24 Sep 2015 15:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=pmZjb/1KgmN0APHxUAOcbtVJdUE3Yw4XTJZR2qp/mgI=; b=wm5Jg6jVUgbW+EN6QU8/RevYgMP8EzsnJb4wJQ/IEN+SfkWtav5UvNU+AQqQ4YnRXa d+Zr+eEDBsWQDNhCJwRCbrdNhObShtDUgcOl0Rmo0BfyB08xUc0GNzS4Vsc5IpBBluvA mS3kErXhFQqGmW22cGcOFrqwhCbInAXZOrFpvKZegv/BSNZTxyBQIiO7UkpCerGzI+si vnrbnzi6TtBLgrTcViydDigN93YKqQXEY0ETlHYoQByRLmplFYde78xJrOX0pmkz4PVz KlWROktZETnLSh8aaPcERSxZMYQaEUkBZGilvfhsGgqoAjd4TZzmL0LHbflJC4Tr5jrl m6iA== MIME-Version: 1.0 X-Received: by 10.107.134.220 with SMTP id q89mr3322967ioi.90.1443133336962; Thu, 24 Sep 2015 15:22:16 -0700 (PDT) Received: by 10.64.25.3 with HTTP; Thu, 24 Sep 2015 15:22:16 -0700 (PDT) In-Reply-To: References: Date: Thu, 24 Sep 2015 18:22:16 -0400 Message-ID: Subject: Re: logio problem with SSL From: Eric Covener To: Apache HTTP Server Development List Content-Type: text/plain; charset=UTF-8 On Thu, Sep 24, 2015 at 5:13 PM, Yann Ylavic wrote: > On Thu, Sep 24, 2015 at 10:22 PM, Eric Covener wrote: >> On Thu, Sep 24, 2015 at 2:07 PM, Eric Covener wrote: >>> First pass at removing having that stuff live in conn_rec by a filter >>> that removes itself the first time it's called: >>> >>> http://people.apache.org/~covener/patches/logio-filter.c >>> >>> Does not affect the status quo ordering problem where we might log a >>> transaction, then see the first bytes of the response go out. >>> >>> On Thu, Sep 24, 2015 at 1:50 PM, Eric Covener wrote: >>>> On Thu, Sep 24, 2015 at 1:04 PM, Yann Ylavic wrote: >>>>> And likewise cf->r = NULL in the logio_transaction() of the >>>>> queued/destroyed request may kill the cfg->r set by the new request's >>>>> logio_post_read_request() in the meantime. >>>> >>>> I guess this is broken without an output filter (vs re-using the >>>> add_bytes optional function) >> >> tried to improve here: http://svn.apache.org/viewvc?rev=1705134&view=rev > > Nice patch, I was thinking: too bad we need a mutex here :) > > How you measure things, network traces vs some custom log timestamp? > What does the following say? > > Index: server/core_filters.c > =================================================================== > --- server/core_filters.c (revision 1705125) > +++ server/core_filters.c (working copy) > @@ -792,6 +792,19 @@ static apr_status_t send_brigade_blocking(apr_sock > return rv; > } > > +static request_rec *get_r(apr_bucket_brigade *bb) > +{ > + apr_bucket *e; > + for (e = APR_BRIGADE_FIRST(bb); > + e != APR_BRIGADE_SENTINEL(bb); > + e = APR_BUCKET_NEXT(e)) { > + if (AP_BUCKET_IS_EOR(e)) { > + return e->data; > + } > + } > + return NULL; > +} > + > static apr_status_t writev_nonblocking(apr_socket_t *s, > struct iovec *vec, apr_size_t nvec, > apr_bucket_brigade *bb, > @@ -819,6 +832,9 @@ static apr_status_t writev_nonblocking(apr_socket_ > while (bytes_written < bytes_to_write) { > apr_size_t n = 0; > rv = apr_socket_sendv(s, vec + offset, nvec - offset, &n); > + ap_log_cerror(APLOG_MARK, APLOG_NOTICE, 0, c, > + "req:%pp: sent %" APR_SIZE_T_FMT " bytes", > + get_r(bb), n); > if (n > 0) { > bytes_written += n; > for (i = offset; i < nvec; ) { > Index: server/eor_bucket.c > =================================================================== > --- server/eor_bucket.c (revision 1705125) > +++ server/eor_bucket.c (working copy) > @@ -32,6 +32,8 @@ static apr_status_t eor_bucket_cleanup(void *data) > b->data = NULL; > /* Update child status and log the transaction */ > ap_update_child_status(r->connection->sbh, SERVER_BUSY_LOG, r); > + ap_log_cerror(APLOG_MARK, APLOG_NOTICE, 0, r->connection, > + "req:%pp: log_transaction", r); > ap_run_log_transaction(r); > if (ap_extended_status) { > ap_increment_counts(r->connection->sbh, r); > -- two logs (http/https) sorted to top of autoindex here: http://people.apache.org/~covener/ Narrow logio issue working good now, because our first filter invocation is not delayed like the "addbytes" callback was.