Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1622474 - readChar on gzfile returns garbage on aarch64
Summary: readChar on gzfile returns garbage on aarch64
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: zlib
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeremy Linton (ARM)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1602275
Blocks: F29FTBFS 1603313
TreeView+ depends on / blocked
 
Reported: 2018-08-27 09:58 UTC by Pavel Raiskup
Modified: 2018-10-07 20:58 UTC (History)
8 users (show)

Fixed In Version: zlib-1.2.11-14.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1602275
Environment:
Last Closed: 2018-10-07 20:58:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pavel Raiskup 2018-08-27 09:58:04 UTC
This is probably bug in zlib.

+++ This bug was initially created as a clone of Bug #1602275 +++

Description of problem:
The R-xml2 package is failing the mass rebuild [1]; this build [2] shows a more verbose log with the test error being:

-- 1. Failure: write_xml works with an implicit connections (@test-write_xml.R#4
readChar(file, 1000L) not identical to "<x/>\n".
1/1 mismatches
x[1]: "<x/>\nUUUUUUUUUUUUUUUU"
y[1]: "<x/>\n"
-- 2. Failure: write_xml works with nodeset input and connections (@test-write_x
readChar(file, 1000L) not identical to "<y/>".
1/1 mismatches
x[1]: "<y/>UUUUUUUUUUUUUUUU"
y[1]: "<y/>"
-- 3. Failure: write_xml works with node input and connections (@test-write_xml.
readChar(file, 1000L) not identical to "<y/>".
1/1 mismatches
x[1]: "<y/>UUUUUUUUUUUUUUUU"
y[1]: "<y/>"
-- 4. Failure: write_html work with html input (@test-write_xml.R#110)  --------
readChar(file, 1000L) not identical to "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n<title>Foo</title>\n</head></html>\n".
1/1 mismatches
x[1]: "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://
x[1]: www.w3.org/TR/REC-html40/loose.dtd\">\n<html><head>\n<meta http-equiv=\"Co
x[1]: ntent-Type\" content=\"text/html; charset=UTF-8\">\n<title>Foo</title>\n</
x[1]: head></html>\nUUUUUUUUUUUUUUUU"
y[1]: "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://
y[1]: www.w3.org/TR/REC-html40/loose.dtd\">\n<html><head>\n<meta http-equiv=\"Co
y[1]: ntent-Type\" content=\"text/html; charset=UTF-8\">\n<title>Foo</title>\n</
y[1]: head></html>\n"

There are a bunch of U's at the end of the read data. In this build [3], I changed the test to only run:

echo -n "abc" | gzip > file
Rscript --vanilla -e 'quit(status = if(readChar(gzfile("file", "rb"), 1000L) == "abc") 0 else 1)'

On all other arches, this returns TRUE and passes, but on aarch64, it returns garbage and fails.


Version-Release number of selected component (if applicable):
3.5.0-5.fc29


Steps to Reproduce:
echo -n "abc" | gzip > file
Rscript --vanilla -e 'quit(status = if(readChar(gzfile("file", "rb"), 1000L) == "abc") 0 else 1)'


Actual results:
Fails on aarch64, passes elsewhere.


Expected results:
All arches should pass.


Additional info:
[1] https://koji.fedoraproject.org/koji/taskinfo?taskID=28163654
[2] https://koji.fedoraproject.org/koji/taskinfo?taskID=28359389
[3] https://koji.fedoraproject.org/koji/taskinfo?taskID=28388308

--- Additional comment from Elliott Sales de Andrade on 2018-07-18 09:12:42 CEST ---

Annoyingly, this doesn't seem reproducible using the mock --forcearch option.

--- Additional comment from Jan Kurik on 2018-08-14 11:52:23 CEST ---

This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

--- Additional comment from Elliott Sales de Andrade on 2018-08-23 09:44:03 CEST ---

I'm re-assigning to zlib as R uses deflateInit2/deflate/deflateEnd from there to do its gzip handling. zlib has some patches to use NEON optimizations on aarch64 that may be the cause of this bug.

You can see the builds on
Rawhide: https://koji.fedoraproject.org/koji/taskinfo?taskID=29242464
F29: https://koji.fedoraproject.org/koji/taskinfo?taskID=29242915
F28: https://koji.fedoraproject.org/koji/taskinfo?taskID=29242922

all fail now that a zlib containing the patch is on F28.

Note: these builds do not build R-xml2, but run the following simplified %check:
echo -n "abc" | gzip > file
xxd file
Rscript --vanilla -e 'ret <- readChar(gzfile("file", "rb"), 1000L); print(ret); quit(status = if(ret == "abc") 0 else 1)'

--- Additional comment from Elliott Sales de Andrade on 2018-08-23 10:22:55 CEST ---

Also CC Peter Robinson who appears to have added those patches but is not a committer in pagure, or automatically CC'd.

--- Additional comment from Peter Robinson on 2018-08-23 11:30:19 CEST ---

Jeremy can you take a look.

--- Additional comment from Zbigniew Jędrzejewski-Szmek on 2018-08-27 11:24:33 CEST ---

There has been at least one successfull build after mass rebuild.

zlib-1.2.11-9.fc29: https://koji.fedoraproject.org/koji/buildinfo?buildID=1127542

--- Additional comment from Pavel Raiskup on 2018-08-27 11:57:05 CEST ---

Reassign back against R, and clone for zlib.

Comment 1 Fedora Update System 2018-09-18 21:32:25 UTC
zlib-1.2.11-13.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-86feda64e9

Comment 2 Fedora Update System 2018-09-20 16:17:09 UTC
zlib-1.2.11-13.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-86feda64e9

Comment 3 Fedora Update System 2018-10-02 11:32:25 UTC
zlib-1.2.11-14.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-86feda64e9

Comment 4 Fedora Update System 2018-10-02 21:18:22 UTC
zlib-1.2.11-14.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-86feda64e9

Comment 5 Fedora Update System 2018-10-07 20:58:10 UTC
zlib-1.2.11-14.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.