Page MenuHomePhabricator

Failing Thumbor PDF build test (JPX)
Closed, ResolvedPublic

Description

Trying out the latest version of thumbor-plugins on my WMCS build test Jessie machine, I noticed that a test from the Debian package build test suite is now failing:

thumbor: DEBUG: [ShellRunner] Command: ['/usr/bin/timeout', '--foreground', '60', '/usr/bin/gs', '-sDEVICE=jpeg', '-dJPEG=90', '-sOutputFile=%stdout', '-dFirstPage=19', '-dLastPage=19', '-r150', '-dBATCH', '-dNOPAUSE', '-dSAFER', '-q', '-f/tmp/tmp73uNcZ']
thumbor: DEBUG: [ShellRunner] Stdout: <too long to display (16245 bytes)>
thumbor: DEBUG: [ShellRunner] Stderr: unable to decode JPX image data.

   **** Warning: File has insufficient data for an image.
unable to decode JPX image data.

   **** Warning: File has insufficient data for an image.

   **** This file had errors that were repaired or ignored.
   **** The file was produced by: 
   **** >>>> Recoded by LuraDocument PDF v2.28 <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

The test media file is Jeremy_Bentham.pdf

This error is something specific to the version of Ghostscript we use on Jessie: T188122

How did the test ever pass? Did we have a more recent of Ghostscript on Jessie machines at some point and that went away? Has the test failed for a while and it hasn't prevented the Debian package from being built?

Event Timeline

Gilles triaged this task as Medium priority.Feb 5 2019, 11:29 AM

My best guess is that a security update of the Jessie version of ghostscript (there have been several in 2018) broke support for PDFs containing JPX image data. I will make these tests Stretch-only.

Gilles renamed this task from Failing Thumbor build test to Failing Thumbor PDF build test (JPX).Feb 5 2019, 12:05 PM

Change 488033 had a related patch set uploaded (by Gilles; owner: Gilles):
[operations/software/thumbor-plugins@master] Skip PDF JPX test on Jessie

https://gerrit.wikimedia.org/r/488033

Change 488033 merged by Gilles:
[operations/software/thumbor-plugins@master] Skip PDF JPX test on Jessie

https://gerrit.wikimedia.org/r/488033

Change 488060 had a related patch set uploaded (by Gilles; owner: Gilles):
[operations/debs/python-thumbor-wikimedia@master] Upgrade to 2.3

https://gerrit.wikimedia.org/r/488060

@Gilles We will upgrade Ghostscript, in the jessie hosts, to version to 9.26 this week. In theory this upgrade will fix this?

I heard from Moritz after writing this. Hopefully, it should fix the bug, yes.

I reverted the change, as expected the test works on Jessie once again.