Skip to content

selftest fails in ImagingUnpackRGB #3408

Description

@jmcp

What did you do?

Running the Pillow test suite with 64bit Python 2.7.14 on Solaris 11.4 (SPARC - only) we get a failure down in the ImagingUnpackRGB function

$ pstack core |grep /builds
   [ /builds/jmcp/userland/trunk/components/python/pillow/build/prototype/sparc/usr/lib/python2.7/vendor-packages/PIL/Image.py:824 (load) ]
   [ /builds/jmcp/userland/trunk/components/python/pillow/build/prototype/sparc/usr/lib/python2.7/vendor-packages/PIL/ImageFile.py:269 (load_prepare) ]
   [ /builds/jmcp/userland/trunk/components/python/pillow/build/prototype/sparc/usr/lib/python2.7/vendor-packages/PIL/ImageFile.py:196 (load) ]

For Pillow v5.3.0, Image.py#824 is

  822         if self.im and self.palette and self.palette.dirty:
  823             # realize palette
  824             self.im.putpalette(*self.palette.getdata())

What did you expect to happen?

We expect the test suite to pass with each version of Python, and for Python2.7, in both 32- and 64-bit modes. The test suite passes with Python v3.x on both SPARC and X64, and with Python2.7 in both 32- and 64-bit modes on Solaris 11.4 on the X64 architecture.

What actually happened?

The process terminated with a bus error:

sparc-kz:Pillow-5.3.0 $ mdb core
Loading modules: [ libc.so.1 libpython2.7.so.1.0 ld.so.1 ]
python2.7:core> ::status
debugging core file of python2.7 (64-bit) from slitheen
file: /usr/bin/sparcv9/python2.7
initial argv: /usr/bin/sparcv9/python2.7 ./selftest.py
threading model: raw lwps
status: process terminated by SIGBUS (Bus Error), addr=5cb4f8c067

What are your OS, Python and Pillow versions?

  • OS: Solaris 11.4, on SPARC
  • Python: 2.7.14 - 64bit
  • Pillow: 5.1.0, 5.3.0

If desired, I can upload the sparcv9 corefile - it's 17Mb after gzip -9.

Activity

  1. kulikjak commented on May 20, 2019

    @kulikjak
    Contributor

    We recently found out that it doesn't only affect 64bit Python 2.7, but all 64bit Python runtimes (3.x versions). And since it is a memory alignment issue, it might very well break 32bit as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions