1. GeoServer
  2. GEOS-4329

ConcurrentModificationException in GetFeature under heavy load


    • 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:
    • Number of attachments :


      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] - 
      	at org.eclipse.emf.common.util.BasicEList$EIterator.checkModCount(
      	at org.eclipse.emf.common.util.BasicEList$
      	at org.geotools.xml.Encoder.encode(
      	at org.geotools.xml.Encoder.encode(
      	at org.geoserver.wfs.xml.GML3OutputFormat.encode(
      	at org.geoserver.wfs.xml.GML3OutputFormat.write(
      	at org.geoserver.wfs.WFSGetFeatureOutputFormat.write(
      	at org.geoserver.ows.Dispatcher.response(
      	at org.geoserver.ows.Dispatcher.handleRequestInternal(
      	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(
      	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(
      	at org.springframework.web.servlet.DispatcherServlet.doDispatch(
      	at org.springframework.web.servlet.DispatcherServlet.doService(
      	at org.springframework.web.servlet.FrameworkServlet.processRequest(
      	at org.springframework.web.servlet.FrameworkServlet.doGet(

      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


          No work has yet been logged on this issue.


            • Assignee:
              Justin Deoliveira
              Andrea Aime


              • Created: