Hang on single threaded loop

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

Hang on single threaded loop

by jojy.varghese :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all
I am using the fuse low level API and while testing the file system we  
implemented using fuse, we found out that fuse hangs if we hit too many  
reads in a short interval (say 15 reads in 10 secs). HAs anyone else  
encountered it? After some debugging, I see that the "read"  
in "fuse_kern_chan_receive" is what is stuck.
Any help is much appreciated.

thx
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
fuse-devel mailing list
fuse-devel@...
https://lists.sourceforge.net/lists/listinfo/fuse-devel

Re: Hang on single threaded loop

by Arun Ramachandran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I do not think it has anything to do with the frequency of reads. What is
probably happening is that you are not sending a proper response to one of
the calls- perhaps check close and flush if you have implemented them. The
kernel is probably waiting for response. If the number is after 10 calls
that is what it is ...

-arun
 



-----Original Message-----
From: jojy.varghese@... [mailto:jojy.varghese@...]
Sent: Tuesday, October 20, 2009 4:38 PM
To: fuse-devel@...
Subject: [fuse-devel] Hang on single threaded loop

Hi all
I am using the fuse low level API and while testing the file system we  
implemented using fuse, we found out that fuse hangs if we hit too many  
reads in a short interval (say 15 reads in 10 secs). HAs anyone else  
encountered it? After some debugging, I see that the "read"  
in "fuse_kern_chan_receive" is what is stuck.
Any help is much appreciated.

thx
----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
fuse-devel mailing list
fuse-devel@...
https://lists.sourceforge.net/lists/listinfo/fuse-devel


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
fuse-devel mailing list
fuse-devel@...
https://lists.sourceforge.net/lists/listinfo/fuse-devel

Re: Hang on single threaded loop

by Goswin von Brederlow-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

"Arun Ramachandran" <arunramachandran@...> writes:

> I do not think it has anything to do with the frequency of reads. What is
> probably happening is that you are not sending a proper response to one of
> the calls- perhaps check close and flush if you have implemented them. The
> kernel is probably waiting for response. If the number is after 10 calls
> that is what it is ...
>
> -arun

And I can say that it doesn't hang even after tousands of read, write,
open or close calls. You just have to answere them all as there is a
limited number of requests the kernel will do in parallel.

MfG
        Goswin


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
fuse-devel mailing list
fuse-devel@...
https://lists.sourceforge.net/lists/listinfo/fuse-devel

Re: Hang on single threaded loop

by jojy.varghese :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I was able to figure out the actual issue. It was because i was  
calling "fuse_reply_err" from release only when there was an error. I didnt  
know that the same call has to be made even if there is no error. Maybe the  
API should be renamed to avoid confusion or add another call  
called "fuse_reply_ok" for success case.

thanks

On Oct 22, 2009 8:09am, Goswin von Brederlow <goswin-vb@...> wrote:
> "Arun Ramachandran" arunramachandran@...> writes:



> > I do not think it has anything to do with the frequency of reads. What  
> is

> > probably happening is that you are not sending a proper response to one  
> of

> > the calls- perhaps check close and flush if you have implemented them.  
> The

> > kernel is probably waiting for response. If the number is after 10 calls

> > that is what it is ...

> >

> > -arun



> And I can say that it doesn't hang even after tousands of read, write,

> open or close calls. You just have to answere them all as there is a

> limited number of requests the kernel will do in parallel.



> MfG

> Goswin



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
fuse-devel mailing list
fuse-devel@...
https://lists.sourceforge.net/lists/listinfo/fuse-devel

Re: Hang on single threaded loop

by Goswin von Brederlow-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

jojy.varghese@... writes:

> I was able to figure out the actual issue. It was because i was calling
> "fuse_reply_err" from release only when there was an error. I didnt know that
> the same call has to be made even if there is no error. Maybe the API should be
> renamed to avoid confusion or add another call called "fuse_reply_ok" for
> success case.
>>
>>thanks

In the fuse_lowlevel.h for each callback it states what replies are
valid:
e.g.
         * Release an open file
         * Valid replies:
         *   fuse_reply_err
        void (*release) (fuse_req_t req, fuse_ino_t ino,
                         struct fuse_file_info *fi);

and if no reply is required it will also say so:

         * Initialize filesystem
         * There's no reply to this function
        void (*init) (void *userdata, struct fuse_conn_info *conn);

You have to follow those rules.

I'm wondering though why fuse_reply_none is not a valid reply for
e.g. release() signaling no error. Does fuse_reply_none() differ from
fuse_reply_err(ESUCCESS)?

MfG
        Goswin

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
fuse-devel mailing list
fuse-devel@...
https://lists.sourceforge.net/lists/listinfo/fuse-devel

Re: Hang on single threaded loop

by Miklos Szeredi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 22 Oct 2009, Goswin von Brederlow wrote:
> I'm wondering though why fuse_reply_none is not a valid reply for
> e.g. release() signaling no error. Does fuse_reply_none() differ from
> fuse_reply_err(ESUCCESS)?

Yes, fuse_reply_none() basically just frees the request structure,
while fuse_reply_err() will always send a reply to the kernel.

The release request is special in that it needs a reply, but actually
ignores the return value from it.

Thanks,
Miklos

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
fuse-devel mailing list
fuse-devel@...
https://lists.sourceforge.net/lists/listinfo/fuse-devel