Random failures parsing CQL under heavy load

Description

Trying the following request in GeoServer:
/geoserver/wfs?request=GetFeature&PropertyName=HTML,GEOLOC&typeName=topp:SHLAA_2008&outputFormat=GML2&CQL_FILTER=INTERSECT(GEOLOC,%20POINT%20(615358%20312185))

results in 459 failures with the following stack trace over 10.000 request made by 4 concurrent threads:

Result:
27 ago 18:00:27 WARN [geoserver.ows] -
org.vfny.geoserver.ServiceException: Could not parse CQL filter list.Expected word but found End-of-Stream, Current Token : POINT: INTERSECT(GEOLOC, POINT (615358 312185)), Current Token : )
at org.geoserver.wfs.kvp.CQLFilterKvpParser.parse(CQLFilterKvpParser.java:28)
at org.geoserver.ows.Dispatcher.parseKVP(Dispatcher.java:1002)
at org.geoserver.ows.Dispatcher.init(Dispatcher.java:212)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:168)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:459)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1054)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:163)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:358)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:231)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:629)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:453)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
at org.mortbay.jetty.Server.handle(Server.java:303)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:452)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:721)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:509)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:349)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:217)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
Caused by: org.geotools.filter.text.cql2.CQLException: Expected word but found End-of-Stream, Current Token : POINT: INTERSECT(GEOLOC, POINT (615358 312185)), Current Token : )
at org.geotools.filter.text.cql2.CQL.toFilterList(CQL.java:262)
at org.geotools.filter.text.cql2.CQL.toFilterList(CQL.java:220)
at org.geoserver.wfs.kvp.CQLFilterKvpParser.parse(CQLFilterKvpParser.java:26)
... 49 more
Caused by: org.geotools.filter.text.cql2.CQLException: Expected word but found End-of-Stream, Current Token : POINT
at org.geotools.filter.text.cql2.CQLCompiler.buildGeometry(CQLCompiler.java:1234)
at org.geotools.filter.text.cql2.CQLCompiler.buildObject(CQLCompiler.java:537)
at org.geotools.filter.text.cql2.CQLCompiler.jjtreeCloseNodeScope(CQLCompiler.java:148)
at org.geotools.filter.text.cql2.CQLParser.PointTaggedText(CQLParser.java:2494)
at org.geotools.filter.text.cql2.CQLParser.GeometryLiteral(CQLParser.java:886)
at org.geotools.filter.text.cql2.CQLParser.GeoRoutineArgumentList(CQLParser.java:639)
at org.geotools.filter.text.cql2.CQLParser.RoutineInvocationGeoOp(CQLParser.java:423)
at org.geotools.filter.text.cql2.CQLParser.RoutineInvocation(CQLParser.java:340)
at org.geotools.filter.text.cql2.CQLParser.BooleanPrimary(CQLParser.java:272)
at org.geotools.filter.text.cql2.CQLParser.BooleanFactor(CQLParser.java:220)
at org.geotools.filter.text.cql2.CQLParser.BooleanTerm(CQLParser.java:177)
at org.geotools.filter.text.cql2.CQLParser.BooleanValueExpression(CQLParser.java:130)
at org.geotools.filter.text.cql2.CQLParser.SearchCondition(CQLParser.java:99)
at org.geotools.filter.text.cql2.CQLParser.SequenceOfSearchConditions(CQLParser.java:108)
at org.geotools.filter.text.cql2.CQLParser.MultipleCompilationUnit(CQLParser.java:92)
at org.geotools.filter.text.cql2.CQL.toFilterList(CQL.java:250)
... 51 more
27 ago 18:00:27 WARN [geoserver.ows] -
java.lang.ClassCastException: org.geotools.filter.AttributeExpressionImpl cannot be to org.opengis.filter.Filter
at org.geotools.filter.visitor.PostPreProcessFilterSplittingVisitor.getFilterPre(PostPreProcessFilterSplittingVisitor.java:230)
at org.geotools.data.jdbc.DefaultSQLBuilder.splitFilter(DefaultSQLBuilder.java:179)
at org.geotools.data.jdbc.DefaultSQLBuilder.getPostQueryFilter(DefaultSQLBuilder.java:139)
at org.geotools.data.jdbc.JDBCFeatureSource.count(JDBCFeatureSource.java:423)
at org.geotools.data.jdbc.JDBCFeatureCollection.getCount(JDBCFeatureCollection.java:105)
at org.geotools.data.store.DataFeatureCollection.size(DataFeatureCollection.java:282)
at org.geotools.data.crs.ReprojectFeatureResults.size(ReprojectFeatureResults.java:198)
at org.geoserver.wfs.GetFeature.run(GetFeature.java:260)
at org.geoserver.wfs.DefaultWebFeatureService.getFeature(DefaultWebFeatureService.java:129)
at sun.reflect.GeneratedMethodAccessor120.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:292)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
at org.geoserver.wfs.WFSLogger.invoke(WFSLogger.java:44)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
at $Proxy0.getFeature(Unknown Source)
at sun.reflect.GeneratedMethodAccessor124.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.geoserver.security.OperationSecurityInterceptor.invoke(OperationSecurityInterceptor.java:41)
at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:533)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:188)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:459)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1054)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:163)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:358)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:231)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:629)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:453)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
at org.mortbay.jetty.Server.handle(Server.java:303)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:452)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:721)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:509)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:349)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:217)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

The test was made against gs 1.6.5-beta, so gt2 2.4.x
Are you aware of any threading issue?

Environment

None

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Fix versions

Affects versions

Priority

Medium
Configure