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 105950 - slocate not LFS aware, won't index large files
Summary: slocate not LFS aware, won't index large files
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: slocate
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks: CambridgeTarget
TreeView+ depends on / blocked
 
Reported: 2003-09-29 20:10 UTC by Trent Piepho
Modified: 2014-03-17 02:39 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-03-29 14:14:44 UTC
Embargoed:


Attachments (Terms of Use)
Patch to fix slocate (deleted)
2003-10-23 09:20 UTC, Trent Piepho
no flags Details | Diff

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 


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