Bug 105950

Summary: slocate not LFS aware, won't index large files
Product: [Retired] Red Hat Linux Reporter: Trent Piepho <tpiepho>
Component: slocateAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-03-29 14:14:44 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: 100644    
Attachments:
Description Flags
Patch to fix slocate none

Description Trent Piepho 2003-09-29 20:10:56 UTC
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 Trent Piepho 2003-10-23 09:20:35 UTC
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 14:14:44 UTC
fixed in slocate-2.7-8