ImageMagick: please pull in patch to stabilize API on s390x during upgrade to glibc 2.33 (Ubuntu 21.04)

Bug #1913268 reported by bugproxy
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
Undecided
Skipper Bug Screeners
imagemagick (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

On s390x, the type float_t has historically been defined as double for no good reason, yet with unexpected and unnecessary impact on performance in some scenarios. glibc 2.33 will be a first step towards cleaning that up, which will change float_t to become float on s390x when compiling with compiler flags as used in the ImageMagick binary. That would break the ABI of ImageMagick for HDRI=1 on s390x for existing binaries.

To avoid that breakage, ImageMagick upstream has fixed the relevant internal type to always be double on s390x since version 7.0.10-39, so that the API/ABI for HDRI=1 remains as it is today, independent of a change in float_t. The merged patch can trivially be backported to ImageMagick version 6.9.x in Ubuntu today (will apply a patch; original PR https://github.com/ImageMagick/ImageMagick/pull/2832).

Background: Today's combination of gcc's default behavior and float_t being double on s390x contradicts the C standard. ImageMagick captures the sizeof(float_t) at compile-time of the library in magick-baseconfig.h. Headers then define MagickFloatType to match. For 8-bit and 16-bit depths and HDRI=1, that MagickFloatType is used as the type for pixels's color channels (i.e., Quantum).

Changes to float_t thus would result in a different ABI. Once ImageMagick is rebuilt with HDRI=1 and an updated gcc/glibc, Quantum would then become 32-bit float. Existing binaries and libraries would expect 64-bit double and thus cease to work with newly built version of the library.

Upstream commit with fixed path (MagickCore/magick-type.h -> magick/magick-type.h)

This minor patch avoids interoperability issues with the adoption of glibc 2.33. that glibc release contains one component for cleaning up float_t on s390x, which will eventually reduce performance overhead.

Revision history for this message
bugproxy (bugproxy) wrote : Backport of upstream commit to imagemagick 6.9.10

Default Comment by Bridge

tags: added: architecture-s3903164 bugnameltc-191024 severity-medium targetmilestone-inin2104
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: ubuntu → imagemagick (Ubuntu)
Revision history for this message
Frank Heimes (fheimes) wrote :

glibc 2.33 ist not released yet (expected for Feb 1st 2021) - hence need to check plans first if this is relevant for 21.04

Changed in ubuntu-z-systems:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
Changed in imagemagick (Ubuntu):
assignee: Skipper Bug Screeners (skipper-screen-team) → nobody
status: New → Incomplete
Changed in ubuntu-z-systems:
status: New → Incomplete
Revision history for this message
Frank Heimes (fheimes) wrote :

it's planned to bump glibc to 2.33
( see snapshot: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/4017/+packages )

Changed in ubuntu-z-systems:
status: Incomplete → Triaged
Steve Langasek (vorlon)
tags: added: fr-1086
Revision history for this message
Matthias Klose (doko) wrote :

if the ABI changes without changing the soname, we should rename the library packages.

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 1913268] Re: ImageMagick: please pull in patch to stabilize API on s390x during upgrade to glibc 2.33 (Ubuntu 21.04)

On Wed, Jan 27, 2021 at 06:58:36PM -0000, Matthias Klose wrote:
> if the ABI changes without changing the soname, we should rename the
> library packages.

Yes, but AIUI the intent here is to change the imagemagick source so that
the ABI does not change as a result of a rebuild with a newer glibc, no?

Changed in imagemagick (Ubuntu):
status: Incomplete → In Progress
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package imagemagick - 8:6.9.10.23+dfsg-2.1ubuntu16

---------------
imagemagick (8:6.9.10.23+dfsg-2.1ubuntu16) hirsute; urgency=medium

  * Fix imagemagick ABI before glibc change to float_t. LP: #1913268

 -- Dimitri John Ledkov <email address hidden> Mon, 01 Feb 2021 10:17:13 +0000

Changed in imagemagick (Ubuntu):
status: In Progress → Fix Released
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: In Progress → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2021-02-11 03:29 EDT-------
IBM Bugzilla status->closed, Fix Released with hirsuit

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.