[Bug 2002511] Re: zlib 1.2.13 (and patched 1.2.11) breaks libxml2 on s390x
Launchpad Bug Tracker
2002511 at bugs.launchpad.net
Wed Jan 25 21:47:37 UTC 2023
This bug was fixed in the package zlib - 1:1.2.13.dfsg-1ubuntu4
---------------
zlib (1:1.2.13.dfsg-1ubuntu4) lunar; urgency=medium
* Add d/p/1390.patch to not update strm.adler for raw streams on s390x
(DFLTCC), otherwise libxml2 gets broken on s390x. LP: #2002511
-- Frank Heimes <frank.heimes at canonical.com> Wed, 11 Jan 2023 18:02:34
+0100
** Changed in: zlib (Ubuntu Lunar)
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to zlib in Ubuntu.
https://bugs.launchpad.net/bugs/2002511
Title:
zlib 1.2.13 (and patched 1.2.11) breaks libxml2 on s390x
Status in Ubuntu on IBM z Systems:
In Progress
Status in zlib:
Fix Released
Status in zlib package in Ubuntu:
Fix Released
Status in zlib source package in Focal:
New
Status in zlib source package in Jammy:
New
Status in zlib source package in Kinetic:
New
Status in zlib source package in Lunar:
Fix Released
Bug description:
SRU Justification:
------------------
[ Impact ]
* zlib version 1.2.13, as well as patched zlib versions 1.2.11 with
the patch from LP#1990379, break libxml2 and lxml on s390x.
* The problem appears during loading a gzipped XML file.
* Disabling hw compression with 'export DFLTCC=0' solves this,
hence it's a problem with the hardware acceleration patches DFLTCC.
* For more info see:
https://bugzilla.redhat.com/show_bug.cgi?id=2155328
[ Test Plan ]
* Steps to Reproduce:
1. echo "<a></a>" > file.xml
2. gzip file.xml
3. python3
>>> import libxml2
>>> libxml2.parseFile("file.xml.gz")
* Actual results:
file.xml.gz:1: parser error : Document is empty
^
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.11/site-packages/libxml2.py",
line 1362, in parseFile
if ret is None:raise parserError('xmlParseFile() failed')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
libxml2.parserError: xmlParseFile() failed
* Expected results:
Loaded file.
[ Where problems could occur ]
* Since this is limited to s390x and DFLTCC / hw acceleration active,
any possible problems are limited to such environments.
* Fix can be broken if the state handling (state->wrap),
or the states mixed.
* The translation from stream to parameter block could be broken
(again due to wrong states) and the inflate as well.
[ Other Info ]
* The official upstream fix is here:
https://github.com/zlib-ng/zlib-ng/pull/1390
but it's for zlib-ng.
* For zlib this needs to be adjusted and was done by the author here:
https://launchpadlibrarian.net/641454325/patch-1.2.11
* And again slightly adjusted by me (renamed, some white-space fixes
and conversion into a quilt patch with proper dep3 header):
https://launchpadlibrarian.net/645435847/1390.patch
* The zlib version in Focal, Jammy, Kinetic and Lunar are affected.
__________
It has been reported that 1.2.13 as well as the patch from LP#1990379 breaks libxml2 (and libxml) on s390x:
(https://bugzilla.redhat.com/show_bug.cgi?id=2155328). The attached patch should fix the issue.
The upstream author proposed a fix and a new test for zlib-ng
(https://github.com/zlib-ng/zlib-ng/pull/1390) in order to detect such
breakages in the future.
___
This was initially reported as part of LP#1990379,
especially: https://bugs.launchpad.net/ubuntu/+source/zlib/+bug/1990379/comments/12
but needs a separate LP bug (number) - this one.
___
The proposed patch at https://launchpadlibrarian.net/641454325/patch-1.2.11
needed some tweaks regarding white-spaces, but then applied fine on focal, jammy, kinetic and also 1.2.13, which is what we currently have in lunar-proposed.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/2002511/+subscriptions
More information about the foundations-bugs
mailing list