Bug 63871 - Jakarta-Tomcat JVMs do not shut down properly
Summary: Jakarta-Tomcat JVMs do not shut down properly
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: IBMJava2-JRE
Version: skipjack-beta2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Preston Brown
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-04-19 20:12 UTC by Gil Chilton
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-04-20 04:51:39 UTC
Embargoed:


Attachments (Terms of Use)

Description Gil Chilton 2002-04-19 20:12:02 UTC
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 04:51:34 UTC
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 13:36:42 UTC
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.