cron complains /etc/cron.daily/find exited with return code 127

Bug #191355 reported by Martin Pool
This bug report is a duplicate of:  Bug #210699: gutsy->hardy upgrade error. Edit Remove
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
findutils (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: findutils

On a machine upgraded from gutsy to hardy I get this error:

run-parts: /etc/cron.daily/find exited with return code 127

because the script is installed, but updatedb is not:

mbp@grace% sudo sh -x /etc/cron.daily/find
+ LOCALUSER=nobody
+ export LOCALUSER
+ [ -f /etc/updatedb.conf ]
+ . /etc/updatedb.conf
+ FINDOPTIONS=-ignore_readdir_race
+ export FINDOPTIONS
+ PRUNEFS=NFS nfs nfs4 afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre_lite tmpfs usbfs udf
+ export PRUNEFS
+ PRUNEPATHS=/tmp /usr/tmp /var/tmp /afs /amd /alex /var/spool /sfs /media
+ export PRUNEPATHS
+ NETPATHS=
+ export NETPATHS
+ LOCALUSER=nobody
+ export LOCALUSER
+ NICE=10
+ export NICE
+ IONICE_CLASS=2
+ export IONICE_CLASS
+ IONICE_PRIORITY=7
+ export IONICE_PRIORITY
+ getent passwd nobody
+ cd /
+ nice -n 10 updatedb
zsh: exit 127 sudo sh -x /etc/cron.daily/find

This script is provided by findutils, but that package does not provide an updatedb command. The two packages that do use an updatedb, locate and slocate, install their own cron jobs. So it seems this should just be removed from the package.

Revision history for this message
Miek Gieben (miek) wrote :

findutils in hardy only contains find and xargs. It should not ship an cron.daily script anymore.

Therefore I can confirm this bug.

Revision history for this message
Smylers (smylers) wrote :

I also have this cron job:

  $ dpkg -S /etc/cron.daily/find
  findutils: /etc/cron.daily/find

This is a computer on which I installed Ubuntu 7.10 from CD, then immediately ran update-manager -d to upgrade to the latest Hardy.

The cron job is buggy (it calls ionice -p 7 rather than ionice -n 7, thereby either exiting with an error or changing the priority of whatever the process with pid 7 happens to be!). This was fixed in an update to gutsy:

  http://changelogs.ubuntu.com/changelogs/pool/main/f/findutils/findutils_4.2.31-1ubuntu2.1/changelog

But that change has been skipped from the current hardy version:

  http://changelogs.ubuntu.com/changelogs/pool/main/f/findutils/findutils_4.2.32-1ubuntu2/changelog

If the entire file shouldn't be there that's obviously irrelevant (I came here to report that as a bug, but I now won't!); I'm just including it in case it helps track down where the file has come from.

Revision history for this message
Juraj Lukac (hrasko) wrote :

I had the same problem on Debian Etch server. It was caused by the mmissing updatedb binary. According to dpkg info the binary should be in the finutils package, but it wasn't on the server. So I reinstalled findutils and the updatedb binary appeared again where it supopsed to be and the /etc/cron.daily/find script worked again.

Revision history for this message
pdecat (pdecat) wrote :

I also have this failing cron job :

$ dpkg -S /etc/cron.daily/find
findutils: /etc/cron.daily/find

$ dpkg -s findutils
Package: findutils
Essential: yes
Status: install ok installed
Multi-Arch: foreign
Priority: required
Section: utils
Installed-Size: 648
Maintainer: Ubuntu Developers <email address hidden>
Architecture: i386
Version: 4.4.2-1ubuntu3
Pre-Depends: libc6 (>= 2.7)
Suggests: mlocate | locate | slocate
Conffiles:
 /etc/cron.daily/find 56d5ad07a14419d1fae3d2620f2d9ff9 obsolete
Description: utilities for finding files--find, xargs
 GNU findutils provides utilities to find files meeting specified
 criteria and perform various actions on the files which are found.
 This package contains 'find' and 'xargs'; however, 'locate' has
 been split off into a separate package.
Homepage: http://savannah.gnu.org/projects/findutils/
Original-Maintainer: Andreas Metzler <email address hidden>

$ apt-cache policy findutils
findutils:
  Installé : 4.4.2-1ubuntu3
  Candidat : 4.4.2-1ubuntu3
 Table de version :
 *** 4.4.2-1ubuntu3 0
        500 http://archive.ubuntu.com/ubuntu/ oneiric/main i386 Packages
        100 /var/lib/dpkg/status

In my case, it exits with exit status 1:

$ sudo sh -x /etc/cron.daily/find
+ LOCALUSER=nobody
+ export LOCALUSER
+ [ -f /etc/updatedb.conf ]
+ . /etc/updatedb.conf
+ PRUNE_BIND_MOUNTS=yes
+ PRUNEPATHS=/tmp /var/spool /media /home/.ecryptfs
+ PRUNEFS=NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre_lite tmpfs usbfs udf fuse.glusterfs fuse.sshfs curlftpfs ecryptfs fusesmb devtmpfs
+ getent passwd nobody
+ cd /
+ nice -n 10 ionice -c 2 -p 7 updatedb
patrick@glaciere:/etc/cron.daily$ echo $?
1

Fixing this script as suggested by Smylers solves the problem:

$ sudo sh -x /etc/cron.daily/find
+ LOCALUSER=nobody
+ export LOCALUSER
+ [ -f /etc/updatedb.conf ]
+ . /etc/updatedb.conf
+ PRUNE_BIND_MOUNTS=yes
+ PRUNEPATHS=/tmp /var/spool /media /home/.ecryptfs
+ PRUNEFS=NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre_lite tmpfs usbfs udf fuse.glusterfs fuse.sshfs curlftpfs ecryptfs fusesmb devtmpfs
+ getent passwd nobody
+ cd /
+ nice -n 10 ionice -c 2 -n 7 updatedb
patrick@glaciere:/etc/cron.daily$ echo $?
0

Regards,
Patrick.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.