From owner-svn-ports-branches@freebsd.org Sun Apr 17 05:02:45 2016 Return-Path: Delivered-To: svn-ports-branches@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 688E0B10A10; Sun, 17 Apr 2016 05:02:45 +0000 (UTC) (envelope-from ohauer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E771A1040; Sun, 17 Apr 2016 05:02:44 +0000 (UTC) (envelope-from ohauer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3H52i0B075575; Sun, 17 Apr 2016 05:02:44 GMT (envelope-from ohauer@FreeBSD.org) Received: (from ohauer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3H52iIb075573; Sun, 17 Apr 2016 05:02:44 GMT (envelope-from ohauer@FreeBSD.org) Message-Id: <201604170502.u3H52iIb075573@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ohauer set sender to ohauer@FreeBSD.org using -f From: Olli Hauer Date: Sun, 17 Apr 2016 05:02:44 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r413490 - in branches/2016Q2/www/apache24: . files X-SVN-Group: ports-branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Apr 2016 05:02:45 -0000 Author: ohauer Date: Sun Apr 17 05:02:43 2016 New Revision: 413490 URL: https://svnweb.freebsd.org/changeset/ports/413490 Log: MFH: r413476 - fix scoreboard, backport fix from [1] - bump PORTREVISION For details see discussion: http://mail-archives.apache.org/mod_mbox/httpd-dev/201604.mbox/browser Thanks to Ken J. for reporting the issue and testing the patch! Reported by: Ken J. (on apache@ list) Obtained from: http://home.apache.org/~ylavic/patches/scoreboard-2.4.18.diff [1] Approved by: ports-secteam (junovitch@) Added: branches/2016Q2/www/apache24/files/patch-server__scoreboard.c - copied unchanged from r413476, head/www/apache24/files/patch-server__scoreboard.c Modified: branches/2016Q2/www/apache24/Makefile Directory Properties: branches/2016Q2/ (props changed) Modified: branches/2016Q2/www/apache24/Makefile ============================================================================== --- branches/2016Q2/www/apache24/Makefile Sun Apr 17 03:55:01 2016 (r413489) +++ branches/2016Q2/www/apache24/Makefile Sun Apr 17 05:02:43 2016 (r413490) @@ -2,6 +2,7 @@ PORTNAME= apache24 PORTVERSION= 2.4.20 +PORTREVISION= 1 CATEGORIES= www ipv6 MASTER_SITES= APACHE_HTTPD DISTNAME= httpd-${PORTVERSION} Copied: branches/2016Q2/www/apache24/files/patch-server__scoreboard.c (from r413476, head/www/apache24/files/patch-server__scoreboard.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2016Q2/www/apache24/files/patch-server__scoreboard.c Sun Apr 17 05:02:43 2016 (r413490, copy of r413476, head/www/apache24/files/patch-server__scoreboard.c) @@ -0,0 +1,119 @@ +Fix apache24-2.4.20 scoreboard, see discussion +http://mail-archives.apache.org/mod_mbox/httpd-dev/201604.mbox/browser + +Patch based on http://home.apache.org/~ylavic/patches/scoreboard-2.4.18.diff + +Index: server/scoreboard.c +=================================================================== +--- server/scoreboard.c.orig 2016-03-02 13:22:07 UTC ++++ server/scoreboard.c +@@ -464,22 +464,18 @@ static int update_child_status_internal( + { + int old_status; + worker_score *ws; +- process_score *ps; + int mpm_generation; + + ws = &ap_scoreboard_image->servers[child_num][thread_num]; + old_status = ws->status; +- if (status >= 0) { +- ws->status = status; +- +- ps = &ap_scoreboard_image->parent[child_num]; +- +- if (status == SERVER_READY +- && old_status == SERVER_STARTING) { +- ws->thread_num = child_num * thread_limit + thread_num; +- ap_mpm_query(AP_MPMQ_GENERATION, &mpm_generation); +- ps->generation = mpm_generation; +- } ++ ws->status = status; ++ ++ if (status == SERVER_READY ++ && old_status == SERVER_STARTING) { ++ process_score *ps = &ap_scoreboard_image->parent[child_num]; ++ ws->thread_num = child_num * thread_limit + thread_num; ++ ap_mpm_query(AP_MPMQ_GENERATION, &mpm_generation); ++ ps->generation = mpm_generation; + } + + if (ap_extended_status) { +@@ -497,46 +493,42 @@ static int update_child_status_internal( + ws->conn_bytes = 0; + ws->last_used = apr_time_now(); + } +- if (status == SERVER_READY) { +- ws->client[0]='\0'; +- ws->vhost[0]='\0'; +- ws->request[0]='\0'; +- ws->protocol[0]='\0'; ++ ++ if (descr) { ++ apr_cpystrn(ws->request, descr, sizeof(ws->request)); + } +- else { +- if (descr) { +- apr_cpystrn(ws->request, descr, sizeof(ws->request)); +- } +- else if (r) { +- copy_request(ws->request, sizeof(ws->request), r); +- } +- if (r) { +- if (!(val = ap_get_useragent_host(r, REMOTE_NOLOOKUP, NULL))) +- apr_cpystrn(ws->client, r->useragent_ip, sizeof(ws->client)); +- else +- apr_cpystrn(ws->client, val, sizeof(ws->client)); +- } +- else if (c) { +- if (!(val = ap_get_remote_host(c, c->base_server->lookup_defaults, +- REMOTE_NOLOOKUP, NULL))) +- apr_cpystrn(ws->client, c->client_ip, sizeof(ws->client)); +- else +- apr_cpystrn(ws->client, val, sizeof(ws->client)); +- } +- if (s) { +- if (c) { +- apr_snprintf(ws->vhost, sizeof(ws->vhost), "%s:%d", +- s->server_hostname, c->local_addr->port); +- } +- else { +- apr_cpystrn(ws->vhost, s->server_hostname, sizeof(ws->vhost)); +- } +- } ++ else if (r) { ++ copy_request(ws->request, sizeof(ws->request), r); ++ } ++ ++ if (r) { ++ if (!(val = ap_get_useragent_host(r, REMOTE_NOLOOKUP, NULL))) ++ apr_cpystrn(ws->client, r->useragent_ip, sizeof(ws->client)); ++ else ++ apr_cpystrn(ws->client, val, sizeof(ws->client)); ++ } ++ else if (c) { ++ if (!(val = ap_get_remote_host(c, c->base_server->lookup_defaults, ++ REMOTE_NOLOOKUP, NULL))) ++ apr_cpystrn(ws->client, c->client_ip, sizeof(ws->client)); ++ else ++ apr_cpystrn(ws->client, val, sizeof(ws->client)); ++ } ++ ++ if (s) { + if (c) { +- val = ap_get_protocol(c); +- apr_cpystrn(ws->protocol, val, sizeof(ws->protocol)); ++ apr_snprintf(ws->vhost, sizeof(ws->vhost), "%s:%d", ++ s->server_hostname, c->local_addr->port); ++ } ++ else { ++ apr_cpystrn(ws->vhost, s->server_hostname, sizeof(ws->vhost)); + } + } ++ ++ if (c) { ++ val = ap_get_protocol(c); ++ apr_cpystrn(ws->protocol, val, sizeof(ws->protocol)); ++ } + } + + return old_status;