hello.py fails

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

hello.py fails

Nikolaus Rath
Hello,

I noticed that the hello.py example that comes with python fuse runs
fine with -f and -d, but for some reason fails with -s:

# python /usr/share/doc/python-fuse/examples/hello.py -f -s mp/
Traceback (most recent call last):
  File "/usr/share/doc/python-fuse/examples/hello.py", line 58, in readdir
    yield fuse.Direntry(r)
  File "/usr/lib/python2.6/dist-packages/fuse.py", line 438, in __init__
    FuseStruct.__init__(self, **kw)
  File "/usr/lib/python2.6/dist-packages/fuse.py", line 371, in __init__
    for k in kw:
AttributeError: 'MyStat' object has no attribute 'st_blocks'
Traceback (most recent call last):


Can someone reproduce this? And why does it only occur with -s for
single threaded operation? The error seems totally unrelated to it.


Puzzled,

   -Nikolaus

--
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: hello.py fails

Csaba Henk
On 2009-05-26, Nikolaus Rath <[hidden email]> wrote:

> I noticed that the hello.py example that comes with python fuse runs
> fine with -f and -d, but for some reason fails with -s:
>
> # python /usr/share/doc/python-fuse/examples/hello.py -f -s mp/
> Traceback (most recent call last):
>   File "/usr/share/doc/python-fuse/examples/hello.py", line 58, in readdir
>     yield fuse.Direntry(r)
>   File "/usr/lib/python2.6/dist-packages/fuse.py", line 438, in __init__
>     FuseStruct.__init__(self, **kw)
>   File "/usr/lib/python2.6/dist-packages/fuse.py", line 371, in __init__
>     for k in kw:
> AttributeError: 'MyStat' object has no attribute 'st_blocks'
> Traceback (most recent call last):
>
>
> Can someone reproduce this? And why does it only occur with -s for
> single threaded operation? The error seems totally unrelated to it.

Utterly strange. I don't see how the MyStat object comes to picture. The
code seems to handle a readdir request, where fuse.Direntry instances
occur and not MyStat instances.

And I can't reproduce. So the usual stupid questions... Does "-s"
determinisctically imply this behaviour? What are you doing exactly in
order to trigger this? What is the version of your whatever (fuse,
python, fuse-py, kernel...)?  (emphasis on fuse-py's exact package
version id so that I can see how it is patched). (I don't think I could
figure out much from the answers to this questions, but if you say this
behaviour is deterministic, I can try to reproduce it within a virtual
machine.)

Csaba


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: hello.py fails

Nikolaus Rath
Csaba Henk <[hidden email]> writes:

> [This message has also been posted to gmane.comp.file-systems.fuse.devel.]
> On 2009-05-26, Nikolaus Rath <[hidden email]> wrote:
>> I noticed that the hello.py example that comes with python fuse runs
>> fine with -f and -d, but for some reason fails with -s:
>>
>> # python /usr/share/doc/python-fuse/examples/hello.py -f -s mp/
>> Traceback (most recent call last):
>>   File "/usr/share/doc/python-fuse/examples/hello.py", line 58, in readdir
>>     yield fuse.Direntry(r)
>>   File "/usr/lib/python2.6/dist-packages/fuse.py", line 438, in __init__
>>     FuseStruct.__init__(self, **kw)
>>   File "/usr/lib/python2.6/dist-packages/fuse.py", line 371, in __init__
>>     for k in kw:
>> AttributeError: 'MyStat' object has no attribute 'st_blocks'
>> Traceback (most recent call last):
>>
>>
>> Can someone reproduce this? And why does it only occur with -s for
>> single threaded operation? The error seems totally unrelated to it.
>
> Utterly strange. I don't see how the MyStat object comes to picture. The
> code seems to handle a readdir request, where fuse.Direntry instances
> occur and not MyStat instances.

Yeah.

> And I can't reproduce. So the usual stupid questions...

Do you have an Amazon EC2 Account? You can easily reproduce it there
with the Ubuntu Jaunty image:

$ ec2-run-instances ami-bf5eb9d6 -k gsg-keypair

$ ec2-describe-instances
RESERVATION r-e99ffb80 298888363381 default
INSTANCE i-c996d6a0 ami-bf5eb9d6 ec2-174-129-141-219.compute-1.amazonaws.com domU-12-31-39-03-BC-D7.compute-1.internal running gsg-keypair 0 m1.small 2009-05-27T12:53:47+0000 us-east-1b aki-a71cf9ce ari-a51cf9cc

$ ssh -l root ec2-174-129-141-219.compute-1.amazonaws.com

# apt-get update
# apt-get install python-fuse
# mkdir tmp
# python /usr/share/doc/python-fuse/examples/hello.py -f tmp &
# ls tmp/ --> works
# fusermount -u tmp
# python /usr/share/doc/python-fuse/examples/hello.py -f -s tmp &
# ls tmp/ --> does not work

> Does "-s" determinisctically imply this behaviour?

Yes, absolutely. As you can see above.

> What are you doing exactly in
> order to trigger this? What is the version of your whatever (fuse,
> python, fuse-py, kernel...)?  (emphasis on fuse-py's exact package
> version id so that I can see how it is patched). (I don't think I could
> figure out much from the answers to this questions, but if you say this
> behaviour is deterministic, I can try to reproduce it within a virtual
> machine.)

Where do I find the exact fuse-py package version? I looked for it in
the fuse.py file, but there was no version number.

The Ubuntu package versions are:

# apt-cache show python-fuse| grep Version
Version: 1:0.2-pre3-9build1

# apt-cache show fuse-utils  | grep Version
Version: 2.7.4-1.1ubuntu4

# python --version
Python 2.6.2

# uname -a
Linux domU-12-31-39-03-BC-D7 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 GNU/Linux

The above is from EC2. My local machine has the same fuse and python
versions but

$ uname -a
Linux vostro 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux


Hope that helps,

   -Nikolaus

--
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: hello.py fails

Nikolaus Rath
Nikolaus Rath <[hidden email]> writes:
> Csaba Henk <[hidden email]> writes:
>> And I can't reproduce. So the usual stupid questions...
>
> Do you have an Amazon EC2 Account? You can easily reproduce it there
> with the Ubuntu Jaunty image:

Btw, I guess you should also be able to reproduce it by booting from the
Ubuntu Jaunty Live CD (but I did not test that).


Best,

   -Nikolaus

--
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: hello.py fails

Csaba Henk
In reply to this post by Nikolaus Rath
On 2009-05-27, Nikolaus Rath <[hidden email]> wrote:

> Csaba Henk <[hidden email]> writes:
>> [This message has also been posted to gmane.comp.file-systems.fuse.devel.]
>> On 2009-05-26, Nikolaus Rath <[hidden email]> wrote:
>>> I noticed that the hello.py example that comes with python fuse runs
>>> fine with -f and -d, but for some reason fails with -s:
>>>
>>> # python /usr/share/doc/python-fuse/examples/hello.py -f -s mp/
>>> Traceback (most recent call last):
>>>   File "/usr/share/doc/python-fuse/examples/hello.py", line 58, in readdir
>>>     yield fuse.Direntry(r)
>>>   File "/usr/lib/python2.6/dist-packages/fuse.py", line 438, in __init__
>>>     FuseStruct.__init__(self, **kw)
>>>   File "/usr/lib/python2.6/dist-packages/fuse.py", line 371, in __init__
>>>     for k in kw:
>>> AttributeError: 'MyStat' object has no attribute 'st_blocks'
>>> Traceback (most recent call last):
>>>
>>>
>>> Can someone reproduce this? And why does it only occur with -s for
>>> single threaded operation? The error seems totally unrelated to it.
>>
>> Utterly strange. I don't see how the MyStat object comes to picture. The
>> code seems to handle a readdir request, where fuse.Direntry instances
>> occur and not MyStat instances.
>
> Yeah.
>
>> And I can't reproduce. So the usual stupid questions...
>
> Do you have an Amazon EC2 Account? You can easily reproduce it there
> with the Ubuntu Jaunty image:
>
> $ ec2-run-instances ami-bf5eb9d6 -k gsg-keypair
>
> $ ec2-describe-instances
> RESERVATION r-e99ffb80 298888363381 default
> INSTANCE i-c996d6a0 ami-bf5eb9d6 ec2-174-129-141-219.compute-1.amazonaws.com domU-12-31-39-03-BC-D7.compute-1.internal running gsg-keypair 0 m1.small 2009-05-27T12:53:47+0000 us-east-1b aki-a71cf9ce ari-a51cf9cc
>
> $ ssh -l root ec2-174-129-141-219.compute-1.amazonaws.com
>
> # apt-get update
> # apt-get install python-fuse
> # mkdir tmp
> # python /usr/share/doc/python-fuse/examples/hello.py -f tmp &
> # ls tmp/ --> works
> # fusermount -u tmp
> # python /usr/share/doc/python-fuse/examples/hello.py -f -s tmp &
> # ls tmp/ --> does not work
>
>> Does "-s" determinisctically imply this behaviour?
>
> Yes, absolutely. As you can see above.
>
>> What are you doing exactly in
>> order to trigger this? What is the version of your whatever (fuse,
>> python, fuse-py, kernel...)?  (emphasis on fuse-py's exact package
>> version id so that I can see how it is patched). (I don't think I could
>> figure out much from the answers to this questions, but if you say this
>> behaviour is deterministic, I can try to reproduce it within a virtual
>> machine.)
>
> Where do I find the exact fuse-py package version? I looked for it in
> the fuse.py file, but there was no version number.
>
> The Ubuntu package versions are:
>
> # apt-cache show python-fuse| grep Version
> Version: 1:0.2-pre3-9build1
>
> # apt-cache show fuse-utils  | grep Version
> Version: 2.7.4-1.1ubuntu4
>
> # python --version
> Python 2.6.2
>
> # uname -a
> Linux domU-12-31-39-03-BC-D7 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 GNU/Linux
>
> The above is from EC2. My local machine has the same fuse and python
> versions but
>
> $ uname -a
> Linux vostro 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux

Yeah, I was able to reproduce with the Jaunty LiveCD. I bisected the
issue and found out that it occurs due to the bug fixed here:

  http://mercurial.creo.hu/repos/fuse-python-hg/index.cgi/rev/92f3f49abbc5

... which has been committed just after the 0.2-pre3 release; cf.
Debuntu uses 0.2-pre3 for some mystical reason (as 0.2 is out there
since a long while...).

So it's a Debuntu issue, ping Seb!

Csaba


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: hello.py fails

Nikolaus Rath
Csaba Henk <[hidden email]> writes:

> Yeah, I was able to reproduce with the Jaunty LiveCD. I bisected the
> issue and found out that it occurs due to the bug fixed here:
>
>   http://mercurial.creo.hu/repos/fuse-python-hg/index.cgi/rev/92f3f49abbc5
>
> ... which has been committed just after the 0.2-pre3 release; cf.
> Debuntu uses 0.2-pre3 for some mystical reason (as 0.2 is out there
> since a long while...).
>
> So it's a Debuntu issue, ping Seb!

Alright, thank you very much. I have also reported this in Launchpad for
Ubuntu.

   -Nikolaus

--
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel