** Description changed:

+ [ Impact ]
+ 
+  * On releases preceding the release of fix to LP: #2075313 rebuild of
+ qpdf on s390x will cause a test failure due to expected output mismatch.
+ 
+ * The difference affects only a single test (qpdf/qtest/specific-bugs.test, 
case fuzz-16214):
+ -WARNING: fuzz-16214.pdf (offset 7207): error decoding stream data for object 
2 0: stream inflate: inflate: data: invalid code lengths set
+ +WARNING: fuzz-16214.pdf (offset 7207): error decoding stream data for object 
2 0: stream inflate: inflate: data: Operation-Ending-Supplemental Code is 0x27
+ 
+ * The difference is caused by the fact that prior to fix to LP: #2075313
+ zlib used hardware acceleration for inflate on s390x. This causes a
+ slightly different error message provided from zlib.
+ 
+ [ Test Plan ]
+ 
+  * Run a rebuild of any qpdf source from Jammy or Noble on s390x.
+ 
+  * The rebuild will fail pointing to the following difference in the expected 
test output:
+ -WARNING: fuzz-16214.pdf (offset 7207): error decoding stream data for object 
2 0: stream inflate: inflate: data: invalid code lengths set
+ +WARNING: fuzz-16214.pdf (offset 7207): error decoding stream data for object 
2 0: stream inflate: inflate: data: Operation-Ending-Supplemental Code is 0x27
+ 
+ [ Where problems could occur ]
+ 
+  * The fix to that is to provide a different file with output from this
+ test tailored for s390x. It does not alter any parts of the
+ implementation of qpdf.
+ 
+ * If zlib behavior changes for s390x for any reason (e.g. because of
+ removing the said library) the test will start failing again. This will
+ require removal of this fix and fallback to the default expected test
+ output.
+ 
+ [ Other Info ]
+ 
+  * Original bug description:
+ 
  During my recent work on LP: #2129676 I discovered that on jammy and
  noble there's a qpdf test failing (processing fuzz-16214.pdf)
  consistently on s390x. The issue also happens for qpdf that's currently
  in the archive (without my patches).
  
  This is in the build log:
  ```
  Running /<<PKGBUILDDIR>>/qpdf/qtest/specific-bugs.test
  specific-bugs test 23 (stream in object stream) FAILED
  cwd: /<<PKGBUILDDIR>>/qpdf/qtest/qpdf
  command: qpdf --preserve-unreferenced fuzz-16214.pdf a.pdf
  expected output in fuzz-16214.out
   at specific-bugs.test line 74.
  --> BEGIN EXPECTED OUTPUT <--
  WARNING: fuzz-16214.pdf: can't find PDF header
  WARNING: fuzz-16214.pdf (xref stream: object 5 0, offset 124): stream 
dictionary lacks /Length key
  WARNING: fuzz-16214.pdf (xref stream: object 5 0, offset 353): attempting to 
recover stream length
  WARNING: fuzz-16214.pdf (xref stream: object 5 0, offset 353): recovered 
stream length: 722
  WARNING: fuzz-16214.pdf (xref stream, offset 116): Cross-reference stream 
data has the wrong size; expected = 92; actual = 196
  WARNING: fuzz-16214.pdf: reported number of objects (6) is not one plus the 
highest object number (35)
  WARNING: fuzz-16214.pdf (object 14 0, offset 652): expected dictionary key 
but found non-name object; inserting key /QPDFFake1
  WARNING: fuzz-16214.pdf (object 14 0, offset 734): expected endobj
  WARNING: fuzz-16214.pdf: file is damaged
  WARNING: fuzz-16214.pdf (object 1 0, offset 7189): expected n n obj
  WARNING: fuzz-16214.pdf: Attempting to reconstruct cross-reference table
  WARNING: fuzz-16214.pdf (offset 7207): error decoding stream data for object 
2 0: stream inflate: inflate: data: invalid code lengths set
  WARNING: fuzz-16214.pdf (offset 7207): getStreamData called on unfilterable 
stream
  WARNING: fuzz-16214.pdf (object 11 0, offset 11551): supposed object stream 5 
has wrong type
  WARNING: fuzz-16214.pdf (object 11 0, offset 11551): object stream 5 has 
incorrect keys
  WARNING: fuzz-16214.pdf (object 21 0, offset 3639): expected endstream
  WARNING: fuzz-16214.pdf (object 21 0, offset 3112): attempting to recover 
stream length
  WARNING: fuzz-16214.pdf (object 21 0, offset 3112): recovered stream length: 
340
  WARNING: fuzz-16214.pdf, stream object 8 0: stream found inside object 
stream; treating as null
  WARNING: fuzz-16214.pdf, stream object 8 0: stream found inside object 
stream; treating as null
  qpdf: operation succeeded with warnings; resulting file may have some problems
  --> END EXPECTED OUTPUT <--
  --> BEGIN ACTUAL OUTPUT <--
  WARNING: fuzz-16214.pdf: can't find PDF header
  WARNING: fuzz-16214.pdf (xref stream: object 5 0, offset 124): stream 
dictionary lacks /Length key
  WARNING: fuzz-16214.pdf (xref stream: object 5 0, offset 353): attempting to 
recover stream length
  WARNING: fuzz-16214.pdf (xref stream: object 5 0, offset 353): recovered 
stream length: 722
  WARNING: fuzz-16214.pdf (xref stream, offset 116): Cross-reference stream 
data has the wrong size; expected = 92; actual = 196
  WARNING: fuzz-16214.pdf: reported number of objects (6) is not one plus the 
highest object number (35)
  WARNING: fuzz-16214.pdf (object 14 0, offset 652): expected dictionary key 
but found non-name object; inserting key /QPDFFake1
  WARNING: fuzz-16214.pdf (object 14 0, offset 734): expected endobj
  WARNING: fuzz-16214.pdf: file is damaged
  WARNING: fuzz-16214.pdf (object 1 0, offset 7189): expected n n obj
  WARNING: fuzz-16214.pdf: Attempting to reconstruct cross-reference table
  WARNING: fuzz-16214.pdf (offset 7207): error decoding stream data for object 
2 0: stream inflate: inflate: data: Operation-Ending-Supplemental Code is 0x27
  WARNING: fuzz-16214.pdf (offset 7207): getStreamData called on unfilterable 
stream
  WARNING: fuzz-16214.pdf (object 11 0, offset 11551): supposed object stream 5 
has wrong type
  WARNING: fuzz-16214.pdf (object 11 0, offset 11551): object stream 5 has 
incorrect keys
  WARNING: fuzz-16214.pdf (object 21 0, offset 3639): expected endstream
  WARNING: fuzz-16214.pdf (object 21 0, offset 3112): attempting to recover 
stream length
  WARNING: fuzz-16214.pdf (object 21 0, offset 3112): recovered stream length: 
340
  WARNING: fuzz-16214.pdf, stream object 8 0: stream found inside object 
stream; treating as null
  WARNING: fuzz-16214.pdf, stream object 8 0: stream found inside object 
stream; treating as null
  qpdf: operation succeeded with warnings; resulting file may have some problems
  --> END ACTUAL OUTPUT <--
  --> DIFF EXPECTED ACTUAL <--
  --- /tmp/testtemp.12181/expected      2025-11-18 14:23:43.084271280 +0000
  +++ /tmp/testtemp.12181/actual        2025-11-18 14:23:43.084271280 +0000
  @@ -9,7 +9,7 @@
   WARNING: fuzz-16214.pdf: file is damaged
   WARNING: fuzz-16214.pdf (object 1 0, offset 7189): expected n n obj
   WARNING: fuzz-16214.pdf: Attempting to reconstruct cross-reference table
  -WARNING: fuzz-16214.pdf (offset 7207): error decoding stream data for object 
2 0: stream inflate: inflate: data: invalid code lengths set
  +WARNING: fuzz-16214.pdf (offset 7207): error decoding stream data for object 
2 0: stream inflate: inflate: data: Operation-Ending-Supplemental Code is 0x27
   WARNING: fuzz-16214.pdf (offset 7207): getStreamData called on unfilterable 
stream
   WARNING: fuzz-16214.pdf (object 11 0, offset 11551): supposed object stream 
5 has wrong type
   WARNING: fuzz-16214.pdf (object 11 0, offset 11551): object stream 5 has 
incorrect keys
  --> END DIFFERENCES <--
  
  ```
  
  There has to be something s390x specific making it behave in a different
  way in that environment. Every other architecture I tested (basically
  everything I had available in PPA) was executing tests correctly.
  
  Newer releases (Plucky+) work fine. I'm looking for an opportunity to
  bisect it on s390x.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2131944

Title:
  qpdf fuzz-16214 test failing on s390x

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qpdf/+bug/2131944/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to