Test fails on s390 (big endian) #79

Open
opened 3 years ago by josch · 1 comments
josch commented 3 years ago
Owner

By Georg Sauthoff on 2020-06-26T20:52:51.922Z

Some img2pdf tests fail under Linux s390:

+ echo 'Test 6/51 PNG RGB16'
Test 6/51 PNG RGB16
+ grep --quiet '^  Format: PNG (Portable Network Graphics)$'
+ identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png
+ grep --quiet '^  Mime type: image/png$'
+ identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png
+ grep --quiet '^  Geometry: 60x60+0+0$'
+ identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png
+ grep --quiet '^  Colorspace: sRGB$'
+ identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png
+ grep --quiet '^  Type: TrueColor$'
+ identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png
+ grep --quiet '^  Depth: 16-bit$'
+ identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png
+ grep --quiet '^  Page geometry: 60x60+0+0$'
+ identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png
+ grep --quiet '^  Compression: Zip$'
+ identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png
+ grep --quiet '^    png:IHDR.bit-depth-orig: 16$'
+ identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png
+ grep --quiet '^    png:IHDR.bit_depth: 16$'
+ identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png
+ grep --quiet '^    png:IHDR.color-type-orig: 2$'
+ identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png
+ grep --quiet '^    png:IHDR.color_type: 2 (Truecolor)$'
+ identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png
+ grep --quiet '^    png:IHDR.interlace_method: 0 (Not interlaced)$'
+ identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png
+ img2pdf /tmp/img2pdf.pL0XmOot08/normal16.png /tmp/img2pdf.pL0XmOot08/out.pdf
+ python3 src/img2pdf.py -v --without-pdfrw --producer= --nodate /tmp/img2pdf.pL0XmOot08/normal16.png
DEBUG:PIL.PngImagePlugin:STREAM b'IHDR' 16 13
DEBUG:PIL.PngImagePlugin:STREAM b'IDAT' 41 21671
DEBUG:root:imgformat = PNG
DEBUG:root:input dpi = 96 x 96
DEBUG:root:rotation = 0°
DEBUG:root:input colorspace = RGB
DEBUG:root:width x height = 60px x 60px
DEBUG:root:read_images() embeds a PNG
+ compare_ghostscript /tmp/img2pdf.pL0XmOot08/out.pdf /tmp/img2pdf.pL0XmOot08/normal16.png tiff48nc
+ pdf=/tmp/img2pdf.pL0XmOot08/out.pdf
+ img=/tmp/img2pdf.pL0XmOot08/normal16.png
+ gsdevice=tiff48nc
+ gs -dQUIET -dNOPAUSE -dBATCH -sDEVICE=tiff48nc -r96 -sOutputFile=/tmp/img2pdf.pL0XmOot08/gs-%00d.png /tmp/img2pdf.pL0XmOot08/out.pdf
+ compare -metric AE /tmp/img2pdf.pL0XmOot08/normal16.png /tmp/img2pdf.pL0XmOot08/gs-1.png null:
+ error
+ echo test 6 failed
test 6 failed
+ echo intermediate data is left in /tmp/img2pdf.pL0XmOot08
intermediate data is left in /tmp/img2pdf.pL0XmOot08
+ exit 1
error: Bad exit status from /var/tmp/rpm-tmp.NM8LJu (%check)
RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.NM8LJu (%check)
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.8/site-packages/mockbuild/util.py", line 776, in do_with_status
    raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode)
mockbuild.exception.Error: Command failed: 
 # bash --login -c /usr/bin/rpmbuild -bb --target noarch --nodeps /builddir/build/SPECS/python-img2pdf.spec

cf. https://kojipkgs.fedoraproject.org//work/tasks/8512/46228512/build.log

Note that s390 is a big endian architecture.

Yes, s390 is one of the architectures supported by Fedora. ;)


By josch on 2020-06-26T21:08:46.325Z


At least this time it's not a Fedora-only issue -- I can reproduce it on s390x on Debian as well. I'm investigating...


By josch on 2020-06-26T21:39:09.320Z


This is not a bug in img2pdf but a bug in imagemagick on s390x.

Take these two images:

gs-1
normal16

md5sums:

d8edb7c0176a827c445d3b27ec905a54  gs-1.tiff
6ad810399058a87d8145d8d9a7734da5  normal16.png

On my amd64 system, the following command succeeds:

compare -metric AE gs-1.tiff normal16.png null:

On s390x though, imagemagick finds 2862 different pixels.


By Georg Sauthoff on 2020-06-27T19:34:17.743Z


Interesting. Do you care to report this to upstream ImageMagick?

My current plan: I'll report thie ImageMagick s390 issue in the Fedora bug tracker and then exclude img2pdf from s390 builds until ImageMagick is fixed.


By josch on 2020-08-04T10:50:27.623Z


I reported it now here:
https://github.com/ImageMagick/ImageMagick6/issues/92

*By Georg Sauthoff on 2020-06-26T20:52:51.922Z* Some img2pdf tests fail under Linux s390: ``` + echo 'Test 6/51 PNG RGB16' Test 6/51 PNG RGB16 + grep --quiet '^ Format: PNG (Portable Network Graphics)$' + identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png + grep --quiet '^ Mime type: image/png$' + identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png + grep --quiet '^ Geometry: 60x60+0+0$' + identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png + grep --quiet '^ Colorspace: sRGB$' + identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png + grep --quiet '^ Type: TrueColor$' + identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png + grep --quiet '^ Depth: 16-bit$' + identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png + grep --quiet '^ Page geometry: 60x60+0+0$' + identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png + grep --quiet '^ Compression: Zip$' + identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png + grep --quiet '^ png:IHDR.bit-depth-orig: 16$' + identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png + grep --quiet '^ png:IHDR.bit_depth: 16$' + identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png + grep --quiet '^ png:IHDR.color-type-orig: 2$' + identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png + grep --quiet '^ png:IHDR.color_type: 2 (Truecolor)$' + identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png + grep --quiet '^ png:IHDR.interlace_method: 0 (Not interlaced)$' + identify -verbose /tmp/img2pdf.pL0XmOot08/normal16.png + img2pdf /tmp/img2pdf.pL0XmOot08/normal16.png /tmp/img2pdf.pL0XmOot08/out.pdf + python3 src/img2pdf.py -v --without-pdfrw --producer= --nodate /tmp/img2pdf.pL0XmOot08/normal16.png DEBUG:PIL.PngImagePlugin:STREAM b'IHDR' 16 13 DEBUG:PIL.PngImagePlugin:STREAM b'IDAT' 41 21671 DEBUG:root:imgformat = PNG DEBUG:root:input dpi = 96 x 96 DEBUG:root:rotation = 0° DEBUG:root:input colorspace = RGB DEBUG:root:width x height = 60px x 60px DEBUG:root:read_images() embeds a PNG + compare_ghostscript /tmp/img2pdf.pL0XmOot08/out.pdf /tmp/img2pdf.pL0XmOot08/normal16.png tiff48nc + pdf=/tmp/img2pdf.pL0XmOot08/out.pdf + img=/tmp/img2pdf.pL0XmOot08/normal16.png + gsdevice=tiff48nc + gs -dQUIET -dNOPAUSE -dBATCH -sDEVICE=tiff48nc -r96 -sOutputFile=/tmp/img2pdf.pL0XmOot08/gs-%00d.png /tmp/img2pdf.pL0XmOot08/out.pdf + compare -metric AE /tmp/img2pdf.pL0XmOot08/normal16.png /tmp/img2pdf.pL0XmOot08/gs-1.png null: + error + echo test 6 failed test 6 failed + echo intermediate data is left in /tmp/img2pdf.pL0XmOot08 intermediate data is left in /tmp/img2pdf.pL0XmOot08 + exit 1 error: Bad exit status from /var/tmp/rpm-tmp.NM8LJu (%check) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.NM8LJu (%check) Child return code was: 1 EXCEPTION: [Error()] Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) File "/usr/lib/python3.8/site-packages/mockbuild/util.py", line 776, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -bb --target noarch --nodeps /builddir/build/SPECS/python-img2pdf.spec ``` cf. https://kojipkgs.fedoraproject.org//work/tasks/8512/46228512/build.log Note that s390 is a big endian architecture. Yes, s390 is one of the architectures supported by Fedora. ;) --- *By josch on 2020-06-26T21:08:46.325Z* --- At least this time it's not a Fedora-only issue -- I can reproduce it on s390x on Debian as well. I'm investigating... --- *By josch on 2020-06-26T21:39:09.320Z* --- This is not a bug in img2pdf but a bug in imagemagick on s390x. Take these two images: ![gs-1](/uploads/b6c682ff74233d4b4e3d42e5a23dd45e/gs-1.tiff) ![normal16](/uploads/23ea78a396a7941943ecaf75c9b34a87/normal16.png) md5sums: ``` d8edb7c0176a827c445d3b27ec905a54 gs-1.tiff 6ad810399058a87d8145d8d9a7734da5 normal16.png ``` On my amd64 system, the following command succeeds: compare -metric AE gs-1.tiff normal16.png null: On s390x though, imagemagick finds 2862 different pixels. --- *By Georg Sauthoff on 2020-06-27T19:34:17.743Z* --- Interesting. Do you care to report this to upstream ImageMagick? My current plan: I'll report thie ImageMagick s390 issue in the Fedora bug tracker and then exclude img2pdf from s390 builds until ImageMagick is fixed. --- *By josch on 2020-08-04T10:50:27.623Z* --- I reported it now here: https://github.com/ImageMagick/ImageMagick6/issues/92
josch added the
forwarded
label 11 months ago
gms commented 4 months ago

FWIW, a few years ago I excluded img2pdf from s390x builds.

For years nobody from the Fedora/Redhat s390x team looked into any reported ImageMagick issues.

I think it's fair to say that s390x is an utterly niche and esoteric platform.
Also it's the last (very tiny) big-endian holdout.

Thus, I think it makes sense to close this issue, as there isn't much we can do.

FWIW, a few years ago I excluded img2pdf from s390x builds. For years nobody from the Fedora/Redhat s390x team looked into any reported ImageMagick issues. I think it's fair to say that s390x is an utterly niche and esoteric platform. Also it's the last (very tiny) big-endian holdout. Thus, I think it makes sense to close this issue, as there isn't much we can do.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: josch/img2pdf#79
Loading…
There is no content yet.