Some valgrind memory errors

View: New views
2 Messages — Rating Filter:   Alert me  

Some valgrind memory errors

by Daniel Benamy-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I'm using libfuse 2.7.2-1ubuntu2 on Hardy and get some memory errors in
valgrind when I close the filesystem program. I mount the example filesystem
and then hit control c without accessing it, and get the following. It
doesn't seem to make a difference to me, but maybe it's something that should
be fixed? Without the -d option, I get some additional errors before it goes
into the background.
Thanks!
Dan

$ valgrind --leak-check=yes --show-reachable=yes ./fusexmp -d mnt/
==8228== Memcheck, a memory error detector.
==8228== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==8228== Using LibVEX rev 1804, a library for dynamic binary translation.
==8228== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==8228== Using valgrind-3.3.0-Debian, a dynamic binary instrumentation
framework.
==8228== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==8228== For more details, rerun with: -v
==8228==
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56
INIT: 7.9
flags=0x0000000b
max_readahead=0x00020000
   INIT: 7.8
   flags=0x00000001
   max_readahead=0x00020000
   max_write=0x00020000
   unique: 1, error: 0 (Success), outsize: 40
unique: 2, opcode: STATFS (17), nodeid: 1, insize: 40
   unique: 2, error: 0 (Success), outsize: 96
==8228== Invalid read of size 8
==8228==    at 0x4015EE4: (within /lib/ld-2.7.so)
==8228==    by 0x400AB93: (within /lib/ld-2.7.so)
==8228==    by 0x40061E4: (within /lib/ld-2.7.so)
==8228==    by 0x4008677: (within /lib/ld-2.7.so)
==8228==    by 0x4012048: (within /lib/ld-2.7.so)
==8228==    by 0x400DDF5: (within /lib/ld-2.7.so)
==8228==    by 0x401191A: (within /lib/ld-2.7.so)
==8228==    by 0x577CF7F: (within /lib/libc-2.7.so)
==8228==    by 0x400DDF5: (within /lib/ld-2.7.so)
==8228==    by 0x577D0E6: __libc_dlopen_mode (in /lib/libc-2.7.so)
==8228==    by 0x5461EAB: pthread_cancel_init (in /lib/libpthread-2.7.so)
==8228==    by 0x545E9F7: pthread_cancel (in /lib/libpthread-2.7.so)
==8228==  Address 0x5a4c728 is 16 bytes inside a block of size 19 alloc'd
==8228==    at 0x4C22FAB: malloc (vg_replace_malloc.c:207)
==8228==    by 0x4008B75: (within /lib/ld-2.7.so)
==8228==    by 0x4012048: (within /lib/ld-2.7.so)
==8228==    by 0x400DDF5: (within /lib/ld-2.7.so)
==8228==    by 0x401191A: (within /lib/ld-2.7.so)
==8228==    by 0x577CF7F: (within /lib/libc-2.7.so)
==8228==    by 0x400DDF5: (within /lib/ld-2.7.so)
==8228==    by 0x577D0E6: __libc_dlopen_mode (in /lib/libc-2.7.so)
==8228==    by 0x5461EAB: pthread_cancel_init (in /lib/libpthread-2.7.so)
==8228==    by 0x545E9F7: pthread_cancel (in /lib/libpthread-2.7.so)
==8228==    by 0x4E359AE: fuse_session_loop_mt (in /lib/libfuse.so.2.7.2)
==8228==    by 0x4E39719: (within /lib/libfuse.so.2.7.2)
==8228==
==8228== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 8 from 1)
==8228== malloc/free: in use at exit: 1,516 bytes in 5 blocks.
==8228== malloc/free: 56 allocs, 51 frees, 504,655 bytes allocated.
==8228== For counts of detected errors, rerun with: -v
==8228== searching for pointers to 5 not-freed blocks.
==8228== checked 136,088 bytes.
==8228==
==8228==
==8228== 19 bytes in 1 blocks are still reachable in loss record 1 of 5
==8228==    at 0x4C22FAB: malloc (vg_replace_malloc.c:207)
==8228==    by 0x400AC49: (within /lib/ld-2.7.so)
==8228==    by 0x40061E4: (within /lib/ld-2.7.so)
==8228==    by 0x4008677: (within /lib/ld-2.7.so)
==8228==    by 0x4012048: (within /lib/ld-2.7.so)
==8228==    by 0x400DDF5: (within /lib/ld-2.7.so)
==8228==    by 0x401191A: (within /lib/ld-2.7.so)
==8228==    by 0x577CF7F: (within /lib/libc-2.7.so)
==8228==    by 0x400DDF5: (within /lib/ld-2.7.so)
==8228==    by 0x577D0E6: __libc_dlopen_mode (in /lib/libc-2.7.so)
==8228==    by 0x5461EAB: pthread_cancel_init (in /lib/libpthread-2.7.so)
==8228==    by 0x545E9F7: pthread_cancel (in /lib/libpthread-2.7.so)
==8228==
==8228==
==8228== 19 bytes in 1 blocks are still reachable in loss record 2 of 5
==8228==    at 0x4C22FAB: malloc (vg_replace_malloc.c:207)
==8228==    by 0x4008B75: (within /lib/ld-2.7.so)
==8228==    by 0x4012048: (within /lib/ld-2.7.so)
==8228==    by 0x400DDF5: (within /lib/ld-2.7.so)
==8228==    by 0x401191A: (within /lib/ld-2.7.so)
==8228==    by 0x577CF7F: (within /lib/libc-2.7.so)
==8228==    by 0x400DDF5: (within /lib/ld-2.7.so)
==8228==    by 0x577D0E6: __libc_dlopen_mode (in /lib/libc-2.7.so)
==8228==    by 0x5461EAB: pthread_cancel_init (in /lib/libpthread-2.7.so)
==8228==    by 0x545E9F7: pthread_cancel (in /lib/libpthread-2.7.so)
==8228==    by 0x4E359AE: fuse_session_loop_mt (in /lib/libfuse.so.2.7.2)
==8228==    by 0x4E39719: (within /lib/libfuse.so.2.7.2)
==8228==
==8228==
==8228== 56 bytes in 1 blocks are still reachable in loss record 3 of 5
==8228==    at 0x4C22FAB: malloc (vg_replace_malloc.c:207)
==8228==    by 0x400C679: (within /lib/ld-2.7.so)
==8228==    by 0x40120A8: (within /lib/ld-2.7.so)
==8228==    by 0x400DDF5: (within /lib/ld-2.7.so)
==8228==    by 0x401191A: (within /lib/ld-2.7.so)
==8228==    by 0x577CF7F: (within /lib/libc-2.7.so)
==8228==    by 0x400DDF5: (within /lib/ld-2.7.so)
==8228==    by 0x577D0E6: __libc_dlopen_mode (in /lib/libc-2.7.so)
==8228==    by 0x5461EAB: pthread_cancel_init (in /lib/libpthread-2.7.so)
==8228==    by 0x545E9F7: pthread_cancel (in /lib/libpthread-2.7.so)
==8228==    by 0x4E359AE: fuse_session_loop_mt (in /lib/libfuse.so.2.7.2)
==8228==    by 0x4E39719: (within /lib/libfuse.so.2.7.2)
==8228==
==8228==
==8228== 264 bytes in 1 blocks are still reachable in loss record 4 of 5
==8228==    at 0x4C220BC: calloc (vg_replace_malloc.c:397)
==8228==    by 0x400F8F4: (within /lib/ld-2.7.so)
==8228==    by 0x4012328: (within /lib/ld-2.7.so)
==8228==    by 0x400DDF5: (within /lib/ld-2.7.so)
==8228==    by 0x401191A: (within /lib/ld-2.7.so)
==8228==    by 0x577CF7F: (within /lib/libc-2.7.so)
==8228==    by 0x400DDF5: (within /lib/ld-2.7.so)
==8228==    by 0x577D0E6: __libc_dlopen_mode (in /lib/libc-2.7.so)
==8228==    by 0x5461EAB: pthread_cancel_init (in /lib/libpthread-2.7.so)
==8228==    by 0x545E9F7: pthread_cancel (in /lib/libpthread-2.7.so)
==8228==    by 0x4E359AE: fuse_session_loop_mt (in /lib/libfuse.so.2.7.2)
==8228==    by 0x4E39719: (within /lib/libfuse.so.2.7.2)
==8228==
==8228==
==8228== 1,158 bytes in 1 blocks are still reachable in loss record 5 of 5
==8228==    at 0x4C220BC: calloc (vg_replace_malloc.c:397)
==8228==    by 0x400A9D4: (within /lib/ld-2.7.so)
==8228==    by 0x40061E4: (within /lib/ld-2.7.so)
==8228==    by 0x4008677: (within /lib/ld-2.7.so)
==8228==    by 0x4012048: (within /lib/ld-2.7.so)
==8228==    by 0x400DDF5: (within /lib/ld-2.7.so)
==8228==    by 0x401191A: (within /lib/ld-2.7.so)
==8228==    by 0x577CF7F: (within /lib/libc-2.7.so)
==8228==    by 0x400DDF5: (within /lib/ld-2.7.so)
==8228==    by 0x577D0E6: __libc_dlopen_mode (in /lib/libc-2.7.so)
==8228==    by 0x5461EAB: pthread_cancel_init (in /lib/libpthread-2.7.so)
==8228==    by 0x545E9F7: pthread_cancel (in /lib/libpthread-2.7.so)
==8228==
==8228== LEAK SUMMARY:
==8228==    definitely lost: 0 bytes in 0 blocks.
==8228==      possibly lost: 0 bytes in 0 blocks.
==8228==    still reachable: 1,516 bytes in 5 blocks.
==8228==         suppressed: 0 bytes in 0 blocks.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
fuse-devel mailing list
fuse-devel@...
https://lists.sourceforge.net/lists/listinfo/fuse-devel

Re: Some valgrind memory errors

by Miklos Szeredi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 15 Jul 2008, Daniel Benamy wrote:
> I'm using libfuse 2.7.2-1ubuntu2 on Hardy and get some memory errors
> in valgrind when I close the filesystem program. I mount the example
> filesystem and then hit control c without accessing it, and get the
> following. It doesn't seem to make a difference to me, but maybe
> it's something that should be fixed?

I don't get the memory access errors here (glibc-2.6.1,
valgrind-3.2.3).  My guess is that these are not real errors, just
pthread_cancel() not playing nice with valgrind.

Thanks,
Miklos

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
fuse-devel mailing list
fuse-devel@...
https://lists.sourceforge.net/lists/listinfo/fuse-devel
LightInTheBox - Buy quality products at wholesale price