[Ubuntu 20.04] zlib: inflateSyncPoint() returns an incorrect result on z15

Bug #1899621 reported by bugproxy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
High
Skipper Bug Screeners
zlib (Ubuntu)
Fix Released
Critical
Skipper Bug Screeners
Focal
Fix Released
Critical
Unassigned
Groovy
Fix Released
Critical
Skipper Bug Screeners

Bug Description

Description: zlib: inflateSyncPoint() returns an incorrect result on z15
Symptom: Certain rsync builds fail with "error in rsync protocol data
               stream" on z15.
Problem: inflateSyncPoint() does not take into account the hardware
               compression state and returns an incorrect result.
Solution: Make inflateSyncPoint() fail if the hardware compression is on.
               The hardware does not provide enough information in order to
               implement this function.

[Impact]

 * Certain rsync builds fail with "error in rsync protocol data stream" on z15.

 * On ubuntu, rsync normally uses zstd or lz4. But when rsync is forced to use non-default zlib compression (-z flag) it uses inflateSyncPoint() API. This can also happen when rsync on the the other end doesn't support zstd & lz4.

 * inflateSyncPoint() does not take into account the hardware compression state and returns an incorrect result.

 * Make inflateSyncPoint() fail if the hardware compression is on. The hardware does not provide enough information in order to implement this function.

 * Above makes rsync to succeed, when zlib uses hardware compression.

[Test Case]

Reproduction: z15 only: printf 1 >1 && rsync -z 1 2

[Regression Potential]

 * inflateSyncPoint API is rarely used. Scanning codesearch, there is a lot of false positives due to embedded copies of zlib in all the things. I do see that both rsync and backuppc-rsync use it. It used during a safety check to ensure that algorithm is not at a sync point (or that cannot be determined). Nonetheless, returning error is a safer implementation for this API call.

[Other Info]

 * This is a regression introduced by adding & enabling zlib hw acceleration by default on z15; and discovering using rsync that one API is implemented incorrectly.

Revision history for this message
bugproxy (bugproxy) wrote : patch

Default Comment by Bridge

tags: added: architecture-s39064 bugnameltc-188656 severity-high targetmilestone-inin2004
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: ubuntu → zlib (Ubuntu)
Changed in ubuntu-z-systems:
importance: Undecided → High
Changed in zlib (Ubuntu Groovy):
importance: Undecided → Critical
Changed in zlib (Ubuntu Focal):
importance: Undecided → Critical
Changed in zlib (Ubuntu Groovy):
milestone: none → ubuntu-20.10
Changed in zlib (Ubuntu Focal):
milestone: none → focal-updates
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
Changed in zlib (Ubuntu Groovy):
milestone: ubuntu-20.10 → groovy-updates
description: updated
description: updated
Changed in zlib (Ubuntu Focal):
status: New → In Progress
Changed in zlib (Ubuntu Groovy):
status: New → In Progress
Revision history for this message
Frank Heimes (fheimes) wrote :
Revision history for this message
Frank Heimes (fheimes) wrote :

Same for focal:
https://launchpad.net/ubuntu/focal/+queue?queue_state=3&queue_text=zlib1g
zlib1g | 1:1.2.11.dfsg-2ubuntu1.1 | focal-updates | s390x

(groovy:
zlib1g | 1:1.2.11.dfsg-2ubuntu4 | groovy-proposed | s390x )

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2020-10-19 11:38 EDT-------
zlib1g_1.2.11.dfsg-2ubuntu4_s390x.deb passes all of my tests.

1:1.2.11.dfsg-2ubuntu1.1 though looks old (Thu, 20 Aug 2020) - am I missing something?

Revision history for this message
Frank Heimes (fheimes) wrote :

1.2.11.dfsg-2ubuntu4 is the latest package that incl. the patch

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2020-10-19 13:57 EDT-------
Will 1.2.11.dfsg-2ubuntu4 ultimately go into both 20.04 and 20.10? If yes, then everything is OK.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zlib - 1:1.2.11.dfsg-2ubuntu4

---------------
zlib (1:1.2.11.dfsg-2ubuntu4) groovy; urgency=medium

  * Cherrypick update of s390x hw acceleration #410 pull request patch,
    which corrects inflateSyncPoint() return value to always gracefully
    fail when hw acceleration is in use. This fixes rsync failure with
    zlib compression on hw accelerated s390x. LP: #1899621

 -- Dimitri John Ledkov <email address hidden> Thu, 15 Oct 2020 11:01:38 +0100

Changed in zlib (Ubuntu Groovy):
status: In Progress → Fix Released
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: New → In Progress
no longer affects: ubuntu-release-notes
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello bugproxy, or anyone else affected,

Accepted zlib into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/zlib/1:1.2.11.dfsg-2ubuntu1.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in zlib (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2020-10-21 07:25 EDT-------
zlib1g_1.2.11.dfsg-2ubuntu1.2_s390x.deb passes all of my tests.

Revision history for this message
Frank Heimes (fheimes) wrote :

Many thx for testing on focal - I've updated the tags accordingly.

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Changed in ubuntu-z-systems:
status: In Progress → Fix Committed
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (zlib/1:1.2.11.dfsg-2ubuntu1.2)

All autopkgtests for the newly accepted zlib (1:1.2.11.dfsg-2ubuntu1.2) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

linux-hwe-5.8/5.8.0-25.26~20.04.1 (armhf)
libreoffice/1:6.4.6-0ubuntu0.20.04.1 (arm64)
dub/1.19.0-1build2 (s390x, armhf, arm64, amd64)
burp/2.2.18-2 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#zlib

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

I see that the burp armhf autopkgtest keeps on failing on the new zlib. I wonder if the burp-unit-test suite is really flaky and the release-pocket run only passed by chance?

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2020-11-02 06:05 EDT-------
Is test-suite.log saved somewhere?

Revision history for this message
Frank Heimes (fheimes) wrote :
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2020-11-02 07:49 EDT-------
Right, but the only relevant line in this file is: "See ./test-suite.log", which must be a separate file. So I wonder if it's saved somewhere alongside stdout/stderr?

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Ok, as suspected - the test suite seems really REALLY flacky. All passing now.

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for zlib has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zlib - 1:1.2.11.dfsg-2ubuntu1.2

---------------
zlib (1:1.2.11.dfsg-2ubuntu1.2) focal; urgency=medium

  * Cherrypick update of s390x hw acceleration #410 pull request patch,
    which corrects inflateSyncPoint() return value to always gracefully
    fail when hw acceleration is in use. This fixes rsync failure with
    zlib compression on hw accelerated s390x. LP: #1899621

 -- Dimitri John Ledkov <email address hidden> Thu, 15 Oct 2020 11:10:29 +0100

Changed in zlib (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2020-11-05 05:39 EDT-------
IBM Bugzilla status-> closed, Fix Released with all requested distros

Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments