Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.4, 1.5
    • Fix Version/s: 1.4.1, 1.5, 3.1, 4.0-ALPHA
    • Component/s: Build
    • Labels:
      None
    • Environment:

      Centos 5, Tomcat 6

      Description

      SOLR 1.4 (final) and 1.5 nightly work fine on a Windows box, but on our Centos 5 box, we're getting a ConcurrentModificationException when starting Tomcat 6.

      Yonik Seeley asked me to start a JIRA bug report, mentioning that, "It looks like resourceLoader.newInstance() is fundamentally not thread safe." (SOLR-USER)

      = = = Log Below: = = =

      INFO | jvm 1 | 2010/02/24 21:27:04 | SEVERE: java.util.ConcurrentModificationException
      INFO | jvm 1 | 2010/02/24 21:27:04 | at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at java.util.AbstractList$Itr.next(AbstractList.java:343)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:507)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.solr.core.SolrCore.<init>(SolrCore.java:606)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.solr.core.CoreContainer.create(CoreContainer.java:429)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.solr.core.CoreContainer.load(CoreContainer.java:285)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:117)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:86)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3800)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.core.StandardContext.start(StandardContext.java:4450)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.core.StandardService.start(StandardService.java:516)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at java.lang.reflect.Method.invoke(Method.java:597)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at java.lang.reflect.Method.invoke(Method.java:597)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at org.tanukisoftware.wrapper.WrapperStartStopApp.run(WrapperStartStopApp.java:242)
      INFO | jvm 1 | 2010/02/24 21:27:04 | at java.lang.Thread.run(Thread.java:619)

      1. SOLR-1797.patch
        7 kB
        Yonik Seeley

        Activity

        Hide
        Hoss Man added a comment -

        NOTE: Initial thread where Yonik had some more comments about how/where the concurrent modification can come from...

        http://old.nabble.com/ConcurrentModificationException-to27722422.html

        Show
        Hoss Man added a comment - NOTE: Initial thread where Yonik had some more comments about how/where the concurrent modification can come from... http://old.nabble.com/ConcurrentModificationException-to27722422.html
        Hide
        Yonik Seeley added a comment -

        Patch attached:

        • makes lists synchronized for thread safety
        • adds an isLive that does not add to aware* lists after a core is done initializing... this probably represented a memory leak before
        • adds a while loop around callbacks, in case that those callbacks could cause more entries to be added

        This should fix the issues people have been seeing.

        Show
        Yonik Seeley added a comment - Patch attached: makes lists synchronized for thread safety adds an isLive that does not add to aware* lists after a core is done initializing... this probably represented a memory leak before adds a while loop around callbacks, in case that those callbacks could cause more entries to be added This should fix the issues people have been seeing.
        Hide
        Yonik Seeley added a comment -

        Committed to newtrunk, and merged back to trunk.

        I was never actually able to reproduce, so some reports from those who could would be welcome!

        Show
        Yonik Seeley added a comment - Committed to newtrunk, and merged back to trunk. I was never actually able to reproduce, so some reports from those who could would be welcome!
        Hide
        Hoss Man added a comment -

        Correcting Fix Version based on CHANGES.txt, see this thread for more details...

        http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E

        Show
        Hoss Man added a comment - Correcting Fix Version based on CHANGES.txt, see this thread for more details... http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E
        Hide
        Hoss Man added a comment -

        Committed revision 949475.

        merging to branch-1.4 for 1.4.1

        Show
        Hoss Man added a comment - Committed revision 949475. merging to branch-1.4 for 1.4.1

          People

          • Assignee:
            Unassigned
            Reporter:
            Dan Hertz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development