Bug 128390 (IT_36853)
Summary: | stat() fails on files larger than 2G | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 2.1 | Reporter: | Steve Conklin <sconklin> |
Component: | sh-utils | Assignee: | Tim Waugh <twaugh> |
Status: | CLOSED ERRATA | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 2.1 | CC: | acuillerier, tao |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-12-13 21:35:14 UTC | Type: | --- |
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: | 123573 |
Description
Steve Conklin
2004-07-22 14:48:14 UTC
error 75 is EOVERFLOW. 32-bit stat() is *required* to return EOVERFLOW for files larger than 2G. See http://ftp.sas.com/standards/large.file/ for the relevant standards. If you want the stat to succeed, you must either use the stat64() variant --- if necessary, enabling that via #define _LARGEFILE64_SOURCE 1 or compile with transparent 64-bit file size support by using that #define plus #define _FILE_OFFSET_BITS 64 Only if you do the latter will stat() automatically use the 64-bit extended struct stat. If "/usr/bin/test -f" is failing, that implies the test binary is not using the 64-bit stat variants as it should do. For transparent 64-bit file size support actually just -D_FILE_OFFSET_BITS=64 is enough, _LARGEFILE64_SOURCE is not needed. Well /usr/bin/test belongs to sh-utils, doesn't it? For some reason the spec file explicitly uses --disable-largefile when running configure: %configure %{?this_os_is_linux: --disable-largefile --enable-pam } I've rebuilt sh-utils without --disable-largefile, and it solved this problem. Also, all the tests in the script tests/test/test-tests passed (for what that's wort). *** Bug 133386 has been marked as a duplicate of this bug. *** An errata has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2004-458.html |