Bug 105950 - slocate not LFS aware, won't index large files
slocate not LFS aware, won't index large files
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: slocate (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks: CambridgeTarget
  Show dependency treegraph
 
Reported: 2003-09-29 16:10 EDT by Piepho, Trent
Modified: 2014-03-16 22:39 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-03-29 09:14:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to fix slocate (339 bytes, patch)
2003-10-23 05:20 EDT, Piepho, Trent
no flags Details | Diff

  None (edit)
Description Piepho, Trent 2003-09-29 16:10:56 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.10 (X11; Linux i686; U;) Gecko/20030314

Description of problem:
slocate is not compiled as a LFS aware program.  This means it won't be able to
"locate" files larger than 2GB.  Adding "-D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64" to the cflags appears to fix this program.

Steps to Reproduce:
1.Create a file larger than 2GB, e.g dd if=dev/zero bs=1M count=3k of=largefile
2.run updatedb to update the slocate database
3.Try to find the file, eg. slocate largefile
Comment 1 Piepho, Trent 2003-10-23 05:20:35 EDT
Created attachment 95429 [details]
Patch to fix slocate

It turns out that the fts(3) functions used by slocate are not LFS aware.  With
_FILE_OFFSET_BITS=64 it will either fail to compile or fail randomly when run,
depending on glibc version.  However, the problem with large files is that
fts_read will return status FTS_NS, indicating that no stat(2) information for
the file was available.  But slocate doesn't use the stat information, so there
is no need for it to ignore files when it doesn't have it.
Comment 2 Karsten Hopp 2004-03-29 09:14:44 EST
fixed in slocate-2.7-8 

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