Uploaded image for project: 'Jira Server and Data Center'
  1. Jira Server and Data Center
  2. JRASERVER-45340

Failing to generate a thumbnail should remember that the operation failed




      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.


      If an exception occurs during the processing of a thumbnail (such as a corrupt jpg), JIRA will not record the failure, and the next time the resource is requested, it will generate it (and fail) again.

      Typically on those issue that failed due to the condition:

      2015-09-11 21:24:41.272460500 2015-09-11 21:24:41,267 ajp-nio- WARN sysadmin 1283x137820x1 t77wfs, /browse/DD-108 [c.a.j.issue.thumbnail.DefaultThumbnailManager] Error writing to thumbnail file: /data/jirastudio/jira/home/data/attachments/TEST/10000/TEST-108/thumbs/_thumb_45662.png1391332809470942590.tmp
      2015-09-11 21:24:41.272467500 com.atlassian.jira.issue.attachment.AttachmentReadException: Remote blobstore couldn't provide an input stream for attachment 45662: java.awt.image.RasterFormatException: (y + height) is outside of Raster
      2015-09-11 21:24:41.272795500 	at sun.awt.image.ByteInterleavedRaster.createWritableChild(ByteInterleavedRaster.java:1248)
      2015-09-11 21:24:41.272796500 	at sun.awt.image.ByteInterleavedRaster.createChild(ByteInterleavedRaster.java:1208)
      2015-09-11 21:24:41.272797500 	at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader.readImageAsRasterAndReplaceColorProfile(Unknown Source)
      2015-09-11 21:24:41.272800500 	at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader.read(Unknown Source)
      2015-09-11 21:24:41.272800500 	at com.atlassian.core.util.thumbnail.Thumber.scaleImage(Thumber.java:231)
      2015-09-11 21:24:41.272800500 	at com.atlassian.core.util.thumbnail.Thumber.createThumbnail(Thumber.java:291)
      2015-09-11 21:24:41.272812500 	at com.atlassian.core.util.thumbnail.Thumber.retrieveOrCreateThumbNail(Thumber.java:270)

      Expected Result

      This should be tracked even in the event of catastrophic failure (such as OOME taking down the application), and thus the attempt should be recorded and committed before the attempt, not after.

      When it fails, it should disable the thumbnail from being generated again by marking thumbnailable on the fileattachment table to 0

      Actual Result

      It will take a very long time to load the issue, and fail the page load. Multiple reload will still hit into the same issue. Potential piling up the memory if it keeps loaded.


      Identify from the error message which image is causing the error, for example in the above error it is image id 45662. Shut down JIRA, take a backup of the database and then run:

      update fileattachment set thumbnailable = 0 where id in (<image ids you identified above>)


        Issue Links



              ohernandez@atlassian.com Oswaldo Hernandez (Inactive)
              hmurn metrics
              2 Vote for this issue
              20 Start watching this issue