bcle/fuse4js

Running jsonFS doesn't work on ubuntu 12.04 LTS x86-64

bcle opened this issue · 19 comments

bcle commented

This is my dev environment. Looks like the setxattr/statfs changes caused this, since it works if I revert back to commit 65395cb.

Here's the output:

ubuntu@ip-10-171-45-167:/tmp/tutorial$ node fuse4js/example/jsonFS.js fuse4js/example/sample.json /tmp/tutorial/mnt

Input file: fuse4js/example/sample.json
Mount point: /tmp/tutorial/mnt
File system stopped

Could you please run jsonFS with fuse debugging enabled?

I've set up a Ubuntu 12.04 test system in a virtual machine(Parallels Desktop: Build 8.0.18354) and installed node from: http://dev.squarecows.com/2012/06/28/nodejs-0-8-on-ubuntu-12-04/

It all works as expected. Could you give more details on your test system?

Some version infos which could help identifying the source of the problem:

# node --version
v0.10.15
# npm -version
1.3.5
# uname -r
3.2.0-29-generic
# pkg-config --modversion fuse
2.8.6

Cheers René

bcle commented

Hi Rene,

A few busy days ahead, and then I'll take a look at the end of the week.
Thanks.

On Sun, Aug 25, 2013 at 11:01 AM, René Rössler notifications@github.comwrote:

I've set up a Ubuntu 12.04 test system in a virtual machine(Parallels
Desktop: Build 8.0.18354) and installed node from:
http://dev.squarecows.com/2012/06/28/nodejs-0-8-on-ubuntu-12-04/

It all works as expected. Could you give more details on your test system?

Some version infos which could help identifying the source of the problem:

node --version

v0.10.15

npm -version

1.3.5

uname -r

3.2.0-29-generic

pkg-config --modversion fuse

2.8.6

Cheers René


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-23232315
.

Any news?

bcle commented

Taking ownership.
Looking at it now.

I have the same problem. It works when I install from npm, but the master is not working - stopping the file system every time.

I checked the npm version and the difference is these lines:

int initialArgc = sizeof(argv) / sizeof(char*);
char **argvIncludingExtraArgs = (char**)malloc(sizeof(char*) * (initialArgc + f4js.extraArgc));
memcpy(argvIncludingExtraArgs, argv, sizeof(argv));
memcpy(argvIncludingExtraArgs + initialArgc, f4js.extraArgv, sizeof(char*) * f4js.extraArgc);

If I comment them and change the fuse_main() call to

fuse_main(4, argv, &ops, NULL)

it works fine. This is 64bit Ubuntu on VirtualBox by the way. @elwerene Can you suggest solution please?

Update:
It is because of the "extraArgs", disabling them does the trick. I don't know what they are supposed to do exactly.
https://github.com/bobef/fuse4js/commit/dfca0a806fd372e38055960b9db402f7079ef8f6

I introduced the extra args, so you could give args to the mount command, like setting the uid or gid of the mountpoint.

I don't have time to look at it right now, probably next week. If you need it right now, I would suggest to add some conditionals for empty extraArgs, I guess that's where the error happens.

The error happens somewhere inside fuse_main() when you pass "-o
allow_others" (or something similar don't remember what it was called
exactly) and this "-o something" comes from extraArgs. If you don't pass
the extra args to fuse_main() it works fine.

On Tue, Nov 12, 2013 at 1:21 PM, René Rössler notifications@github.comwrote:

I introduced the extra args, so you could give args to the mount command,
like setting the uid or gid of the mountpoint.

I don't have time to look at it right now, probably next week. If you need
it right now, I would suggest to add some conditionals for empty extraArgs,
I guess that's where the error happens.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-28285828
.

Maybe allow_others does not exist in ubuntu 64bit?

Am 12.11.2013 um 12:24 schrieb Borislav Peev notifications@github.com:

The error happens somewhere inside fuse_main() when you pass "-o
allow_others" (or something similar don't remember what it was called
exactly) and this "-o something" comes from extraArgs. If you don't pass
the extra args to fuse_main() it works fine.

On Tue, Nov 12, 2013 at 1:21 PM, René Rössler notifications@github.comwrote:

I introduced the extra args, so you could give args to the mount command,
like setting the uid or gid of the mountpoint.

I don't have time to look at it right now, probably next week. If you need
it right now, I would suggest to add some conditionals for empty extraArgs,
I guess that's where the error happens.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-28285828
.


Reply to this email directly or view it on GitHub.

I have no idea what it even is, I have very little Ubuntu/mount experience.

On Tue, Nov 12, 2013 at 1:29 PM, René Rössler notifications@github.comwrote:

Maybe allow_others does not exist in ubuntu 64bit?

Am 12.11.2013 um 12:24 schrieb Borislav Peev notifications@github.com:

The error happens somewhere inside fuse_main() when you pass "-o
allow_others" (or something similar don't remember what it was called
exactly) and this "-o something" comes from extraArgs. If you don't pass
the extra args to fuse_main() it works fine.

