Uploaded image for project: 'GeoServer'
  1. GEOS-8687

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.14-RC
    • Component/s: WCS
    • Labels:
      None

      Description

      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.

      Solution ideas:

      • Move the granuleStack interface to core, and have the cleaner callback recognize it and clean each single coverage in it
      • Make GranuleStackImple return a RenderedImageList and have CoverageCleanerCallback recognize and handle it correctly

        Attachments

          Activity

            People

            • Assignee:
              aaime Andrea Aime
              Reporter:
              aaime Andrea Aime
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: