Code Monkey home page Code Monkey logo

fuse4j's People

Contributors

dtrott avatar etienneperot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fuse4j's Issues

fake fs doesn't work

when running mount_fake_java.sh and tryong to 'ls' in the mounted dir,
i get the follwing errormessage:
"ls: fake: Device not configured"

looks like in FuseMount.java around line 56:
log.info("Mounting filesystem");
mount(args, fuseFS, threadGroup);
log.info("Filesystem is unmounted");
the first log is visible but the second never reached.
looks like the native mount functions hangs

by turning log4j to debug this is the logfile content:

INFO main fuse.FakeFilesystem-entering
INFO main fuse.FakeFilesystem-created
INFO main fuse.FuseMount-Mounting filesystem
DEBUG main fuse.FakeFilesystem-init: start filesystem
INFO main fuse.FakeFilesystem-Initializing Filesystem
DEBUG main fuse.FakeFilesystem- returning with success
DEBUG Thread-1 fuse.FakeFilesystem-statfs
DEBUG Thread-1 fuse.FakeFilesystem- returning: fuse.FuseStatfs[ blockSize=512, blocks=1000, blocksFree=200, blocksAvail=180, files=6, filesFree=0, namelen=1024, hashCode=2044693401 ]
DEBUG Thread-2 fuse.FakeFilesystem-statfs
DEBUG Thread-2 fuse.FakeFilesystem- returning: fuse.FuseStatfs[ blockSize=512, blocks=1000, blocksFree=200, blocksAvail=180, files=6, filesFree=0, namelen=1024, hashCode=855703640 ]
DEBUG Thread-1 fuse.FakeFilesystem-statfs
DEBUG Thread-1 fuse.FakeFilesystem- returning: fuse.FuseStatfs[ blockSize=512, blocks=1000, blocksFree=200, blocksAvail=180, files=6, filesFree=0, namelen=1024, hashCode=113093521 ]
DEBUG Thread-2 fuse.FakeFilesystem-statfs
DEBUG Thread-2 fuse.FakeFilesystem- returning: fuse.FuseStatfs[ blockSize=512, blocks=1000, blocksFree=200, blocksAvail=180, files=6, filesFree=0, namelen=1024, hashCode=239779852 ]
DEBUG Thread-1 fuse.FakeFilesystem-statfs
DEBUG Thread-1 fuse.FakeFilesystem- returning: fuse.FuseStatfs[ blockSize=512, blocks=1000, blocksFree=200, blocksAvail=180, files=6, filesFree=0, namelen=1024, hashCode=1300650792 ]
DEBUG Thread-1 fuse.FakeFilesystem-statfs
DEBUG Thread-1 fuse.FakeFilesystem- returning: fuse.FuseStatfs[ blockSize=512, blocks=1000, blocksFree=200, blocksAvail=180, files=6, filesFree=0, namelen=1024, hashCode=801818331 ]
DEBUG Thread-2 fuse.FakeFilesystem-statfs
DEBUG Thread-1 fuse.FakeFilesystem-statfs
DEBUG Thread-2 fuse.FakeFilesystem- returning: fuse.FuseStatfs[ blockSize=512, blocks=1000, blocksFree=200, blocksAvail=180, files=6, filesFree=0, namelen=1024, hashCode=700804192 ]
DEBUG Thread-3 fuse.FakeFilesystem-statfs
DEBUG Thread-3 fuse.FakeFilesystem- returning: fuse.FuseStatfs[ blockSize=512, blocks=1000, blocksFree=200, blocksAvail=180, files=6, filesFree=0, namelen=1024, hashCode=243323391 ]
DEBUG Thread-1 fuse.FakeFilesystem- returning: fuse.FuseStatfs[ blockSize=512, blocks=1000, blocksFree=200, blocksAvail=180, files=6, filesFree=0, namelen=1024, hashCode=1615734796 ]
DEBUG Thread-2 fuse.FakeFilesystem-getattr: path=/
DEBUG Thread-2 fuse.FakeFilesystem- returning: fuse.FuseGetattr[ mode=40755(OCT), inode=2066473405, nlink=1, uid=0, gid=0, rdev=0, size=3072, blocks=6, atime=1288701384, mtime=1288701384, ctime=1288701384, hashCode=2112978551 ]
DEBUG Thread-3 fuse.FakeFilesystem-statfs

DEBUG Thread-3 fuse.FakeFilesystem- returning: fuse.FuseStatfs[ blockSize=512, blocks=1000, blocksFree=200, blocksAvail=180, files=6, filesFree=0, namelen=1024, hashCode=2040919865 ]

environment (reported by maven)
Apache Maven 2.2.1
Java version: 1.6.0_20
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
OS name: "mac os x" version: "10.6.4" arch: "x86_64" Family: "mac"

Bug in fuse_callback.c

Line 740, in javafs_setxattr, 3 local variables are defined twice, in different scopes. Result is that the cleanup logic will never be run, thus leaking memory. I think this has been present going way back.

Segfault on unmount when running two file systems in same JVM

I mount two file systems (Filesystem3) inside a unit test.

When I unmount the first file system:
Runtime.getRuntime().exec(new String[] { "bash", "-c", "umount " + mountPointOfFirstFs) });

I get a segfault:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000015e23acec, pid=18758, tid=35075
#
# JRE version: 7.0_15-b03
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.7-b01 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C  [libjavafs.jnilib+0xfcec]  get_env+0x2c
....
....

This seems to be because of the code in native_impl.c after it returns from the fuse_main loop inside the function Java_fuse_FuseMount_mount. The function cleans up the threadgroup, fuseFS and associated classes from the java env.

If I edit native_impl.c so that I return immediately after the fuse_main function finishes I can avoid the segfault, and unmount both FileSystems. I assume, however, that this creates a memory leak.

(Note: I am assuming that was the suggested method for unmounting, judging by the other github issue #5)

Xattr not passed correctly to OSX?

Hi,

I am working on a Ramdisk implementation using fuse4j. So far almost everything works quite nicely.

listing xattributes in terminal via ls -l@ shows some weird behaviour. Find below a printout of the console part :

-rw-r--r--@ 1 tobiashaag staff 346 29 Mar 16:44 sdfgsdfg.rtf
com.apple.quarantine 23
-CDEF000000 -1

if i run ls -l@ again this is the result :

-rw-r--r--@ 1 tobiashaag staff 346 29 Mar 16:44 sdfgsdfg.rtf
com.apple.quarantine 23
-1
-1

seems some arbitrary memory locations are read, i.e the buffer for the attribute name in the listxattr() method seems to be the culprit.

Let me know if its just an implementation issue on my end or whether another fix is needed.

Thanks and great work !

Tobi

ioctl?

I would very much like to add fuse's ioctl callback to fuse4j, but am not sure how to proceed. I see that some C files are autogenerated from Java class definitions, so I think I would add an ioctl method to FuseFS.java and run the CAPIGenerator ??

Anyone else any experience of adding methods to fuse-j?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.