On Tue, Nov 12, 2013 at 1:21 PM, René Rössler notifications@github.comwrote:

I introduced the extra args, so you could give args to the mount
command,
like setting the uid or gid of the mountpoint.

I don't have time to look at it right now, probably next week. If you
need
it right now, I would suggest to add some conditionals for empty
extraArgs,
I guess that's where the error happens.


Reply to this email directly or view it on GitHub<
https://github.com/vmware/fuse4js/issues/9#issuecomment-28285828>
.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-28286212
.

There it is, could you verify this:

http://unix.stackexchange.com/questions/37168/unable-to-use-o-allow-other-with-sshfs-option-enabled-in-fuse-conf

Thanks

Am 12.11.2013 um 12:30 schrieb Borislav Peev notifications@github.com:

I have no idea what it even is, I have very little Ubuntu/mount experience.

On Tue, Nov 12, 2013 at 1:29 PM, René Rössler notifications@github.comwrote:

Maybe allow_others does not exist in ubuntu 64bit?

Am 12.11.2013 um 12:24 schrieb Borislav Peev notifications@github.com:

The error happens somewhere inside fuse_main() when you pass "-o
allow_others" (or something similar don't remember what it was called
exactly) and this "-o something" comes from extraArgs. If you don't pass
the extra args to fuse_main() it works fine.

On Tue, Nov 12, 2013 at 1:21 PM, René Rössler notifications@github.comwrote:

I introduced the extra args, so you could give args to the mount
command,
like setting the uid or gid of the mountpoint.

I don't have time to look at it right now, probably next week. If you
need
it right now, I would suggest to add some conditionals for empty
extraArgs,
I guess that's where the error happens.


Reply to this email directly or view it on GitHub<
https://github.com/vmware/fuse4js/issues/9#issuecomment-28285828>
.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-28286212
.


Reply to this email directly or view it on GitHub.

I can confirm. 1) Staring the example with "sudo node" or 2) uncommenting
the option "user_allow_other" in /etc/fuse.conf and making my user able to
access this file solves it. Someone with access should add this to the
installation instructions. Regards.

On Tue, Nov 12, 2013 at 1:34 PM, René Rössler notifications@github.comwrote:

There it is, could you verify this:

http://unix.stackexchange.com/questions/37168/unable-to-use-o-allow-other-with-sshfs-option-enabled-in-fuse-conf

Thanks

Am 12.11.2013 um 12:30 schrieb Borislav Peev notifications@github.com:

I have no idea what it even is, I have very little Ubuntu/mount
experience.

On Tue, Nov 12, 2013 at 1:29 PM, René Rössler notifications@github.comwrote:

Maybe allow_others does not exist in ubuntu 64bit?

Am 12.11.2013 um 12:24 schrieb Borislav Peev <
notifications@github.com>:

The error happens somewhere inside fuse_main() when you pass "-o
allow_others" (or something similar don't remember what it was
called
exactly) and this "-o something" comes from extraArgs. If you don't
pass
the extra args to fuse_main() it works fine.

On Tue, Nov 12, 2013 at 1:21 PM, René Rössler <
notifications@github.com>wrote:

I introduced the extra args, so you could give args to the mount
command,
like setting the uid or gid of the mountpoint.

I don't have time to look at it right now, probably next week. If
you
need
it right now, I would suggest to add some conditionals for empty
extraArgs,
I guess that's where the error happens.


Reply to this email directly or view it on GitHub<
https://github.com/vmware/fuse4js/issues/9#issuecomment-28285828>
.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub<
https://github.com/vmware/fuse4js/issues/9#issuecomment-28286212>
.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-28286478
.

I updated the readme, thanks for investigating that issue! @bcle could you post the new version to npmjs.org?

bcle commented

Swamped right now.
Give me 48 hours.
Thanks!

On Tue, Nov 12, 2013 at 4:02 AM, René Rössler notifications@github.comwrote:

I updated the readme, thanks for investigating that issue! @bclehttps://github.com/bclecould you post the new version to
npmjs.org?


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-28287951
.

bcle commented

New version posted.
Sorry it took so long.

bcle commented

@elwerene : I don't think the documentation fix is sufficient. Since user_allow_other is disabled by default in /etc/fuse.conf, jsonFS.js should not pass "-o allow_other" by default. This will result in a non-obvious failure on at least this Ubuntu distro, and users can easily miss the comment in the documentation. Please add an option to jsonFS.js (for example '-a'), parse it in parseArgs(), and if enabled, then pass -o allow_other to f4js.start()

bcle commented

Tried to npm-publish new version, but keep getting npm conflict errors, even after bumping the version number several times. Looks like others are seeing this too, though not sure about how widespread it is: https://github.com/isaacs/npm/issues/4273
Will keep trying in the days ahead.

bcle commented

I was finally able to publish tonight. Version is 0.1.9