Date: Thu, 23 Aug 2012 00:17:49 GMT From: Ryan Frederick <ryanrfrederick@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/170899: net-im/openfire rc Script pidfile Check Broken With Bracketed Java Process in Process List Message-ID: <201208230017.q7N0HnNv046932@red.freebsd.org> Resent-Message-ID: <201208230020.q7N0K2Qq095507@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208230017.q7N0HnNv046932>