From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Oct 21 16:30:11 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58C9B106566C for ; Thu, 21 Oct 2010 16:30:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1AABC8FC1E for ; Thu, 21 Oct 2010 16:30:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o9LGUAoq043609 for ; Thu, 21 Oct 2010 16:30:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o9LGUANT043608; Thu, 21 Oct 2010 16:30:10 GMT (envelope-from gnats) Resent-Date: Thu, 21 Oct 2010 16:30:10 GMT Resent-Message-Id: <201010211630.o9LGUANT043608@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Vivek Khera Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08BF21065698 for ; Thu, 21 Oct 2010 16:21:12 +0000 (UTC) (envelope-from vivek@kciLink.com) Received: from yertle.kcilink.com (yertle-comcast.kcilink.com [74.92.149.58]) by mx1.freebsd.org (Postfix) with ESMTP id D4DB08FC1A for ; Thu, 21 Oct 2010 16:21:11 +0000 (UTC) Received: from vk-dev.int.kcilink.com (vk-dev.int.kcilink.com [192.168.7.96]) by yertle.kcilink.com (Postfix) with ESMTP id C884C8A0B6 for ; Thu, 21 Oct 2010 12:21:10 -0400 (EDT) Received: by vk-dev.int.kcilink.com (Postfix, from userid 1002) id B95013F421; Thu, 21 Oct 2010 12:21:09 -0400 (EDT) Message-Id: <20101021162109.B95013F421@vk-dev.int.kcilink.com> Date: Thu, 21 Oct 2010 12:21:09 -0400 (EDT) From: Vivek Khera To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/151623: apache22 update to 2.2.16_2 broke back compatibilty with profiles X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Vivek Khera List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2010 16:30:11 -0000 >Number: 151623 >Category: ports >Synopsis: apache22 update to 2.2.16_2 broke back compatibilty with profiles >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Oct 21 16:30:10 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Vivek Khera >Release: FreeBSD 8.1-RELEASE-p1 i386 >Organization: >Environment: System: FreeBSD vk-dev.int.kcilink.com 8.1-RELEASE-p1 FreeBSD 8.1-RELEASE-p1 #1: Wed Oct 6 10:06:18 EDT 2010 vivek@vk-dev.int.kcilink.com:/n/yertle1/sources/usr8/obj.i386/n/yertle1/sources/usr8/src/sys/KCI32 i386 >Description: I updated a box running apache 2.2 with multiple profiles to the 2.2.16_2 version. Controlling the individual profiles suddenly stopped working, and I traced it down to the pidfile being written incorrectly. It was always writing the pid file as /var/run/httpd.pid regardless of the profile I was starting. I looked into the port's change long on freshports and discovered that the patch from 2.2.16_1 to 2.2.16_2 introduced this change. The comment indicates that "With profiles the old defaults remain unchanged" which is incorrect. To achieve this change the following patch is required. This would have been disastrous had this happened on a production server rather than a development server. >How-To-Repeat: Set up a system running 2.2.16_1 with at least two profiles that write to different PID files. They will be named /var/run/httpd.PROFILENAME.pid Now upgrade to 2.2.16_2 and start the profiles. Now try to stop just one of them. The one started last will be stopped because the pidfile is now called /var/run/httpd.pid for all instances. Note also how it totally overrides the PidFile directive in the httpd.conf for each profile. >Fix: This patch restores the original default pid file value for systems with apache and profiles. Without it, each apache instance will overwrite the /var/run/httpd.pid file causing great confusion when you try to stop/restart one of the profiles. You can still override the pid file with the new config settings (which are totally not documented in the apache22 rc.d file, either.) --- apache22-save 2010-10-21 12:07:04.000000000 -0400 +++ apache22 2010-10-21 12:07:51.000000000 -0400 @@ -64,6 +64,7 @@ if [ -n "$2" ]; then profile="$2" if [ "x${apache22_profiles}" != "x" ]; then + pidfile="${_pidprefix}.${profile}.pid" eval apache22_configfile="\${apache22_${profile}_configfile:-}" if [ "x${apache22_configfile}" = "x" ]; then echo "You must define a configuration file (apache22_${profile}_configfile)" >Release-Note: >Audit-Trail: >Unformatted: