From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Aug 23 00:20:02 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 61ACF106566B for ; Thu, 23 Aug 2012 00:20:02 +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 35D648FC1B for ; Thu, 23 Aug 2012 00:20:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7N0K2go095508 for ; Thu, 23 Aug 2012 00:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7N0K2Qq095507; Thu, 23 Aug 2012 00:20:02 GMT (envelope-from gnats) Resent-Date: Thu, 23 Aug 2012 00:20:02 GMT Resent-Message-Id: <201208230020.q7N0K2Qq095507@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, Ryan Frederick Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2ECE1065670 for ; Thu, 23 Aug 2012 00:17:49 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id BD99D8FC12 for ; Thu, 23 Aug 2012 00:17:49 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q7N0HnTX046933 for ; Thu, 23 Aug 2012 00:17:49 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q7N0HnNv046932; Thu, 23 Aug 2012 00:17:49 GMT (envelope-from nobody) Message-Id: <201208230017.q7N0HnNv046932@red.freebsd.org> Date: Thu, 23 Aug 2012 00:17:49 GMT From: Ryan Frederick To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/170899: net-im/openfire rc Script pidfile Check Broken With Bracketed Java Process in Process List X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Aug 2012 00:20:02 -0000 >Number: 170899 >Category: ports >Synopsis: net-im/openfire rc Script pidfile Check Broken With Bracketed Java Process in Process List >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Aug 23 00:20:01 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Ryan Frederick >Release: 9.0-RELEASE >Organization: >Environment: FreeBSD problem.machine 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 01:47:53 UTC 2012 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: When running net-im/openfire with enough arguments that the Openfire Java process appears in the process list (`ps auxwww`) as a bracketed process, e.g. "[java]", the rc script's pidfile check on lines 68 and 84 fails to return the pidfile and thus successfully display Openfire's status or stop Openfire. >How-To-Repeat: Start Openfire with a sufficient list of arguments specified in openfire_javargs (e.g. openfire_javargs="-Xmx256M -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12345 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false") to cause the process to be bracketed in the process list, then attempt to run `/usr/local/etc/rc.d/openfire status` or `/usr/local/etc/rc.d/openfire stop`. >Fix: Perhaps replace the current check_pidfile subversion with a check_pidfile() subversion method similar to the one found in www/tomcat6: --SNIP-- tomcat_check_pidfile() { _pidfile=$1 if [ -z "$_pidfile" ]; then err 3 'USAGE: tomcat_check_pidfile pidfile' fi if [ ! -f $_pidfile ]; then debug "pid file ($_pidfile): not readable." return fi read _pid _junk < $_pidfile if [ -z "$_pid" ]; then debug "pid file ($_pidfile): no pid in file." return fi if [ -n "`%%LOCALBASE%%/bin/jps -l | grep -e "^$_pid $java_class\$"`" ]; then echo -n $_pid fi } --SNIP-- >Release-Note: >Audit-Trail: >Unformatted: