Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280620 - ~sys-apps/slocate-3.1 ignores large files on 32bit x86 machines
Summary: ~sys-apps/slocate-3.1 ignores large files on 32bit x86 machines
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 338380
Blocks:
  Show dependency tree
 
Reported: 2009-08-07 00:32 UTC by Joe Stroller
Modified: 2010-12-18 17:15 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Stroller 2009-08-07 00:32:25 UTC
I can't quite believe this myself, but I seem to be able to reproduce this behaviour on two different machines.

Basically, locate is completely ignoring large files - DVD-sized ISOs - even though updatedb sees them when it builds the database.  

$ sudo nice /usr/bin/updatedb -v > foob
$ locate disc.iso
$ ls -lh disc.iso 
-rwxr-xr-x 1 stroller users 7.3G 2009-08-07 00:54 disc.iso
$ locate Huck
/home/stroller/Huckleberry Finn.txt
$ ls -lh /mnt/space/
total 7.3G
-rw-r--r-- 1 stroller users    0 2009-08-07 00:25 bunnies
-rwxrwxrwx 1 stroller users 7.3G 2009-08-06 01:39 disc.iso
drwx------ 2 root     root   16K 2009-08-06 01:18 lost+found
drwxr-xr-x 3 stroller users 4.0K 2009-08-06 01:42 more
$ locate bunnies
/mnt/space/bunnies
$ grep -e disc.iso -e bunnies -e Huck foob 
/home/stroller/disc.iso
/home/stroller/Huckleberry Finn.txt
/mnt/space/bunnies
/mnt/space/disc.iso
$ 



Reproducible: Always

Steps to Reproduce:
1. Create large file on disk (reproducible with 4.2G KNOPPIX_V5.3.1DVD-2008-03-26-EN.iso
2. Update slocate database
3. Try finding the file with locate

Actual Results:  
File not shown in output

Expected Results:  
File should be shown in output

Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.30-gentoo-r4-i686-Intel-R-_Celeron-R-_CPU_2.80GHz-with-glibc2.0
Timestamp of tree: Sat, 01 Aug 2009 11:30:18 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.4.4-r13, 2.5.4-r3
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_GB"
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB en"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="a52 aac acl amr berkdb bzip2 cli cracklib crypt css cups curl doc dri dts dvd dvdnav dvdr encode examples exif extra-tools ffmpeg fortran gdbm gif iconv isdnlog jpeg libssh2 mad matroska md5sum midi mmx mp3 mp4 mpeg mudflap ncurses nethack network-cron nls nptl nptlonly offensive ogg ogm openmp pam pcre perl png pppd python quicktime rar raw readline reflection samba schroedinger sensord session spl sse sse2 ssl sysfs tcpd truetype unicode vim-syntax vorbis win32codecs x264 x86 xml xorg xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


$ slocate --version
Secure Locate 3.1 - Released March 7, 2006
$ eix -I slocate
[I] sys-apps/slocate
     Available versions:  2.7-r8 3.1-r1 ~3.1-r2
     Installed versions:  3.1-r1(00:44:28 07/08/09)
     Homepage:            http://slocate.trakker.ca/
     Description:         Secure way to index and quickly search for files on your system (drop-in replacement for 'locate')

$ 


I can also reproduce this with 3.1-r2.
Comment 1 Wonko 2009-08-07 13:43:49 UTC
I can confirm this. Discussion on the gentoo-users mailing list suggests that it depends on the architecture - the original reporter, another person and me are running a 32bis system and see the problem, while another poster with 64bit system could not reproduce it.

A workaround would be using sys-apps/mlocate instead of sys-apps/slocate.
Comment 2 Volker Hemmann 2009-08-07 13:53:55 UTC
two posters with 64 bit machines could not reproduce it ;)
Comment 3 Peter Karlsson 2009-08-07 19:15:36 UTC
(In reply to comment #0)
I can reproduce this behaviour with my 32bit machine; files bigger than 2^32 bytes seem to be ignored when using the locate function even though updatedb picks the file up... Why slocate looks at file size is beyond my understanding; weird!
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-08-07 19:56:54 UTC
Has this already been reported upstream?
Comment 5 Joe Stroller 2009-08-10 18:26:58 UTC
Reporting upstream:

eix shows the homepage for this package as http://slocate.trakker.ca/  There's no bugtracker or anything there, just a mailto: link for the author.

I have mailed him the details & requested kindly if he could possibly try to reproduce.
Comment 6 SpanKY gentoo-dev 2009-08-15 23:46:34 UTC
this is a known issue.  slocate uses the fts.h API and that does not work with LFS flags on 32bit systems.
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2010-12-18 17:15:16 UTC
slocate is out of tree, use mlocate