On Wed, Aug 17, 2005, Bill Campbell wrote:

> On Wed, Aug 17, 2005, Matthias Kurz wrote:
> >On Wed, Aug 17, 2005, Doug Summers wrote:
> >
> >> I'm getting the daily cron jobs from OpenPKG hanging on some machines,
> >> sometimes nearly killing the CPU. Here's a sample from one machine that
> >> was unusable:
> >>
> >> ps -ef | grep openpkg
> >[...]
> >> root      7299  7296 91 Aug16 ?        1-06:50:42 /openpkg/bin/find / (
> >> -fstype devfs -o -fstype proc -o -fstype sysfs -o -fstype devpts -o
> >> -fstype tmpfs -o -fstype usbfs -o -fstype supermount -o -fstype ocfs -o
> >> -fstype auto -o -fstype autofs -o -fstype hsfs -o -fstype iso9660 -o
> >> -fstype afs -o -fstype ncpfs -o -fstype
> >[...]
> >> root     17653 17651 84 00:00 ?        08:18:05 /openpkg/bin/find / (
> >> -fstype devfs -o -fstype proc -o -fstype sysfs -o -fstype devpts -o
> >> -fstype tmpfs -o -fstype usbfs -o -fstype supermount -o -fstype ocfs -o
> >> -fstype auto -o -fstype autofs -o -fstype hsfs -o -fstype iso9660 -o
> >> -fstype afs -o -fstype ncpfs -o -fstype n
> >>
> >> This machine has only been up for 2 days and the find commands are
> >> locked up tight. I've had this happen on both a HPUX 11.11 and RHEL3
> >> machine (this output is from RHEL3).
> >
> >This are apparently updatedb processes from the findutils.
> >You can try to look with strace (e.g. strace -p 7299), what they are
> >doing. Did you modify rc.findutils ?
>
> I had posted a suggestion several month ago recommending that we implement
> processing locking on programs like findutils which may run for extended
> periods of time.  We often use the ``shlock'' program from the inn news
> software to handle this locking in shell scripts.
>
> Using lock files like %{l_prefix}/var/$package/run/hourly.lock with shlock
> is reasonably safe given the minimum time interval is fifteen minutes for
> quarterly cron jobs.

Good idea. Is there a portable and stand-alone implementation of shlock?
If not we can hand-craft it with a few lines of C code, of course.
But perhaps there is already an implementation (outside of INN) which
has the necessary Autoconf stuff in place to be able to use fcntl(2),
flock(2) and as a fallback UUCP-style lock files.

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
User Communication List                      openpkg-users@openpkg.org

Reply via email to