List Info

Thread: fuse works on command line but not from hotplug




fuse works on command line but not from hotplug
user name
2007-07-19 12:17:18
Hi,

I am working on an ARM platform.  Fuse is working, and my
fuse program works
fine if I launch it from the command line.  However, if it
is launched from
hotplug it fails to mount.  I have some debug output.  It
includes the
uid/euid env and env variables from inside the program.

In both cases I am using the same command to run the
program:
/usr/local/plugins/osdplug/ipod.fuse /mnt/tmpfs/media/ipod

I'm at a loss as to where I should look next.

thanks,
leif


===========================From
Hotplug==================================
uid[0] euid[0]
[ACTION=add]
[HOME=/]
[SEQNUM=740]
[DEVPATH=/devices/platform/DM320-USB-HCD.0/usb1/1-1/1-1:1.0
/host3/target3:0:0/3:0:0:0]
[SUBSYSTEM=scsi]
[PATH=/sbin:/bin:/usr/sbin:/usr/bin]
[PHYSDEVBUS=scsi]
[PWD=/]
connectToITDB()
itdbInfile[/mnt/tmpfs/USB-ipod/iPod_Control/iTunes/iTunesDB]

itdb: 0x17b10
initialize is fine
fuse_main gave ret[1]
=================================From Command
line===================
uid[0] euid[0]
[USER=root]
[OLDPWD=/root]
[HOME=/root]
[LOGNAME=root]
[TERM=vt102]
[PATH=/usr/sbin:/bin:/usr/bin:/sbin]
[SHELL=/bin/sh]
[PWD=/mnt/tmpfs]
connectToITDB()
itdbInfile[/mnt/tmpfs/USB-ipod/iPod_Control/iTunes/iTunesDB]

itdb: 0x17b10
initialize is fine
============================================================
=======
------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
fuse-devel mailing list
fuse-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel

Re: fuse works on command line but not from hotplug
user name
2007-07-19 18:02:28
Hi,

I've done some further testing using the hello world
example.  It exhibits
the same behaviour as my app.  The source I'm using for the
hello app is
http://fu
se.sourceforge.net/helloworld.html
(with a #define FUSE_USE_VERSION 25 added at the top for api
compatibility).
If I call the program from hotplug, it returns 127.  If I
execute it from
the command line, it works fine.

Any help would be appreciated.

leif

On 7/19/07, Leif Johnson <leif.t.johnsongmail.com> wrote:
>
> Hi,
>
> I am working on an ARM platform.  Fuse is working, and
my fuse program
> works fine if I launch it from the command line. 
However, if it is launched
> from hotplug it fails to mount.  I have some debug
output.  It includes the
> uid/euid env and env variables from inside the
program.
>
> In both cases I am using the same command to run the
program:
> /usr/local/plugins/osdplug/ipod.fuse
/mnt/tmpfs/media/ipod
>
> I'm at a loss as to where I should look next.
>
> thanks,
> leif
>
>
> ===========================From
Hotplug==================================
> uid[0] euid[0]
> [ACTION=add]
> [HOME=/]
> [SEQNUM=740]
>
[DEVPATH=/devices/platform/DM320-USB-HCD.0/usb1/1-1/1-1:1.0/
host3/target3:0:0/3:0:0:0]
>
> [SUBSYSTEM=scsi]
> [PATH=/sbin:/bin:/usr/sbin:/usr/bin]
> [PHYSDEVBUS=scsi]
> [PWD=/]
> connectToITDB()
>
itdbInfile[/mnt/tmpfs/USB-ipod/iPod_Control/iTunes/iTunesDB]

> itdb: 0x17b10
> initialize is fine
> fuse_main gave ret[1]
> =================================From Command
line===================
> uid[0] euid[0]
> [USER=root]
> [OLDPWD=/root]
> [HOME=/root]
> [LOGNAME=root]
> [TERM=vt102]
> [PATH=/usr/sbin:/bin:/usr/bin:/sbin]
> [SHELL=/bin/sh]
> [PWD=/mnt/tmpfs]
> connectToITDB()
>
itdbInfile[/mnt/tmpfs/USB-ipod/iPod_Control/iTunes/iTunesDB]

> itdb: 0x17b10
> initialize is fine
>
============================================================
=======
>
------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
fuse-devel mailing list
fuse-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel

Re: fuse works on command line but not from hotplug
country flaguser name
Germany
2007-07-20 02:18:36
On Jul 19 2007 18:02, Leif Johnson wrote:
>Hi,
>
>I've done some further testing using the hello world
example.  It exhibits
>the same behaviour as my app.  The source I'm using for
the hello app is
>http://fu
se.sourceforge.net/helloworld.html
>(with a #define FUSE_USE_VERSION 25 added at the top for
api compatibility).
>If I call the program from hotplug, it returns 127.  If
I execute it from
>the command line, it works fine.
>
>Any help would be appreciated.

In main(), add:

	int flp=0;
	while(!flp);

then when the program runs, attach with gdb, set flp=1
(using "p flp=1") 
and step through your program and see where it goes wrong.


	Jan
-- 

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
fuse-devel mailing list
fuse-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel

Re: fuse works on command line but not from hotplug
user name
2007-07-22 12:44:12
Thanks for everyones help so far.  I also realized that I
did not specify
what version of fuse I was using, it is being built from
fuse-2.6.5 and it
is on the linux kernel 2.6.15.  It is an embedded device
(ARM).

Sorry in advance for the long message.

On 7/20/07, Jan Engelhardt <jengelhcomputergmbh.de> wrote:
>
>
> In main(), add:
>
>         int flp=0;
>         while(!flp);
>
> then when the program runs, attach with gdb, set flp=1
(using "p flp=1")
> and step through your program and see where it goes
wrong.
>

Sadly, either our debugging tool isn't that good, or I'm not
that good at
using it.  I have to run gdbserver on the target device and
connect to it
(with arm-linux-gdb) from my pc over tcpip.  I have tried
waiting loops in
different places etc.  But the program would seem to fail in
other processes
(eg after forks or execp's).

I tried a very simple test, I added a waiting loop (pretty
much identical to
Jan's suggestion), connected to the program with gdbserver
etc.  Then exited
the loop and hit continue to let the program go.  If I did
this all from the
command line, which normally worked, I would then get an
error:
~ # /usr/local/bin/hello /mnt/tmpfs/media/ipod
~ # ls /mnt/tmpfs/media/ipod
ls: /mnt/tmpfs/media/ipod: Transport endpoint is not
connected

Which is frustrating.

Then I decided to debug with fprintf statements to stdout. 
I sprinkled
these along the trail in libfuse (I can give you a detailed
version of
where), AND THEN EVERYTHING WORKED.  So the only difference
was fprintf to
stdout statements, and now I can successfully run my
programs (the simple
hello program and my own ipod.fuse program) from hotplug.

I was thinking that I should try to upgrade to 2.7.0 and
retest, but this is
not trivial, so I thought I would check back here for
ideas.

thanks again,
leif
------------------------------------------------------------
-------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and
a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
fuse-devel mailing list
fuse-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )