[Geoserver-devel] Streaming violation in GML3 output?

Hi,
today I was looking to a completely unrelated issue when I stumbled
upon this very worrisome stack trace (got from the debugger, it's
not an exception):

Thread [btpool0-1] (Suspended (breakpoint at line 188 in DataFeatureCollection))
  DefaultFeatureResults(DataFeatureCollection).iterator() line: 188
  CollectionConverterFactory$2.convert(Object, Class) line: 66
  Converters.convert(Object, Class, Hints) line: 126
  Converters.convert(Object, Class) line: 90
  ElementEncodeExecutor.visit(Binding) line: 82
  BindingWalker$BindingExecutionChain.execute(BindingWalker$Visitor) line: 191
  BindingWalker.walk(XSDFeature, BindingWalker$Visitor, XSDTypeDefinition, MutablePicoContainer) line: 157
  BindingWalker.walk(XSDFeature, BindingWalker$Visitor, MutablePicoContainer) line: 161
  ElementEncoder.encode(Object, XSDElementDeclaration, Document) line: 75
  Encoder.encode(Object, XSDNamedComponent) line: 783
  Encoder.encode(Object, QName, ContentHandler) line: 598
  Encoder.encode(Object, QName, OutputStream) line: 372
  GML3OutputFormat.write(FeatureCollectionType, OutputStream, Operation) line: 121
  GML3OutputFormat(WFSGetFeatureOutputFormat).write(Object, OutputStream, Operation) line: 137
  Dispatcher.response(Object, Dispatcher$Request, Operation) line: 615
  Dispatcher.handleRequestInternal(HttpServletRequest, HttpServletResponse) line: 192
  Dispatcher(AbstractController).handleRequest(HttpServletRequest, HttpServletResponse) line: 139
  SimpleControllerHandlerAdapter.handle(HttpServletRequest, HttpServletResponse, Object) line: 44
  DispatcherServlet.doDispatch(HttpServletRequest, HttpServletResponse) line: 684
  DispatcherServlet.doService(HttpServletRequest, HttpServletResponse) line: 625
  DispatcherServlet(FrameworkServlet).processRequest(HttpServletRequest, HttpServletResponse) line: 392
  DispatcherServlet(FrameworkServlet).doGet(HttpServletRequest, HttpServletResponse) line: 347
  DispatcherServlet(HttpServlet).service(HttpServletRequest, HttpServletResponse) line: 689
  DispatcherServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 802
  ServletHolder.handle(ServletRequest, ServletResponse) line: 459
  ServletHandler$CachedChain.doFilter(ServletRequest, ServletResponse) line: 1054
  SetCharacterEncodingFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 108
  ServletHandler$CachedChain.doFilter(ServletRequest, ServletResponse) line: 1045
  FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest, ServletResponse) line: 264
  FilterSecurityInterceptor.invoke(FilterInvocation) line: 107
  FilterSecurityInterceptor.doFilter(ServletRequest, ServletResponse, FilterChain) line: 72
  FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest, ServletResponse) line: 274
  ExceptionTranslationFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 110
  FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest, ServletResponse) line: 274
  AnonymousProcessingFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 125
  FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest, ServletResponse) line: 274
  BasicProcessingFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 178
  FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest, ServletResponse) line: 274
  HttpSessionContextIntegrationFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 229
  FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest, ServletResponse) line: 274
  FilterChainProxy.doFilter(ServletRequest, ServletResponse, FilterChain) line: 148
  FilterToBeanProxy.doFilter(ServletRequest, ServletResponse, FilterChain) line: 98
  ServletHandler$CachedChain.doFilter(ServletRequest, ServletResponse) line: 1045
  LoggingFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 69
  ServletHandler$CachedChain.doFilter(ServletRequest, ServletResponse) line: 1045
  GZIPFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 47
  ServletHandler$CachedChain.doFilter(ServletRequest, ServletResponse) line: 1045
  ServletHandler.handle(String, HttpServletRequest, HttpServletResponse, int) line: 358
  SessionHandler.handle(String, HttpServletRequest, HttpServletResponse, int) line: 231
  WebAppContext(ContextHandler).handle(String, HttpServletRequest, HttpServletResponse, int) line: 629
  WebAppContext.handle(String, HttpServletRequest, HttpServletResponse, int) line: 453
  Server(HandlerWrapper).handle(String, HttpServletRequest, HttpServletResponse, int) line: 141
  Server.handle(HttpConnection) line: 303
  HttpConnection.handleRequest() line: 452
  HttpConnection$RequestHandler.headerComplete() line: 721
  HttpParser.parseNext() line: 509
  HttpParser.parseAvailable() line: 209
  HttpConnection.handle() line: 349
  SocketConnector$Connection.run() line: 217
  BoundedThreadPool$PoolThread.run() line: 475

The request is just:
http://localhost:8080/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=topp:states&propertyName=STATE_NAME,PERSONS

Hum, this is quite shocking: the xsd module is converting a
feature collection into an in memory Feature because the
FeatureArrayPropertyTypeBinding is getting used.
Of course this means we would OOM in all big GetFeature requests.

Worried, it this something happening on 1.6.x as well or
a side effect of the xlink work?

Cheers
Andrea

Hi Andrea,

Yes, I actually noticed this issue recently. A very silly mistake on my
part. Writing a converter that goes from a collection to an array. And
since feature collection implements Collection... boom!!

Anyways, I will fix. Creating a jira issue.

http://jira.codehaus.org/browse/GEOT-1694

-Justin

Andrea Aime wrote:

Hi,
today I was looking to a completely unrelated issue when I stumbled
upon this very worrisome stack trace (got from the debugger, it's
not an exception):

Thread [btpool0-1] (Suspended (breakpoint at line 188 in
DataFeatureCollection))
  DefaultFeatureResults(DataFeatureCollection).iterator() line: 188
  CollectionConverterFactory$2.convert(Object, Class) line: 66
  Converters.convert(Object, Class, Hints) line: 126
  Converters.convert(Object, Class) line: 90
  ElementEncodeExecutor.visit(Binding) line: 82
  BindingWalker$BindingExecutionChain.execute(BindingWalker$Visitor)
line: 191
  BindingWalker.walk(XSDFeature, BindingWalker$Visitor,
XSDTypeDefinition, MutablePicoContainer) line: 157
  BindingWalker.walk(XSDFeature, BindingWalker$Visitor,
MutablePicoContainer) line: 161
  ElementEncoder.encode(Object, XSDElementDeclaration, Document) line: 75
  Encoder.encode(Object, XSDNamedComponent) line: 783
  Encoder.encode(Object, QName, ContentHandler) line: 598
  Encoder.encode(Object, QName, OutputStream) line: 372
  GML3OutputFormat.write(FeatureCollectionType, OutputStream, Operation)
line: 121
  GML3OutputFormat(WFSGetFeatureOutputFormat).write(Object, OutputStream,
Operation) line: 137
  Dispatcher.response(Object, Dispatcher$Request, Operation) line: 615
  Dispatcher.handleRequestInternal(HttpServletRequest,
HttpServletResponse) line: 192
  Dispatcher(AbstractController).handleRequest(HttpServletRequest,
HttpServletResponse) line: 139
  SimpleControllerHandlerAdapter.handle(HttpServletRequest,
HttpServletResponse, Object) line: 44
  DispatcherServlet.doDispatch(HttpServletRequest, HttpServletResponse)
line: 684
  DispatcherServlet.doService(HttpServletRequest, HttpServletResponse)
line: 625
  DispatcherServlet(FrameworkServlet).processRequest(HttpServletRequest,
HttpServletResponse) line: 392
  DispatcherServlet(FrameworkServlet).doGet(HttpServletRequest,
HttpServletResponse) line: 347
  DispatcherServlet(HttpServlet).service(HttpServletRequest,
HttpServletResponse) line: 689
  DispatcherServlet(HttpServlet).service(ServletRequest, ServletResponse)
line: 802
  ServletHolder.handle(ServletRequest, ServletResponse) line: 459
  ServletHandler$CachedChain.doFilter(ServletRequest, ServletResponse)
line: 1054
  SetCharacterEncodingFilter.doFilter(ServletRequest, ServletResponse,
FilterChain) line: 108
  ServletHandler$CachedChain.doFilter(ServletRequest, ServletResponse)
line: 1045
  FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest,
ServletResponse) line: 264
  FilterSecurityInterceptor.invoke(FilterInvocation) line: 107
  FilterSecurityInterceptor.doFilter(ServletRequest, ServletResponse,
FilterChain) line: 72
  FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest,
ServletResponse) line: 274
  ExceptionTranslationFilter.doFilter(ServletRequest, ServletResponse,
FilterChain) line: 110
  FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest,
ServletResponse) line: 274
  AnonymousProcessingFilter.doFilter(ServletRequest, ServletResponse,
FilterChain) line: 125
  FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest,
ServletResponse) line: 274
  BasicProcessingFilter.doFilter(ServletRequest, ServletResponse,
FilterChain) line: 178
  FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest,
ServletResponse) line: 274
  HttpSessionContextIntegrationFilter.doFilter(ServletRequest,
ServletResponse, FilterChain) line: 229
  FilterChainProxy$VirtualFilterChain.doFilter(ServletRequest,
ServletResponse) line: 274
  FilterChainProxy.doFilter(ServletRequest, ServletResponse, FilterChain)
line: 148
  FilterToBeanProxy.doFilter(ServletRequest, ServletResponse,
FilterChain) line: 98
  ServletHandler$CachedChain.doFilter(ServletRequest, ServletResponse)
line: 1045
  LoggingFilter.doFilter(ServletRequest, ServletResponse, FilterChain)
line: 69
  ServletHandler$CachedChain.doFilter(ServletRequest, ServletResponse)
line: 1045
  GZIPFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 47
  ServletHandler$CachedChain.doFilter(ServletRequest, ServletResponse)
line: 1045
  ServletHandler.handle(String, HttpServletRequest, HttpServletResponse,
int) line: 358
  SessionHandler.handle(String, HttpServletRequest, HttpServletResponse,
int) line: 231
  WebAppContext(ContextHandler).handle(String, HttpServletRequest,
HttpServletResponse, int) line: 629
  WebAppContext.handle(String, HttpServletRequest, HttpServletResponse,
int) line: 453
  Server(HandlerWrapper).handle(String, HttpServletRequest,
HttpServletResponse, int) line: 141
  Server.handle(HttpConnection) line: 303
  HttpConnection.handleRequest() line: 452
  HttpConnection$RequestHandler.headerComplete() line: 721
  HttpParser.parseNext() line: 509
  HttpParser.parseAvailable() line: 209
  HttpConnection.handle() line: 349
  SocketConnector$Connection.run() line: 217
  BoundedThreadPool$PoolThread.run() line: 475

The request is just:
http://localhost:8080/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=topp:states&propertyName=STATE_NAME,PERSONS

Hum, this is quite shocking: the xsd module is converting a
feature collection into an in memory Feature because the
FeatureArrayPropertyTypeBinding is getting used.
Of course this means we would OOM in all big GetFeature requests.

Worried, it this something happening on 1.6.x as well or
a side effect of the xlink work?

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

!DSPAM:4007,479dade288101431913854!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org