Discussion:
[fuse-devel] valgrind & fuse: failed to exec fusermount: Permission denied
saf
2006-01-20 11:03:02 UTC
Permalink
Hi,

I have a new problem to run valgrind with FUSE:
***@rack ~/cvs/client/fuse/src $ valgrind ./noofs_fuse -c 50 -i 120 root:***@localhost:4242 -f -d -o allow_other
/mnt2
...
Mounting now filesystem via FUSE...
***@un_init(...) [00020]:
==15072==
==15072== Thread 1:
==15072== Syscall param socketcall.recvmsg(msg) points to uninitialised byte(s)
==15072== at 0x404F7DE: recvmsg (in /lib/tls/libpthread-2.3.5.so)
==15072== by 0x403F54F: fuse_mount (mount.c:281)
==15072== by 0x403ECD1: fuse_setup_common (helper.c:203)
==15072== by 0x403EEAD: fuse_main_common (helper.c:262)
==15072== by 0x804CA75: main (main.c:59)
==15072== Address 0xBEF96748 is on thread 1's stack
fuse: failed to exec fusermount: Permission denied

I don't understand why I get Permission denied, I tried also as root user with root permissions,
I got the same error.
It seems that it comes from recvmsg of the fuse module to the fuse lib?

I use fuse 2.5.0 and valgrind-3.1.0-Debian.

Does some body knows why I get this error? I need to debug my fuse client.
--
Best regards,
Stephan FERRARO
NOOFS Core Developper - http://www.noofs.org/
GnuPG public key: gpg --keyserver www.keyserver.net --recv-key 94B2664F
Miklos Szeredi
2006-01-20 11:35:46 UTC
Permalink
Post by saf
I use fuse 2.5.0 and valgrind-3.1.0-Debian.
Does some body knows why I get this error? I need to debug my fuse client.
I have valgrind-2.4.0 (also debian), and it works OK. Maybe something
changed in valgrind-3?

Miklos
saf
2006-01-20 16:30:11 UTC
Permalink
Hi,
Post by Miklos Szeredi
Post by saf
I use fuse 2.5.0 and valgrind-3.1.0-Debian.
Does some body knows why I get this error? I need to debug my fuse client.
I have valgrind-2.4.0 (also debian), and it works OK. Maybe something
changed in valgrind-3?
Can you try with valgrind-3?

Or I will try to get the valgrind-2.4.0 to retest with this version.
--
Best regards,
Stephan FERRARO
NOOFS Core Developper - http://www.noofs.org/
GnuPG public key: gpg --keyserver www.keyserver.net --recv-key 94B2664F
saf
2006-01-20 17:26:31 UTC
Permalink
Post by Miklos Szeredi
Post by saf
I use fuse 2.5.0 and valgrind-3.1.0-Debian.
Does some body knows why I get this error? I need to debug my fuse client.
I have valgrind-2.4.0 (also debian), and it works OK. Maybe something
changed in valgrind-3?
I tested now with valgrind-2.4.1, it works fine.
Something has changed in valgrind-3 ? I can't debug with strace, please try on your side,
because fuse does no more work with valgrind 3!
--
Best regards,
Stephan FERRARO
NOOFS Core Developper - http://www.noofs.org/
GnuPG public key: gpg --keyserver www.keyserver.net --recv-key 94B2664F
Miklos Szeredi
2006-01-20 19:16:52 UTC
Permalink
I tested now with valgrind-2.4.1, it works fine. Something has
changed in valgrind-3 ? I can't debug with strace, please try on
your side, because fuse does no more work with valgrind 3!
Maybe it has an option to disable tracing forked processes.

My guess it fails to trace fusermount since that is a suid executable.

Miklos
Valient Gough
2006-01-20 19:16:04 UTC
Permalink
Post by saf
fuse: failed to exec fusermount: Permission denied
I don't understand why I get Permission denied, I tried also as root user with root permissions,
I got the same error.
I don't know the answer, but I had the same problem recently and made
a workaround, although it may be difficult to apply if you're not
using the fuse-lowlevel interface.

In my case, I was debugging a perl wrapper for the fuse-lowlevel
interface. In the lowlevel interface, you create the mount (which
calls fusermount and produces a file descriptor), then pass the file
descriptor on to the fuse-lowlevel code. Since only the mount part
was having a problem, I made a simple perl server which did the mount
and then proxied all messages to any connected client. That way the
client calls the server for the mount step and then uses the fd to the
server for the rest of the lowlevel interface. Then I have no
problems with valgrind.

Just an idea. Wasn't too hard to make the proxy server, which might
be faster then figuring out how to fix valgrind if you're stuck on
this step. My code is at home, and I'm not, so I'm not able to post
it at the moment.

