Your message dated Sat, 03 Apr 2010 20:48:01 +0000
with message-id <e1nyag9-0003tw...@ries.debian.org>
and subject line Bug#574084: fixed in tomcat6 6.0.24-5
has caused the Debian Bug report #574084,
regarding Tomcat6 init script fails to clean up stale pid file
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
574084: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574084
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: tomcat6
Version: 6.0.24-3
Tags: patch

In the case where tomcat is no longer running but the pid file still
exists, the init script simply does nothing with the stop action, and
start and restart fail with "already running". The admin needs to
manually remove the stale pid to get the daemon back.

The attached patch fixes these issues with a slight logic change. The
basic idea is that if no pid file exists we know for a fact that stop
should do nothing and restart should just start the daemon, and in all
cases where a pid file does exist (regardless of the daemon running or
not) we still need to at the very least clean up after a crashed
daemon (by removing the pid file, the tmp directory, etc). 

The attached patch implements this basic idea. I have been running my
extremely crashy tomcats with it for a few days now without any
problems, I consider it to be fairly well tested and stable at this
point.

-- 
Arto Jantunen

--- tomcat6.orig	2010-03-12 15:42:52.000000000 +0200
+++ tomcat6	2010-03-12 16:04:25.000000000 +0200
@@ -212,24 +212,22 @@
 	log_daemon_msg "Stopping $DESC" "$NAME"
 
 	set +e
-	start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
-		--user "$TOMCAT6_USER" --exec "$JAVA_HOME/bin/java" \
-		>/dev/null
-	if [ "$?" = "0" ]; then
-		log_progress_msg "(not running)"
-	else
+	if [ -f "$CATALINA_PID" ]; then 
 		start-stop-daemon --stop --pidfile "$CATALINA_PID" \
 			--user "$TOMCAT6_USER" \
 			--retry=TERM/20/KILL/5 >/dev/null
-		if [ $? -eq 3 ]; then
+		if [ $? -eq 1 ]; then
+			log_progress_msg "$DESC is not running but pid file exists, cleaning up"
+		elif [ $? -eq 3 ]; then
 			PID="`cat $CATALINA_PID`"
 			log_failure_msg "Failed to stop $NAME (pid $PID)"
 			exit 1
-		else
-			rm -f "$CATALINA_PID"
 		fi
+		rm -f "$CATALINA_PID"
+		rm -rf "$JVM_TMP"
+	else
+		log_progress_msg "(not running)"
 	fi
-	rm -rf "$JVM_TMP"
 	log_end_msg 0
 	set -e
 	;;
@@ -253,9 +251,7 @@
 	set -e
         ;;
   restart|force-reload)
-        if start-stop-daemon --test --stop --pidfile "$CATALINA_PID" \
-		--user $TOMCAT6_USER --exec "$JAVA_HOME/bin/java" \
-		>/dev/null; then
+	if [ -f "$CATALINA_PID" ]; then
 		$0 stop
 		sleep 1
 	fi

--- End Message ---
--- Begin Message ---
Source: tomcat6
Source-Version: 6.0.24-5

We believe that the bug you reported is fixed in the latest version of
tomcat6, which is due to be installed in the Debian FTP archive:

libservlet2.5-java-doc_6.0.24-5_all.deb
  to main/t/tomcat6/libservlet2.5-java-doc_6.0.24-5_all.deb
libservlet2.5-java_6.0.24-5_all.deb
  to main/t/tomcat6/libservlet2.5-java_6.0.24-5_all.deb
libtomcat6-java_6.0.24-5_all.deb
  to main/t/tomcat6/libtomcat6-java_6.0.24-5_all.deb
tomcat6-admin_6.0.24-5_all.deb
  to main/t/tomcat6/tomcat6-admin_6.0.24-5_all.deb
tomcat6-common_6.0.24-5_all.deb
  to main/t/tomcat6/tomcat6-common_6.0.24-5_all.deb
