valgrind --track-fds, fuse and other issues
Florian Weimer
fweimer@redhat.com
Sat Sep 21 17:40:30 GMT 2024
* Mark Wielaard:
> There was also a question about using valgrind on a program that
> implements a fuse file system, like the new glibc test support helper
> by Florian. I didn't give a very good answer to that one. Because I
> forgot that valgrind already should be able to handle that. Valgrind
> obviously already has to handle blocking syscalls that could be
> unblock by another thread. There is a "sim hint" to extend this to
> syscalls that might block when the underlying file system managed by
> the program itself.
>
> --sim-hints=hint1,hint2,...
> Pass miscellaneous hints to Valgrind which slightly modify the
> simulated behaviour in nonstandard or dangerous ways, possibly to
> help the simulation of strange features. By default no hints are
> enabled. Use with caution! Currently known hints are:
>
> [...]
>
> • fuse-compatible: Enable special handling for certain system
> calls that may block in a FUSE file-system. This may be
> necessary when running Valgrind on a multi-threaded program
> that uses one thread to manage a FUSE file-system and another
> thread to access that file-system.
>
> Please let me know if this still doesn't work. This hint hasn't been
> updated in a long time and there might be some newer syscalls that
> should enable this hint, but don't (yet).
Very interesting! It gets past a lot of things, but support for the
readlink system call appears to be missing. Nevertheless, it already
found test bugs:
support: Fix memory leaks in FUSE tests
<https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=455c7622835d>
Thanks,
Florian
More information about the Libc-alpha
mailing list