| Summary: | tree doesn't display large files | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Richard Fearn <richardfearn> |
| Component: | tree | Assignee: | Tim Waugh <twaugh> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 16 | CC: | twaugh |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | tree-1.6.0-3.fc16 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-12-10 19:48:58 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
tree-1.6.0-3.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/tree-1.6.0-3.fc16 Package tree-1.6.0-3.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing tree-1.6.0-3.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-16818/tree-1.6.0-3.fc16 then log in and leave karma (feedback). tree-1.6.0-3.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. |
Description of problem: Large files are omitted from tree's output because tree isn't compiled with -D_FILE_OFFSET_BITS=64. Version-Release number of selected component (if applicable): tree-1.6.0-2.fc16.i686 How reproducible: Every time, for large files. Steps to Reproduce: 1. Run tree on a directory containing a large file Actual results: ----------------------------------------------------------------------- $ tree . `-- Fedora-16-i386-CHECKSUM 0 directories, 1 file $ ls -l total 3720804 -r--r--r--. 1 rich rich 1112 Nov 4 15:01 Fedora-16-i386-CHECKSUM -r--r--r--. 1 rich rich 3806375936 Nov 3 04:18 Fedora-16-i386-DVD.iso ----------------------------------------------------------------------- Expected results: Fedora-16-i386-DVD.iso should be displayed in tree's output. Additional info: The spec file does this: %build make CFLAGS="$RPM_OPT_FLAGS" "CPPFLAGS=$(getconf LFS_CFLAGS)" %{?_smp_mflags} I think the 'getconf' part should be in the CFLAGS; the Makefile doesn't pass CPPFLAGS to gcc. This can be seen in the build log: http://kojipkgs.fedoraproject.org/packages/tree/1.6.0/2.fc16/data/logs/i686/build.log In that log, the 'make' command contains: 'CPPFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' but the gcc commands don't include the FILE_OFFSET_BITS variable. tree does an 'lstat' on each file it finds in a directory. Using gdb shows that lstat returns -1 and errno is set to 75 (EOVERFLOW). According to the man page for lstat(2), EOVERFLOW occurs when: (stat()) path refers to a file whose size cannot be represented in the type off_t. This can occur when an application compiled on a 32-bit platform without -D_FILE_OFFSET_BITS=64 calls stat() on a file whose size exceeds (1<<31)-1 bits. Because lstat returns -1, tree ignores the large file.