Bug 63871 - Jakarta-Tomcat JVMs do not shut down properly
Jakarta-Tomcat JVMs do not shut down properly
Status: CLOSED NOTABUG
Product: Red Hat Public Beta
Classification: Retired
Component: IBMJava2-JRE (Show other bugs)
skipjack-beta2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Preston Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-04-19 16:12 EDT by Gil Chilton
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-04-20 00:51:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gil Chilton 2002-04-19 16:12:02 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
Skipjack2 prevents Jakarta-Tomcat (http://jakarta.apache.org/tomcat/index.html) 
from fully shutting down the Java JVMs.  This is demonstrated on two machines: 
1 a full install of Skipjack2 after previous Skipjack1 install and a different 
machine that was upgraded from Enigma to Skipjack2.  The shutdown worked 
correctly prior to Skipjack2.

They symptom is that some, maybe half, of the JVMs shutdown but not all.  If 
the shutdown script is run a second time, Java exceptions occur.  The scripts 
are below.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Startup Tomcat with tomcat/bin/startup.sh
2. Wait for all processes to be started
3. Shutdown Tomcat with tomcat/bin/shutdown.sh
	

Actual Results:  Around 10 tomcat JVMs remain running after attempting to 
shutdown Tomcat.

Expected Results:  All JVMs stated by Tomcat should be shutdown when shutdown 
script is run.

Additional info:

Here is the startup script (tomcat/bin/startup.sh)which appears to work:
#!/bin/sh
# -----------------------------------------------------------------------------
# Start Script for the CATALINA Server
#
# $Id: startup.sh,v 1.1.4.1 2002/01/30 18:10:40 patrickl Exp $
# -----------------------------------------------------------------------------
 
# resolve links - $0 may be a softlink
PRG="$0"
 
while [ -h "$PRG" ] ; do
  ls=`ls -ld "$PRG"`
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '.*/.*' > /dev/null; then
    PRG="$link"
  else
    PRG=`dirname "$PRG"`/"$link"
  fi
done
 
PRGDIR=`dirname "$PRG"`
EXECUTABLE=catalina.sh
 
# Check that target executable exists
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
  echo "Cannot find $PRGDIR/$EXECUTABLE"
  echo "This file is needed to run this program"
  exit 1
fi
 
exec "$PRGDIR"/"$EXECUTABLE" start "$@"


Here is the shutdown script (tomcat/bin/shutdown.sh) which demonstrates the 
problem:

#!/bin/sh
# -----------------------------------------------------------------------------
# Stop script for the CATALINA Server
#
# $Id: shutdown.sh,v 1.1.4.1 2002/01/30 18:10:40 patrickl Exp $
# -----------------------------------------------------------------------------
 
# resolve links - $0 may be a softlink
PRG="$0"
 
while [ -h "$PRG" ] ; do
  ls=`ls -ld "$PRG"`
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '.*/.*' > /dev/null; then
    PRG="$link"
  else
    PRG=`dirname "$PRG"`/"$link"
  fi
done
 
PRGDIR=`dirname "$PRG"`
EXECUTABLE=catalina.sh
 
# Check that target executable exists
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
  echo "Cannot find $PRGDIR/$EXECUTABLE"
  echo "This file is needed to run this program"
  exit 1
fi
 
exec "$PRGDIR"/"$EXECUTABLE" stop "$@"
Comment 1 Gil Chilton 2002-04-20 00:51:34 EDT
I forgot to mention that I am using the Sun 1.4.0 JDK rpm, not the IBM JDK.
Comment 2 Gil Chilton 2002-04-22 09:36:42 EDT
Upon further review, the problem was my poorly designed threading code 
introduced about the time of Skipjack2 and not caused by Skipjack2.

Note You need to log in before you can comment on or make changes to this bug.