I have a weird problem and am wondering if anybody has seen it before - find seems to be in an infinite loop. I ran a Perl script, which in turn ran find. The Perl code is this line: open(FIND, "find $destree -ls|") or seppuku 21, "dirvish $vault:$image cannot build index"; The Perl script belongs to a package called dirvish and this job has previously worked fine every night. Here's what I can see on the system. From ps, here are the commands: root 5042 4820 0 Jun15 ? 00:00:01 /usr/bin/perl /usr/local/sbin/dirvish --vault pcx36-var --image-time 22:00 root 5106 5042 99 Jun15 ? 1-05:49:36 find /backup/pcx36/pcx36-var/2005-06-14/tree -ls From top, find seems to be very busy doing something: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 5106 root 39 15 2928 528 2752 R 99.9 0.0 1792:15 find From strace, find isn't interacting with the system. In particular it's not examining files or directories :( suse1:~ # strace -p 5042 Process 5042 attached - interrupt to quit read(11, suse1:~ # strace -p 5106 Process 5106 attached - interrupt to quit (no output despite leaving it for quite a while, so my conclusion is that find is in an infinite loop) From lsof, to be sure it really is /usr/bin/find: suse1:~ # lsof -p 5106 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME find 5106 root cwd DIR 253,5 744 793554 /backup/pcx36/pcx36-var/2005-06-14/tree/www find 5106 root rtd DIR 3,1 680 2 / find 5106 root txt REG 3,1 66216 36947 /usr/bin/find find 5106 root mem REG 3,1 106608 20736 /lib64/ld-2.3.3.so find 5106 root mem REG 3,1 217016 164645 /var/run/nscd/passwd find 5106 root mem REG 3,1 217016 164652 /var/run/nscd/group find 5106 root mem REG 3,1 1412174 20761 /lib64/tls/libc.so.6 find 5106 root 0r FIFO 0,7 32522573 pipe find 5106 root 1w FIFO 0,7 33987450 pipe find 5106 root 2w REG 3,1 2256 164546 /tmp/run-crons.ZY4693/run-crons.daily.4691 find 5106 root 3r DIR 3,1 848 13368 /root Has anyone seen anything like this? To me it looks like find is in an infinite loop, and that seems like it must be a bug in find (it's on Suse9.2, BTW. 2.6.8-24.14-smp, x86_64) Any ideas on how to extract more information before I finally give up and kill the process? Is there a better place to ask this question? Thanks, Dave
Hi, On Thu, 16 Jun 2005 14:33:53 +0100 Dave Howorth <.> wrote:
I have a weird problem and am wondering if anybody has seen it before - find seems to be in an infinite loop.
I'm not sure, that it's about an infinite loop; but in fact 'find' takes temporally a lot of the capacity of your comp... I have SUSE 9.1 and already on the first week after installation I moved all the default cron.daily stuff to cron.forgetit ;) That scripts I like rather to run on a controlled way, _manually_, specially on a 100Gb system. On M$ e.g. a constantly running indexing service was comparably annoying. Pelibali
participants (2)
-
Dave Howorth
-
pelibali