[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: grep 2.3-7 is broken (was Re: compiler issues and some booboos)



Eric Delaunay <delaunay@lix.polytechnique.fr> writes:

> It seems there is a problem using grep 2.3-7.  I got the same problem when I
> upgraded libc6 from slink to potato on my SparcClassic but has gone away after
> upgraded grep to 2.3-5.  I got a reply from Sharkey who told me that 2.3-5 is
> working well even on ultrasparc (2.3-5 is still available from
> ftp://lix.polytechnique.fr/pub/Linux/debian/sparc/exp if you need to downgrade
> to).

Well, I just experienced it too.  Some report the problem
spontaneously going away.  It only happens when grepping binary files,
and only -7 and not -5.  This is on an ultra5.  That is my experience.

Thinking maybe it was a bad build, I rebuilt grep on my own box but
I'm still seeing the bug.

Note: there is no bug yet filed since I"m not sure if it's the
kernel's fault, libc6, gcc, or what...

Strace logs included below.  The critical line is:
  read(3, 0x34000, 32768)                 = -1 EFAULT (Bad address)

This would seem to me to point the finger at the kernel, but I can't
imagine why -5 wouldn't trigger it but -7 would.

-- 
.....Adam Di Carlo....adam@onShore.com.....<URL:http://www.onShore.com/>

Kernel:

Linux arroz 2.2.12 #1 Sun Sep 12 03:02:07 EDT 1999 sparc64 unknown


execve("/bin/grep", ["grep", "foo", "/amnt/burrito-home/apharris/uls/sunsparc-arws-40.tar.gz"], [/* 48 vars */]) = 0
brk(0)                                  = 0x2f708
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=15273, ...}) = 0
mmap(ptrace: umoven: Input/output error
)                                  = 0x7001a000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=970476, ...}) = 0
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\2\0\0\0\1\0\1\342"..., 8192) = 8192
mmap(ptrace: umoven: Input/output error
)                                  = 0x7002a000
mprotect(0x70112000, 95096, PROT_NONE)  = 0
mmap(NULL, 0, PROT_NONE, MAP_FILE, 0, 0) = 0x7011a000
mmap(NULL, 0, PROT_NONE, MAP_FILE, 0, 0) = 0x70126000
close(3)                                = 0
mmap(ptrace: umoven: Input/output error
)                                  = 0x7001e000
munmap(0x7001a000, 15273)               = 0
personality(PER_LINUX)                  = 0
getpid()                                = 24403
getpagesize()                           = 0x2000
brk(0)                                  = 0x2f708
brk(0x2f8a8)                            = 0x2f8a8
brk(0x30000)                            = 0x30000
brk(0x32000)                            = 0x32000
open("/amnt/burrito-home/apharris/uls/sunsparc-arws-40.tar.gz", O_RDONLY) = 3
brk(0x40000)                            = 0x40000
fstat(3, {st_mode=S_IFREG|0644, st_size=7399840, ...}) = 0
mmap(NULL, 0, PROT_NONE, MAP_FILE, 0, 0) = -1 EINVAL (Invalid argument)
read(3, 0x34000, 32768)                 = -1 EFAULT (Bad address)
write(2, "grep: /amnt/burrito-home/apharri"..., 75grep: /amnt/burrito-home/apharris/uls/sunsparc-arws-40.tar.gz: Bad address
) = 75
close(3)                                = 0
close(1)                                = 0
exit(2)                                 = ?


Reply to: