Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jun 2016 18:31:54 -0400
From:      "Karl Vogel" <vogelke@pobox.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Periodic stuck in find (unkillable)
Message-ID:  <20160620223154.GA13821@bsd118.wpafb.af.mil>
In-Reply-To: <efd88372-61dd-285a-a93f-24665fcfd6a7@netfence.it>
References:  <efd88372-61dd-285a-a93f-24665fcfd6a7@netfence.it>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 20, 2016 at 09:45:14AM +0200, Andrea Venturoli wrote:
> ...some instances of "find" are unkillable.
> 
> # ps ax | grep find
> find -sx / /usr /var /data /dev/null -type f ( ( ! -perm +010 -and -p

  I don't have a BSD box in front of me; can you use "truss -p pid" to
  attach to one of the running processes and see if anything comes back?

  If that doesn't work out, can you get the full "find" command line from
  /proc and re-run it in a separate session?  Don't redirect the output or
  do anything else to change the buffering, and see if/as/when it quits.

  I use the script below to run things under an enviroment similar to cron
  (run "/usr/bin/env > /tmp/env$$" from cron to confirm); you could try the
  "find" command using this environment and see if it still freezes.

  Good luck.

-- 
Karl Vogel                      I don't speak for the USAF or my company

--------------------------------------------------------------------------
#!/bin/ksh
#<ascron: run a job as if cron was doing it.

case "$#" in
    0) set env ;;
    *) ;;
esac

/usr/bin/env -i        \
    HOME=$HOME         \
    LOGNAME=$LOGNAME   \
    PATH=/bin:/usr/bin \
    PWD=$PWD           \
    SHELL=$SHELL       \
    SHLVL=1            \
    TZ=$TZ             \
    daemon $@

exit 0



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160620223154.GA13821>