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 1602275
Summary: | readChar on gzfile returns garbage on aarch64 | |||
---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Elliott Sales de Andrade <quantum.analyst> | |
Component: | R | Assignee: | Jeremy Linton <jeremy.linton> | |
Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 29 | CC: | jaromir.capik, jchaloup, pbrobinson, praiskup, tcallawa | |
Target Milestone: | --- | Keywords: | Reopened | |
Target Release: | --- | |||
Hardware: | aarch64 | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1622474 (view as bug list) | Environment: | ||
Last Closed: | 2019-11-27 19:26:14 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: | 1602938, 1603313, 1622474 |
Description
Elliott Sales de Andrade
2018-07-18 06:29:37 UTC
Annoyingly, this doesn't seem reproducible using the mock --forcearch option. This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle. Changing version to '29'. 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)' Also CC Peter Robinson who appears to have added those patches but is not a committer in pagure, or automatically CC'd. Jeremy can you take a look. 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 Reassign back against R, and clone for zlib. Annoyingly I just saw this (out of the noise) Yes, this sounds similar to the gzip case where the buffer isn't being terminated after its passed to zlib. I'm not dead, but the holiday, and another bug took precidence. I'm looking at this again today, and hopfully should have a patch RSN. I continue to see the test failure with: Last 13 lines of output: 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" but the direct Rscript call works. This could just be a case of how its being compressed and the source len. Putting a memset against the buffer in R-gzread() reproduces the readChar(gzfile("xxx", "rb")) output so that it consistently has a garbage character following the decompressed data (then the null). Well, at the moment it looks like the following code snip at the top of R_gzread() works around the problem. if (len) start[0] ='\0'; Which force terminates the _first_ byte of the buffer. This is because there are thousands and thousands of calls to R_gzread() in the simple example presented above and the string is read in tiny chunks. It appears that R is calling it an extra time to be sure that the source buffer has ended, and its this case (good output buf/len, but at Z_STREAM_END) which is returning an extra byte. So at this point i'm not 100% sure who is at fault here, which is for tomorrow. This message is a reminder that Fedora 29 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '29'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 29 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. |