Bug 35487 - gcj causes ConcurrentModificationException during tomcat5 container startup
Summary: gcj causes ConcurrentModificationException during tomcat5 container startup
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: classpath (show other bugs)
Version: unspecified
: P3 normal
Target Milestone: 0.98
Assignee: Andrew John Hughes
URL:
Keywords:
Depends on:
Blocks: 36145
  Show dependency treegraph
 
Reported: 2008-03-06 22:23 UTC by Justin
Modified: 2008-08-27 20:15 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-05-06 02:30:16


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin 2008-03-06 22:23:07 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=436395

Description of problem:

I have to restart my tomcat5 server several times to avoid the following:

4-Mar-08 12:56:12 AM org.apache.catalina.connector.MapperListener init
WARNING: Error registering contexts
java.util.ConcurrentModificationException
   at java.util.HashMap$HashIterator.next(libgcj.so.8rh)
   at gnu.javax.management.Server.queryMBeans(libgcj.so.8rh)
   at org.apache.catalina.connector.MapperListener.init(catalina-5.5.26.jar.so)
   at org.apache.catalina.connector.Connector.start(catalina-5.5.26.jar.so)
   at org.apache.catalina.core.StandardService.start(catalina-5.5.26.jar.so)
   at org.apache.catalina.core.StandardServer.start(catalina-5.5.26.jar.so)
   at org.apache.catalina.startup.Catalina.start(catalina-5.5.26.jar.so)
   at java.lang.reflect.Method.invoke(libgcj.so.8rh)
   at org.apache.catalina.startup.Bootstrap.start(bootstrap.jar.so)
   at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so)
4-Mar-08 12:56:12 AM org.apache.jk.common.ChannelSocket init

When I get it, the webapps do not load properly.


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

I installed Tomcat 5.5.26 on Fedora 8 x86_64 with RPMs:

108$rpm -qa | grep tomcat
jakarta-commons-pool-tomcat5-1.3-9jpp.3.fc8
tomcat5-servlet-2.4-api-5.5.26-1jpp.2.fc8
tomcat5-jsp-2.0-api-5.5.26-1jpp.2.fc8
tomcat5-jasper-5.5.26-1jpp.2.fc8
jakarta-commons-collections-tomcat5-3.1-9jpp.2.fc7.1
tomcat5-common-lib-5.5.26-1jpp.2.fc8
tomcat5-server-lib-5.5.26-1jpp.2.fc8
tomcat5-admin-webapps-5.5.26-1jpp.2.fc8
tomcat5-webapps-5.5.26-1jpp.2.fc8
jakarta-commons-dbcp-tomcat5-1.2.1-10jpp.2.fc8
tomcat5-5.5.26-1jpp.2.fc8

Additional info:

The machine is dual CPU with dual cores, and is using gcj as installed by
default with Fedora 8 RPMs:

145$rpm -qa | grep gcj
java-1.5.0-gcj-devel-1.5.0.0-17.fc8
libgcj-4.1.2-33
libgcj-devel-4.1.2-33
java-1.5.0-gcj-1.5.0.0-17.fc8
libgcj-src-4.1.2-33
Comment 1 Andrew John Hughes 2008-05-06 02:30:16 UTC
Confirmed.  The management server should be thread-safe.
Comment 2 Andrew John Hughes 2008-06-15 22:22:38 UTC
Fix for 0.98.
Comment 3 Andrew John Hughes 2008-08-27 20:15:17 UTC
CVSROOT:        /sources/classpath
Module name:    classpath
Changes by:     Andrew John Hughes <gnu_andrew> 08/08/27 20:14:34

Modified files:
       .              : ChangeLog
       gnu/javax/management: Server.java

Log message:
       2008-08-26  Andrew John Hughes  <gnu_andrew@member.fsf.org>

               PR classpath/35487:
               * gnu/javax/management/Server.java:
               (beans): Change to ConcurrentHashMap.
               (defaultDomain): Make final.
               (outer): Likewise.
               (LazyListenersHolder): Added to wrap
               listeners, also now a ConcurrentHashMap,
               providing lazy initialisation safely.
               (sequenceNumber): Documented.
               (getBean(ObjectName)): Remove redundant cast.
               (addNotificationListener(ObjectName,NotificationListener,
               NotificationFilter,Object)): Remove map initialisation
               and use holder.
               (getObjectInstance(ObjectName)): Remove redundant cast.
               (registerMBean(Object,ObjectName)): Add bean atomically.
               (removeNotificationListener(ObjectName,NotificationListener)):
               Simplified.
               (removeNotificationListener(ObjectName,NotificationListener,
               NotificationFilter,Object)): Likewise.
               (notify(ObjectName,String)): Documented.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.9707&r2=1.9708
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/javax/management/Server.java?cvsroot=classpath&r1=1.8&r2=1.9