Memory leak in DescribeFeatureType operation
--------------------------------------------

                 Key: GEOS-3887
                 URL: http://jira.codehaus.org/browse/GEOS-3887
             Project: GeoServer
          Issue Type: Bug
          Components: WFS
    Affects Versions: 2.0.1, 2.0.x
         Environment: Geoserver built from 2.0.x branch running on Tomcat 6 
under WinXP
            Reporter: Vitali Diatchkov
            Assignee: Andrea Aime
         Attachments: eclipse1.png, eclipse2.png

Screenshots of debugging from Eclipse are attached.

Feature type is from PostgreSQL table.

During every DescribeFeatureType request issued from a  browser e.g. 
(http://localhost:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=paikkaoppi:maankaytto)
 an object of type XSDElementDeclarationImpl(name="_Feature") indefinitely 
accumulates other objects of the same type in its [substituationGroup] list. 
Every such a request adds one more XSDElementDeclarationImpl related to the 
feature type mentioned in the request.

In case of some errors in GeoServer I got a situation when even NULLs were 
added to that list and it led to the unresolvable permanent exception later in 
GetFeature request:

30 ìàð 20:55:17 ERROR [geoserver.ows] - 
java.lang.NullPointerException
        at org.geotools.xml.Encoder.encode(Encoder.java:726)
        at org.geotools.xml.Encoder.encode(Encoder.java:561)
        at 
org.geoserver.wfs.xml.GML3OutputFormat.write(GML3OutputFormat.java:190)
        at 
org.geoserver.wfs.WFSGetFeatureOutputFormat.write(WFSGetFeatureOutputFormat.java:137)
        at org.geoserver.ows.Dispatcher.response(Dispatcher.java:726)
        at 
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:234)
        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.doPost(FrameworkServlet.java:511)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
        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:275)
        at 
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
        at 
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at 
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
        at 
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at 
org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
        at 
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at 
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
        at 
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
.........

Seems that the data implicitely cached and accumulated across requests. It 
affects GetFeature request performance while all those elements from 
substituationGroup are iterated in Encoder object.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to