Valient
Harris, Jeff
2006-01-20 19:30:12 UTC
Permalink
The issue is the suid process. We have run into this issue with other
programs we've been profiling. Removing the suid bit and running as
root allowed valgrind to work.

Jeff

-----Original Message-----
From: fuse-devel-***@lists.sourceforge.net
[mailto:fuse-devel-***@lists.sourceforge.net] On Behalf Of Miklos
Szeredi
Sent: Friday, January 20, 2006 2:17 PM
To: ***@archivum.info
Cc: fuse-***@lists.sourceforge.net
Subject: Re: [fuse-devel] valgrind & fuse: failed to exec fusermount:
Permission denied
I tested now with valgrind-2.4.1, it works fine. Something has
changed in valgrind-3 ? I can't debug with strace, please try on
your side, because fuse does no more work with valgrind 3!
Maybe it has an option to disable tracing forked processes.

My guess it fails to trace fusermount since that is a suid executable.

Miklos


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
Richard Dawe
2006-01-20 20:56:50 UTC
Permalink
Hello.
Post by saf
/mnt2
...
Mounting now filesystem via FUSE...
==15072==
==15072== Syscall param socketcall.recvmsg(msg) points to uninitialised byte(s)
==15072== at 0x404F7DE: recvmsg (in /lib/tls/libpthread-2.3.5.so)
==15072== by 0x403F54F: fuse_mount (mount.c:281)
==15072== by 0x403ECD1: fuse_setup_common (helper.c:203)
==15072== by 0x403EEAD: fuse_main_common (helper.c:262)
==15072== by 0x804CA75: main (main.c:59)
==15072== Address 0xBEF96748 is on thread 1's stack
fuse: failed to exec fusermount: Permission denied
I don't understand why I get Permission denied, I tried also as root user with root permissions,
I got the same error.
It seems that it comes from recvmsg of the fuse module to the fuse lib?
I use fuse 2.5.0 and valgrind-3.1.0-Debian.
Does some body knows why I get this error? I need to debug my fuse client.
I've seen similar problems with setuid programs (e.g.: qmail-queue from
qmail). It may be this bug:

"executing ssh from inside valgrind fails"
<http://bugs.kde.org/show_bug.cgi?id=119404>

It's apparently fixed in the subversion trunk version of valgrind,
although I haven't tried that.

Bye, Rich =]
--
Richard Dawe [ http://homepages.nildram.co.uk/~phekda/richdawe/ ]

"You can't evaluate a man by logic alone."
-- McCoy, "I, Mudd", Star Trek
saf
2006-01-23 14:09:17 UTC
Permalink
Hi,

I removed the setuid bit of fusermount, and now it works.
I did not found an option to desactivate in valgrind the tracing of
setuid executables.

saf
Post by Richard Dawe
Hello.
Post by saf
...
Mounting now filesystem via FUSE...
==15072==
==15072== Syscall param socketcall.recvmsg(msg) points to uninitialised byte(s)
==15072== at 0x404F7DE: recvmsg (in /lib/tls/libpthread-2.3.5.so)
==15072== by 0x403F54F: fuse_mount (mount.c:281)
==15072== by 0x403ECD1: fuse_setup_common (helper.c:203)
==15072== by 0x403EEAD: fuse_main_common (helper.c:262)
==15072== by 0x804CA75: main (main.c:59)
==15072== Address 0xBEF96748 is on thread 1's stack
fuse: failed to exec fusermount: Permission denied
I don't understand why I get Permission denied, I tried also as root user
with root permissions,
I got the same error.
It seems that it comes from recvmsg of the fuse module to the fuse lib?
I use fuse 2.5.0 and valgrind-3.1.0-Debian.
Does some body knows why I get this error? I need to debug my fuse client.
I've seen similar problems with setuid programs (e.g.: qmail-queue from
"executing ssh from inside valgrind fails"
<http://bugs.kde.org/show_bug.cgi?id=119404>
It's apparently fixed in the subversion trunk version of valgrind,
although I haven't tried that.
Bye, Rich =]
--
Richard Dawe [ http://homepages.nildram.co.uk/~phekda/richdawe/ ]
"You can't evaluate a man by logic alone."
-- McCoy, "I, Mudd", Star Trek
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
fuse-devel mailing list
https://lists.sourceforge.net/lists/listinfo/fuse-devel
--
Best regards,
Stephan FERRARO
NOOFS Core Developper - http://www.noofs.org/
GnuPG public key: gpg --keyserver www.keyserver.net --recv-key 94B2664F
Loading...