GeoServer
  1. GeoServer
  2. GEOS-4329

ConcurrentModificationException in GetFeature under heavy load

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-RC1
    • Fix Version/s: 2.0.3, 2.1-RC2
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      4

      Description

      Under heavy load of both GetFeature and DescribeFeatureType we get failures in GetFeature in roughly 10% of the GetFeature requests with the following stack trace:

      2011-01-26 08:50:22,030 ERROR [geoserver.ows] - 
      java.util.ConcurrentModificationException
      	at org.eclipse.emf.common.util.BasicEList$EIterator.checkModCount(BasicEList.java:1327)
      	at org.eclipse.emf.common.util.BasicEList$EIterator.next(BasicEList.java:1275)
      	at org.geotools.xml.Encoder.encode(Encoder.java:726)
      	at org.geotools.xml.Encoder.encode(Encoder.java:563)
      	at org.geoserver.wfs.xml.GML3OutputFormat.encode(GML3OutputFormat.java:253)
      	at org.geoserver.wfs.xml.GML3OutputFormat.write(GML3OutputFormat.java:241)
      	at org.geoserver.wfs.WFSGetFeatureOutputFormat.write(WFSGetFeatureOutputFormat.java:141)
      	at org.geoserver.ows.Dispatcher.response(Dispatcher.java:751)
      	at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:233)
      	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
      	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
      	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
      	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
      	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
      	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
      

      This is probably related to the substitution group handling in gt-xsd as the problem occurrs while visiting substitution groups for _Feature.
      The patches committed on GeoTools at revision 35934,35936,35937 have been beneficial in this respect, as the same test against GS 2.0.2
      results in well over 90% failures instead (which do start with the same stack trace, but eventually lead to NPE as some null finds its way into
      the substitution group list), but I guess it's not enough since it's still possible to reproduce failures.

      I'm going to attach a JMeter script that makes the problem evident: it creates two groups of 40 threads that do run concurrently, one makes
      a lot of DFT (8000, as they are quick to process), the other one some GetFeature (800).

      1. layers.csv
        0.2 kB
        Andrea Aime
      2. substitution.patch
        3 kB
        Andrea Aime
      3. substitution.patch
        1 kB
        Andrea Aime
      4. wfs.jmx
        15 kB
        Andrea Aime

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Justin Deoliveira
              Reporter:
              Andrea Aime
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: