[Geoserver-devel] [JIRA] (GEOS-8687) WCS multidimensional requests (NetCDF/Grib outputs) may lead to un-closed readers and eventually OOMs

Andrea Aime created an issue

GeoServer / BugGEOS-8687

WCS multidimensional requests (NetCDF/Grib outputs) may lead to un-closed readers and eventually OOMs

Issue Type:

BugBug

Assignee:

Unassigned

Components:

WCS

Created:

16/Apr/18 6:57 PM

Priority:

MediumMedium

Reporter:

Andrea Aime

Multidimensional outputs make WCS generate a GranuleStackImpl as the output “coverage”.
This plays badly with the coverage cleanup code here:
https://github.com/geoserver/geoserver/blob/cd45206f93c4c42388484b4a2a96bd469fde698f/src/wcs/src/main/java/org/geoserver/wcs/CoverageCleanerCallback.java#L68
because the GranuleStackImpl.getRenderedImage returns null:
https://github.com/geoserver/geoserver/blob/7076e763387f0f682d05959e5b2d10442be12cf2/src/wcs2_0/src/main/java/org/geoserver/wcs2_0/response/GranuleStackImpl.java#L101

thus preventing the “recursive cleanup” code that also ends up closing readers and the like (because it’s based on the RenderedImage, not the coverage)

Indeed I don’t see NetCDFImageReader.dispose ever being called in a debugger, while doing requests over NetCDF inputs doing multi-coverage NetCDF outputs.

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100082-sha1:c5202d1)

Atlassian logo