strace broken on debian/testing?
Hi,
I'm not sure if this only happens to me and I am not sure who is the
culprit. I tested this on a freshly upgraded Debian/GNU Linux mips
testing from today on two machines (both IP22, one is a SGI Indy, the
other a SGI Indigo2, both have a 2.4.27 kernel). I further compiled
strace from sources (not from debian sources) and it's behaving the
same. Is this a bug in strace?
$ strace /bin/ls
...
fstat64(3, {st_mode=S_IFREG|0644, st_size=24961, ...}) = 0
old_mmap(NULL, 24961, PROT_READ, MAP_PRIVATE, 3, 0) = -1 EBADF (Bad
file descriptor)
close(3) = 0
open("/lib/librt.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0\31"...,
512) = 512lseek(3, 644, SEEK_SET) = 644
read(3, "\0\0\0\4\0\0\0\20\0\0\0\1GNU\0\0\0\0\0\0\0\0\2\0\0\0\4"...,
32) = 32
fstat64(3, {st_mode=S_IFREG|0644, st_size=41320, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x2aac0000
old_mmap(NULL, 343936, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = -1 EBADF (Bad file descriptor)
close(3) = 0
writev(2, [{"/bin/ls", 7}, {": ", 2}, {"error while loading shared
libra"..., 36}, {": ", 2}, {"librt.so.1", 10}, {": ", 2}, {"failed to
map segment from share"..., 40}, {": ", 2}, {"Error 9", 7}, {"\n", 1}],
10/bin/ls: error while loading shared libraries: librt.so.1: failed to
map segment from shared object: Error 9
) = 109
exit_group(127)
And of course /bin/ls works :)
$ ldd /bin/ls
librt.so.1 => /lib/librt.so.1 (0x2ab04000)
libacl.so.1 => /lib/libacl.so.1 (0x2ab58000)
libc.so.6 => /lib/libc.so.6 (0x2aba4000)
libpthread.so.0 => /lib/libpthread.so.0 (0x2ad40000)
/lib/ld.so.1 (0x2aaa8000)
libattr.so.1 => /lib/libattr.so.1 (0x2add8000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x2ae1c000)
This happens to all programs I want to trace which are dynamically
linked.
Thank you for your help,
mic
--
http://strg.at
Reply to: