From: Andrea A. (JIRA) <ji...@co...> - 2011-05-31 17:52:28
|
NPE and potential memory leak on concurrent load of DescribeFeatureType with custom schemas ------------------------------------------------------------------------------------------- Key: GEOS-4587 URL: http://jira.codehaus.org/browse/GEOS-4587 Project: GeoServer Issue Type: Bug Affects Versions: 2.1.0 Reporter: Andrea Aime Assignee: Justin Deoliveira Fix For: 2.1.1 Attachments: schema.xsd Steps to reproduce: - take the standard GeoServer data directory (release) - add the attached schema.xsd in release/workspaces/topp/states_shapefile/states - run ab (apache bench) or jmeter to generate concurrent load on a DescribeFeatureType on that layer: ab -n 1000 -c 8 "http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=topp:states" Soon enough the log should be filled with stack traces like this one: {code} Could not build xml schema for type: states java.lang.NullPointerException at org.geotools.gml2.ReferencingDirectiveLeakPreventer.notifyChanged(ReferencingDirectiveLeakPreventer.java:80) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380) at org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDConcreteComponentImpl.java:1159) at org.eclipse.emf.ecore.util.EcoreEList.dispatchNotification(EcoreEList.java:255) at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:310) at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:307) at org.eclipse.xsd.impl.XSDSchemaImpl.imported(XSDSchemaImpl.java:3126) at org.eclipse.xsd.impl.XSDImportImpl.handleResolvedSchema(XSDImportImpl.java:436) at org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchemaDirectiveImpl.java:399) at org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImpl.java:422) at org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaImpl.java:2253) at org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSDSchemaImpl.java:2286) at org.eclipse.xsd.impl.XSDSchemaImpl.resolveTypeDefinition(XSDSchemaImpl.java:2345) at org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveTypeDefinition(XSDConcreteComponentImpl.java:2288) at org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElementDeclarationImpl.java:555) at org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcreteComponentImpl.java:535) at org.eclipse.xsd.impl.XSDParticleImpl.patch(XSDParticleImpl.java:517) at org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcreteComponentImpl.java:535) at org.eclipse.xsd.impl.XSDModelGroupImpl.patch(XSDModelGroupImpl.java:459) at org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcreteComponentImpl.java:535) at org.eclipse.xsd.impl.XSDParticleImpl.patch(XSDParticleImpl.java:517) at org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcreteComponentImpl.java:535) at org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedComponentImpl.java:785) at org.eclipse.xsd.impl.XSDTypeDefinitionImpl.patch(XSDTypeDefinitionImpl.java:247) at org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDComplexTypeDefinitionImpl.java:1055) at org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcreteComponentImpl.java:535) at org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java:1602) at org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchemaImpl.java:2463) at org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDConcreteComponentImpl.java:1154) at org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSchemaImpl.java:893) at org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl.java:763) at org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl.java:796) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1494) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1282) at org.geotools.xml.Schemas.parse(Schemas.java:264) at org.geotools.xml.Schemas.parse(Schemas.java:239) at org.geoserver.wfs.xml.FeatureTypeSchemaBuilder.findTypeInSchema(FeatureTypeSchemaBuilder.java:462) at org.geoserver.wfs.xml.FeatureTypeSchemaBuilder.buildSchemaContent(FeatureTypeSchemaBuilder.java:566) at org.geoserver.wfs.xml.FeatureTypeSchemaBuilder.build(FeatureTypeSchemaBuilder.java:202) at org.geoserver.wfs.xml.v1_1_0.XmlSchemaEncoder.write(XmlSchemaEncoder.java:57) at org.geoserver.wfs.WFSDescribeFeatureTypeOutputFormat.write(WFSDescribeFeatureTypeOutputFormat.java:63) at org.geoserver.ows.Dispatcher.response(Dispatcher.java:757) at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:238) 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:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74) at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450) {code} -- 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 |