tomcat6-docs_6.0.24-5_all.deb
  to main/t/tomcat6/tomcat6-docs_6.0.24-5_all.deb
tomcat6-examples_6.0.24-5_all.deb
  to main/t/tomcat6/tomcat6-examples_6.0.24-5_all.deb
tomcat6-user_6.0.24-5_all.deb
  to main/t/tomcat6/tomcat6-user_6.0.24-5_all.deb
tomcat6_6.0.24-5.debian.tar.gz
  to main/t/tomcat6/tomcat6_6.0.24-5.debian.tar.gz
tomcat6_6.0.24-5.dsc
  to main/t/tomcat6/tomcat6_6.0.24-5.dsc
tomcat6_6.0.24-5_all.deb
  to main/t/tomcat6/tomcat6_6.0.24-5_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 574...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Niels Thykier <ni...@thykier.net> (supplier of updated tomcat6 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Thu, 25 Mar 2010 23:45:32 +0100
Source: tomcat6
Binary: tomcat6-common tomcat6 tomcat6-user libtomcat6-java libservlet2.5-java 
libservlet2.5-java-doc tomcat6-admin tomcat6-examples tomcat6-docs
Architecture: source all
Version: 6.0.24-5
Distribution: unstable
Urgency: low
Maintainer: Debian Java Maintainers 
<pkg-java-maintainers@lists.alioth.debian.org>
Changed-By: Niels Thykier <ni...@thykier.net>
Description: 
 libservlet2.5-java - Servlet 2.5 and JSP 2.1 Java API classes
 libservlet2.5-java-doc - Servlet 2.5 and JSP 2.1 Java API documentation
 libtomcat6-java - Servlet and JSP engine -- core libraries
 tomcat6    - Servlet and JSP engine
 tomcat6-admin - Servlet and JSP engine -- admin web applications
 tomcat6-common - Servlet and JSP engine -- common files
 tomcat6-docs - Servlet and JSP engine -- documentation
 tomcat6-examples - Servlet and JSP engine -- example web applications
 tomcat6-user - Servlet and JSP engine -- tools to create user instances
Closes: 574084
Changes: 
 tomcat6 (6.0.24-5) unstable; urgency=low
 .
   * Added optimised garbage collection options to tomcat6's default options.
     Thanks to Aaron J. Zirbes and Thierry Carrez for research and the patch.
     (Closes: LP: #541520)
   * Updated the changelog to mention closed CVE's in the 6.0.24-1 release.
   * Applied patch from Arto Jantunen fixing an issue with cleaning up the
     pid-file. (Closes: #574084)
Checksums-Sha1: 
 76c8b10bd15be368d19876c21f09dd75f9c0fbde 1650 tomcat6_6.0.24-5.dsc
 7ba6d5626a9d76b0d962aeb52dddbef5dfc6b374 27965 tomcat6_6.0.24-5.debian.tar.gz
 156687ea3eda063a04bf874dbe1bb7dcb37c98bb 45732 tomcat6-common_6.0.24-5_all.deb
 5df3772e1c2c1edb93bb60d93e5f3122097bd07d 30078 tomcat6_6.0.24-5_all.deb
 4e1e490a160eca6561c4da8312384a4b1d6e471a 24092 tomcat6-user_6.0.24-5_all.deb
 b1ef9693e8560b572f4e85b8b32575975a4d5d5f 3007826 
libtomcat6-java_6.0.24-5_all.deb
 a5e037aa86746c0b90c67390384058af6b7144f8 189702 
libservlet2.5-java_6.0.24-5_all.deb
 939188452e6bbaa83a0ce42d5da0966cbb9653a4 252808 
libservlet2.5-java-doc_6.0.24-5_all.deb
 b7f4c5d68294e7be6b59c7f711094ad935c5ee5b 40504 tomcat6-admin_6.0.24-5_all.deb
 45eee357496dcf8da7284cbf2d8e3231ca73fc56 157418 
tomcat6-examples_6.0.24-5_all.deb
 32ea0533434fb29ea542e763d2ecdba39d091f95 506140 tomcat6-docs_6.0.24-5_all.deb
Checksums-Sha256: 
 f42d45d0203ed487a3da480a329e17ca24c2b1b1082820328ff81fc7c2bbb0ad 1650 
tomcat6_6.0.24-5.dsc
 d9d8873ad7a1c49102e10b8844be8bd426b1d84ef477e294f98d71c0430a912c 27965 
tomcat6_6.0.24-5.debian.tar.gz
 15f6163702498128dda588a4d403d30d31281d932eaba8668f322870d9a5847a 45732 
tomcat6-common_6.0.24-5_all.deb
 e468040e9ae65161b2ba1937f55756a8718523ea29d17528fdda4b712e96b2e6 30078 
tomcat6_6.0.24-5_all.deb
 a9f18a60e24eb27f6d1268b37a52ca6812d595360ebc2a52b50d59b7b886f420 24092 
tomcat6-user_6.0.24-5_all.deb
 da6b870c201db75f839b1a8238e5e7c3295fa6dc82010dad252a1c308c43e53f 3007826 
libtomcat6-java_6.0.24-5_all.deb
 6a3f381f340c1e6935e70867e2dfe239974a97b88e620729c6614f3dee8f728c 189702 
libservlet2.5-java_6.0.24-5_all.deb
 2f0c56c994debd6f57d2400a3f78d39896da2c6cf286a4725efcc3705c32fbdb 252808 
libservlet2.5-java-doc_6.0.24-5_all.deb
 e2d461efe4273dd0e254eb83977b8e5a219a4c7b09cdc98f7918d2da4f552282 40504 
tomcat6-admin_6.0.24-5_all.deb
 8e1c852a60acf1ccf70c686249a203fac91454141d6cbb810904619026338f30 157418 
tomcat6-examples_6.0.24-5_all.deb
 e8bdceaeee2e58818a60816e6c2738e2808bbcce69f0b686ef6ac174955804e0 506140 
tomcat6-docs_6.0.24-5_all.deb
Files: 
 74c521c665ef2ce91f7abd898167f947 1650 java optional tomcat6_6.0.24-5.dsc
 9ae0ec61003506d9e3d06e2f86f08237 27965 java optional 
tomcat6_6.0.24-5.debian.tar.gz
 14739f71c3593a503a088fc2b3b18224 45732 java optional 
tomcat6-common_6.0.24-5_all.deb
 fde17dfcec102c505db7d057beec3ca5 30078 java optional tomcat6_6.0.24-5_all.deb
 e826a7464289b87cf0018e996c896d6a 24092 java optional 
tomcat6-user_6.0.24-5_all.deb
 e7fb9dd1f070850270eea811418fa45c 3007826 java optional 
libtomcat6-java_6.0.24-5_all.deb
 4e5d1cf0ec01068e8c4b8fd3528fad0b 189702 java optional 
libservlet2.5-java_6.0.24-5_all.deb
 0f68ffa5666a9c9d94c1eda74f7a01f6 252808 doc optional 
libservlet2.5-java-doc_6.0.24-5_all.deb
 a5aff5313ff1b4de7bff9e8f469e317a 40504 java optional 
tomcat6-admin_6.0.24-5_all.deb
 afa7e17498c7d9995565358744c32956 157418 java optional 
tomcat6-examples_6.0.24-5_all.deb
 51c9d23e77372f5d27edf37b61ed95f7 506140 doc optional 
tomcat6-docs_6.0.24-5_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkur+7EACgkQpdwBkPlyvgMtUQCggGUMU7rRwHOpdl2ufq5JDVlr
2W8An30DPYU+dv+Z1G5TgHCcC94Vizmd
=3HdM
-----END PGP SIGNATURE-----



--- End Message ---
__
This is the maintainer address of Debian's Java team
<http://lists.alioth.debian.org/mailman/listinfo/pkg-java-maintainers>. Please 
use
debian-j...@lists.debian.org for discussions and questions.

Reply via email to