Bug 2155328
Summary: | zlib 1.2.13 breaks libxml2 and lxml on s390x | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Lumír Balhar <lbalhar> | ||||||||||
Component: | zlib | Assignee: | Lukas Javorsky <ljavorsk> | ||||||||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||
Severity: | unspecified | Docs Contact: | |||||||||||
Priority: | unspecified | ||||||||||||
Version: | rawhide | CC: | iii, jchaloup, ljavorsk, mhroncok, mmuzila, odubaj, pkubat, praiskup, tstaudt | ||||||||||
Target Milestone: | --- | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | s390x | ||||||||||||
OS: | Unspecified | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2023-01-13 10:36:54 UTC | Type: | Bug | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Bug Depends On: | |||||||||||||
Bug Blocks: | 467765, 2153063 | ||||||||||||
Attachments: |
|
This must be a problem with the latest hardware compression patches. export DFLTCC=0 makes the problem go away. Thanks for the info Ilya. Do you know where and how we can fix this? I can confirm DFLTCC=0 makes the problem go away. $ python3 .. >>> libxml2.parseFile("file.xml.gz") 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 $ DFLTCC=0 python3 ... >>> libxml2.parseFile("file.xml.gz") <xmlDoc (file.xml.gz) object at 0x3ff930787d0> Yes, this must be the new strm.adler change - it seems that we should not be updating this field for raw streams. I am working on a fix. Created attachment 1934106 [details]
patch for zlib 1.2.11
Created attachment 1934107 [details]
patch for zlib 1.2.13
Please try either of the attached patches. Thanks for the patches. Could one of the package maintainers try it, please? I've tried to apply it and it does not apply. Looking at the patches we already have they depend on each other so I don't know whether I should add this one as a new one or squash it into zlib-1.2.13-IBM-Z-hw-accelerated-deflate.patch which adds the file the new patch tries to modify. Created attachment 1934119 [details] patch for zlib 1.2.13 (rawhide version) Hm, indeed, the 1.2.13 patch that I posted did not apply to the rawhide zlib. I generated it against https://github.com/madler/zlib/pull/410#issuecomment-1353070525, which is slightly ahead. I've attached the rebased version; it should go after all the current rawhide patches, i.e. after Patch23: zlib-1.2.11-covscan-issues-rhel9.patch. I did a test in COPR. With the rawhide version of zlib, python-lxml fails to build because one of the tests loading gzipped XML file fails. With the new patch, python-lxml builds fine. See: https://copr.fedorainfracloud.org/coprs/lbalhar/zlib/builds/ PR for zlib: https://src.fedoraproject.org/rpms/zlib/pull-request/21 I'm working on it. There are several things that need to be addressed before applying the changes in the patch. I'm waiting for the rebase of the patch at https://github.com/madler/zlib/pull/410 After that, it should be good to go :) I've created a test build to address this issue (https://ljavorsk.fedorapeople.org/zlib/zlib-1.2.13-libxml-fix/) Could you please test it? Lumir, please test if it fixes your issue, and Ilya, please test if it doesn't break any of your tests. Thank you for the reports in advance. zlib-1.2.13-1.fc38 passes all of my tests. Thanks! Sorry, I forgot to bump the release. The new builds are in the same location now. No problem; zlib-1.2.13-2.fc38 passes all the tests as well. Thanks Lukáši for the fixes. I've tried to contact you on IRC. Could you please upload the SRPM or open a PR with your changes so I can rebuild the new zlib in COPR and test lxml on top of it? It seems that the latest version of zlib fixed the problem we found in lxml. Thanks! I think you can ship it. The package is in the Fedora Rawhide stable repo. Created attachment 1941938 [details] patch for zlib 1.2.11 You can also find this patch at https://github.com/iii-i/zlib/commits/crc32vx-v5-1.2.11. Hello Lukas, do we need to open a bug to get this into RHEL 9.3 or will this be propagated somehow? Thanks. Hi Thomas, This has been already fixed in RHEL-9.2 (BZ#2166501) which has been shipped already. Thanks, Lukas |
Description of problem: The latest version of zlib (1.2.13) in rawhide breaks libxml2 (and therefore lxml). The problem appears during loading a gzipped XML file. Version-Release number of selected component (if applicable): zlib-1.2.13-1.fc38.s390x How reproducible: Allways. 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. It works fine with zlib-1.2.12-5.fc37.s390x. Additional info: Might this be caused by the downstream patches we have in Fedora for s390x?