-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday, 2013-04-03 at 08:08 -0400, Anton Aylward wrote:
Carlos E. R. said the following on 04/03/2013 07:50 AM:
By the way, if I try a CLI "grep" on my ~/bin directory, it locks:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND cer 23961 0.1 0.0 11820 3568 pts/2 S+ 13:46 0:00 | \_ grep --color=auto fdisk bin/0_script_constructs bin/0_script_constructs~ bin/200506_attrib.list bin/Antiguos bin/Bck200405_attrib.dat
CPU usage is NIL, iotop doesn't see the grep as working. I just typed:
cer@Telcontar:~> grep fdisk bin/* ...
Got some hits, then it stuck.
I've had that happen in other situations, most notably greping recursively through /etc :-(
However if I use 'find' and only grep actual files, that is not some of the strange things that can be symlinked in there, it never hangs.
I admit that I've never systematically searched to identity what the 'strange things' were.
I'm curious. Called it this way: cer@Telcontar:~> strace -o strace.out grep fdisk bin/* and I see it stuck at: close(3) = 0 stat("bin/fecha", {st_mode=S_IFREG|0755, st_size=39, ...}) = 0 open("bin/fecha", O_RDONLY) = 3 ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x7fff54dc55f8) = -1 ENOTTY (Inappropriate ioctl for device) read(3, "#!/bin/bash\ndate --rfc-3339=seco"..., 5013504) = 39 read(3, "", 5013504) = 0 close(3) = 0 stat("bin/fifo", {st_mode=S_IFIFO|0666, st_size=0, ...}) = 0 open("bin/fifo", O_RDONLY I do have a spurious named pipe "fifo" there: cer@Telcontar:~> l bin/fifo prw-rw-rw- 1 cer users 0 Jan 31 2010 bin/fifo| cer@Telcontar:~> which I used long ago and forgot to remove. I delete it, restart grep, and now it completes :-) Now, is this a bug in grep, that should not look inside a named pipe, or is it my fault? One of the reasons I use 'mc' for searches is that it is clever enough not to look inside those and does not get stuck. - -- Cheers, Carlos E. R. (from 12.1 x86_64 "Asparagus" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAlFcJd4ACgkQtTMYHG2NR9WVWwCbBMiHHbgI6tDJNZ4647UXJYO4 zeAAn1gVFMLbVmZAWlRAfLszLdPzqlpO =9HNg -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org