|
From: Barry C. <che...@ya...> - 2005-10-11 08:17:59
|
We are trying to use valgrind on a new machine and when valgrind runs it can't stat the exe even though it runs the program successfully. Any help would be greatly appreciated. Cheers, Barry Linux harpo 2.6.9-11.ELsmp #1 SMP Fri May 20 18:25:30 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux /usr/bin/valgrind: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, statically linked, not stripped valgrind-2.2.0 $ cc -m32 -g -o socktest socktest.c $ valgrind --tool=memcheck -v socktest ==4836== Memcheck, a memory error detector for x86-linux. ==4836== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al. ==4836== Using valgrind-2.2.0, a program supervision framework for x86-linux. ==4836== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al. ==4836== Valgrind library directory: /usr/lib/valgrind ==4836== Command line ==4836== socktest ==4836== Startup, with flags: ==4836== --tool=memcheck ==4836== -v ==4836== Contents of /proc/version: ==4836== Linux version 2.6.9-11.ELsmp (bhc...@cr...) (gcc version 3.4.3 20050227 (Red Hat 3.4.3-22)) #1 SMP Fri May 20 18:25:30 EDT 2005 ==4836== Reading syms from /develop/home/clarksob/socktest (0x8048000) ==4836== Can't stat .so/.exe (to determine its size)?! ==4836== Reading syms from /develop/home/clarksob/socktest (0x8049000) ==4836== Can't stat .so/.exe (to determine its size)?! ==4836== Reading syms from /lib/ld-2.3.4.so (0x1B8E4000) ==4836== object doesn't have any debug info ==4836== Reading syms from /usr/lib/valgrind/stage2 (0xB0000000) ==4836== Reading syms from /lib/ld-2.3.4.so (0xB1000000) ==4836== object doesn't have any debug info ==4836== Reading syms from /usr/lib/valgrind/vgskin_memcheck.so (0xF7C7D000) ==4836== Reading syms from /lib/tls/libc-2.3.4.so (0xF7EA6000) ==4836== object doesn't have any debug info ==4836== Reading syms from /lib/libdl-2.3.4.so (0xF7FD0000) ==4836== object doesn't have any debug info ==4836== Reading suppressions file: /usr/lib/valgrind/default.supp ==4836== REDIRECT soname:libc.so.6(__GI___errno_location) to soname:libpthread.so.0(__errno_location) ==4836== REDIRECT soname:libc.so.6(__errno_location) to soname:libpthread.so.0(__errno_location) ==4836== REDIRECT soname:libc.so.6(__GI___h_errno_location) to soname:libpthread.so.0(__h_errno_location) ==4836== REDIRECT soname:libc.so.6(__h_errno_location) to soname:libpthread.so.0(__h_errno_location) ==4836== REDIRECT soname:libc.so.6(__GI___res_state) to soname:libpthread.so.0(__res_state) ==4836== REDIRECT soname:libc.so.6(__res_state) to soname:libpthread.so.0(__res_state) ==4836== REDIRECT soname:libc.so.6(stpcpy) to *vgpreload_memcheck.so*(stpcpy) ==4836== REDIRECT soname:libc.so.6(strnlen) to *vgpreload_memcheck.so*(strnlen) ==4836== REDIRECT soname:ld-linux.so.2(stpcpy) to *vgpreload_memcheck.so*(stpcpy) ==4836== REDIRECT soname:ld-linux.so.2(strchr) to *vgpreload_memcheck.so*(strchr) ==4836== ==4836== Reading syms from /usr/lib/valgrind/vg_inject.so (0x1B8FC000) ==4836== Reading syms from /usr/lib/valgrind/vgpreload_memcheck.so (0x1B901000) ==4836== TRANSLATE: 0x1B8F5EE0 redirected to 0x1B904100 ==4836== Reading syms from /lib/tls/libc-2.3.4.so (0x181000) ==4836== object doesn't have any debug info ==4836== TRANSLATE: 0x1B8E47A0 redirected to 0x52BFF040 Socket created ==4836== Syscall param socketcall.bind(my_addr.) contains uninitialised or unaddressable byte(s) ==4836== at 0x248AB7: bind (in /lib/tls/libc-2.3.4.so) ==4836== by 0x195E22: __libc_start_main (in /lib/tls/libc-2.3.4.so) ==4836== by 0x80484C0: (within /develop/home/clarksob/socktest) ==4836== Address 0x52BFBAA1 is on thread 1's stack Bound to local socket with address ==4836== ==4836== Syscall param socketcall.connect(serv_addr.) contains uninitialised or unaddressable byte(s) ==4836== at 0x248B01: __connect_internal (in /lib/tls/libc-2.3.4.so) ==4836== by 0x195E22: __libc_start_main (in /lib/tls/libc-2.3.4.so) ==4836== by 0x80484C0: (within /develop/home/clarksob/socktest) ==4836== Address 0x52BFBA71 is on thread 1's stack Error: Connect to address failed ==4836== TRANSLATE: 0x1EB090 redirected to 0x1B9046F4 Error: (101, Network is unreachable) ==4836== TRANSLATE: 0x1E2DB0 redirected to 0x1B904E24 ==4836== ==4836== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 12 from 1) ==4836== ==4836== 1 errors in context 1 of 2: ==4836== Syscall param socketcall.connect(serv_addr.) contains uninitialised or unaddressable byte(s) ==4836== at 0x248B01: __connect_internal (in /lib/tls/libc-2.3.4.so) ==4836== by 0x195E22: __libc_start_main (in /lib/tls/libc-2.3.4.so) ==4836== by 0x80484C0: (within /develop/home/clarksob/socktest) ==4836== Address 0x52BFBA71 is on thread 1's stack ==4836== ==4836== 1 errors in context 2 of 2: ==4836== Syscall param socketcall.connect(serv_addr.) contains uninitialised or unaddressable byte(s) ==4836== at 0x248AB7: bind (in /lib/tls/libc-2.3.4.so) ==4836== by 0x195E22: __libc_start_main (in /lib/tls/libc-2.3.4.so) ==4836== by 0x80484C0: (within /develop/home/clarksob/socktest) ==4836== Address 0x52BFBAA1 is on thread 1's stack --4836-- --4836-- supp: 12 dl_relocate_object/dl_main ==4836== ==4836== IN SUMMARY: 2 errors from 2 contexts (suppressed: 12 from 1) ==4836== ==4836== malloc/free: in use at exit: 0 bytes in 0 blocks. ==4836== malloc/free: 0 allocs, 0 frees, 0 bytes allocated. ==4836== --4836-- TT/TC: 0 tc sectors discarded. --4836-- 2283 tt_fast misses. --4836-- translate: new 2149 (38255 -> 504466; ratio 131:10) --4836-- discard 2 (59 -> 840; ratio 142:10). --4836-- chainings: 1296 chainings, 3 unchainings. --4836-- dispatch: 0 jumps (bb entries); of them 4805 (480500%) unchained. --4836-- 46/2348 major/minor sched events. --4836-- reg-alloc: 499 t-req-spill, 94125+4108 orig+spill uis, --4836-- 11904 total-reg-rank --4836-- sanity: 25 cheap, 1 expensive checks. --4836-- ccalls: 8090 C calls, 54% saves+restores avoided (25832 bytes) --4836-- 10776 args, avg 0.87 setup instrs each (2756 bytes) --4836-- 0% clear the stack (24147 bytes) --4836-- 3638 retvals, 29% of reg-reg movs avoided (2096 bytes) ___________________________________________________________ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com |
|
From: Igmar P. <mai...@jd...> - 2005-10-11 08:58:46
|
> We are trying to use valgrind on a new machine and > when valgrind runs it can't stat the exe even though > it runs the program successfully. Any help would be > greatly appreciated. What does stat /develop/home/clarksob/socktest say ? Igmar |
|
From: Barry C. <che...@ya...> - 2005-10-11 09:12:20
|
stat("/develop/home/clarksob/socktest", 0xffffa8c0) =
-1 EOVERFLOW (Value too large for defined data type)
write(1016, "--", 2--) = 2
getpid() = 9989
write(1016, "9989-- ", 79989-- ) = 7
write(1016, "Can\'t stat .so/.exe (to determin"...,
45Can't stat .so/.exe (to determine its size)?!) = 45
write(1016, "\n", 1
File: `socktest'
Size: 8920 Blocks: 18 IO Block:
1024 regular file
Device: ff0c788h/267437960d Inode: 7639
Links: 1
Access: (0755/-rwxr-xr-x) Uid: (11120/clarksob)
Gid: ( 409/ bil)
Access: 2005-10-11 10:08:59.876385000 +0100
Modify: 2005-10-11 09:15:25.731221000 +0100
Change: 2005-10-11 09:15:25.731256000 +0100
--- Igmar Palsenberg <mai...@jd...> wrote:
>
> > We are trying to use valgrind on a new machine and
> > when valgrind runs it can't stat the exe even
> though
> > it runs the program successfully. Any help would
> be
> > greatly appreciated.
>
> What does stat /develop/home/clarksob/socktest say ?
>
>
>
> Igmar
>
>
>
-------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content,
> downloads, discussions,
> and more.
> http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Valgrind-users mailing list
> Val...@li...
>
https://lists.sourceforge.net/lists/listinfo/valgrind-users
>
___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
|
|
From: Tom H. <to...@co...> - 2005-10-11 09:42:53
|
In message <200...@we...>
Barry Clarkson <che...@ya...> wrote:
> stat("/develop/home/clarksob/socktest", 0xffffa8c0) =
> -1 EOVERFLOW (Value too large for defined data type)
> write(1016, "--", 2--) = 2
> getpid() = 9989
> write(1016, "9989-- ", 79989-- ) = 7
> write(1016, "Can\'t stat .so/.exe (to determin"...,
> 45Can't stat .so/.exe (to determine its size)?!) = 45
> write(1016, "\n", 1
>
> File: `socktest'
> Size: 8920 Blocks: 18 IO Block:
> 1024 regular file
> Device: ff0c788h/267437960d Inode: 7639
> Links: 1
> Access: (0755/-rwxr-xr-x) Uid: (11120/clarksob)
> Gid: ( 409/ bil)
> Access: 2005-10-11 10:08:59.876385000 +0100
> Modify: 2005-10-11 09:15:25.731221000 +0100
> Change: 2005-10-11 09:15:25.731256000 +0100
Although I can't actually find the code path in the kernel that
would cause this I think the problem is the device number - that
is a device number of 199:65416 which can't be encoded using the
old device encoding that only supports major and minor devices
up to 255.
Older versions of the stat call only return such numbers and there
are various places in the kernel that return EOVERFLOW if the device
won't fit using the old encoding.
It's possible that making valgrind use stat64 on 32 bit systems
might work around this but the first thing you need to do is to
try a current version of valgrind really.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Barry C. <che...@ya...> - 2005-10-11 09:57:19
|
--- Tom Hughes <to...@co...> wrote:
> In message
>
<200...@we...>
> Barry Clarkson <che...@ya...>
> wrote:
>
> > stat("/develop/home/clarksob/socktest",
> 0xffffa8c0) =
> > -1 EOVERFLOW (Value too large for defined data
> type)
> > write(1016, "--", 2--) = 2
> > getpid() = 9989
> > write(1016, "9989-- ", 79989-- ) = 7
> > write(1016, "Can\'t stat .so/.exe (to
> determin"...,
> > 45Can't stat .so/.exe (to determine its size)?!) =
> 45
> > write(1016, "\n", 1
> >
> > File: `socktest'
> > Size: 8920 Blocks: 18 IO
> Block:
> > 1024 regular file
> > Device: ff0c788h/267437960d Inode: 7639
> > Links: 1
> > Access: (0755/-rwxr-xr-x) Uid: (11120/clarksob)
> > Gid: ( 409/ bil)
> > Access: 2005-10-11 10:08:59.876385000 +0100
> > Modify: 2005-10-11 09:15:25.731221000 +0100
> > Change: 2005-10-11 09:15:25.731256000 +0100
>
> Although I can't actually find the code path in the
> kernel that
> would cause this I think the problem is the device
> number - that
> is a device number of 199:65416 which can't be
> encoded using the
> old device encoding that only supports major and
> minor devices
> up to 255.
>
Thanks for the input. I realised that the executable
resides on EMC storage. When I moved it to a local
internal disk the device number was much smaller and
valgrind worked!
> Older versions of the stat call only return such
> numbers and there
> are various places in the kernel that return
> EOVERFLOW if the device
> won't fit using the old encoding.
>
> It's possible that making valgrind use stat64 on 32
> bit systems
> might work around this but the first thing you need
> to do is to
> try a current version of valgrind really.
>
The same problem occurs with version 3.0.1 - but not
if you move the exe to a local disk.
> Tom
>
> --
> Tom Hughes (to...@co...)
> http://www.compton.nu/
>
>
>
-------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content,
> downloads, discussions,
> and more.
> http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Valgrind-users mailing list
> Val...@li...
>
https://lists.sourceforge.net/lists/listinfo/valgrind-users
>
___________________________________________________________
How much free photo storage do you get? Store your holiday
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
|
|
From: Tom H. <to...@co...> - 2005-10-11 09:04:49
|
In message <200...@we...>
Barry Clarkson <che...@ya...> wrote:
> We are trying to use valgrind on a new machine and
> when valgrind runs it can't stat the exe even though
> it runs the program successfully. Any help would be
> greatly appreciated.
Well can you ls -l the file in question?
My suspicion is that you have search (x) permission on the
directory in question but not read (r) permission so you can
find the file and read it but you can't read it's directory
information.
Otherwise try stracing valgrind and looking for stat calls
on that file and see what the error is.
> valgrind-2.2.0
That's rather old - is there a reason for not using a more
recent version?
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|