Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual Filesystem does not work with ranger file explorer #28

Closed
wichtounet opened this issue Mar 7, 2015 · 9 comments
Closed

Virtual Filesystem does not work with ranger file explorer #28

wichtounet opened this issue Mar 7, 2015 · 9 comments

Comments

@wichtounet
Copy link

Hello,

I'm a huge fan of the VFS features. It used to work well in my previous explorer, but now I'm used ranger as a file explorer and it does not work anymore.

I can navigate through the tags without any problem, but as soon as I try to open a file, it gets disconnected, I have the error "Transport endpoint is connected".

Can you think of any reason for this issue ?

Thanks

@oniony
Copy link
Owner

oniony commented Mar 8, 2015

Hi there. Sorry to hear you are having problems.

Would you mind mounting the virtual filesystem directly using this syntax:

$ tmsu -v vfs mountpoint

This will run the virtual filesystem in the foreground and make it possible
to see any error.

Thanks,
Paul

On Sat, 7 Mar 2015 15:59 Baptiste Wicht notifications@github.com wrote:

Hello,

I'm a huge fan of the VFS features. It used to work well in my previous
explorer, but now I'm used ranger as a file explorer and it does not work
anymore.

I can navigate through the tags without any problem, but as soon as I try
to open a file, it gets disconnected, I have the error "Transport endpoint
is connected".

Can you think of any reason for this issue ?

Thanks


Reply to this email directly or view it on GitHub
#28.

@wichtounet
Copy link
Author

Hello,

Here is the error I get:

panic: could not begin transaction: there is already an open transaction

goroutine 6 [running]:
tmsu/storage/database.(_Database).Begin(0xc20801e240, 0x0, 0x0)
/home/wichtounet/dev/TMSU/src/tmsu/storage/database/database.go:121 +0x97
tmsu/storage.(_Storage).Begin(0xc20801e320, 0x0, 0x0)
/home/wichtounet/dev/TMSU/src/tmsu/storage/storage.go:47 +0x3d
tmsu/vfs.FuseVfs.GetAttr(0xc20801e320, 0x7fffe9f5b4bf, 0x4, 0xc208084000, 0xc2080521e0, 0x51, 0xc20804e620, 0x0, 0xc200000000)
/home/wichtounet/dev/TMSU/src/tmsu/vfs/fusevfs.go:157 +0x269
tmsu/vfs.(_FuseVfs).GetAttr(0xc20801e340, 0xc2080521e0, 0x51, 0xc20804e620, 0x200, 0x659f6f)
:8 +0xbe
github.com/hanwen/go-fuse/fuse/pathfs.(_pathInode).GetAttr(0xc2080e44c0, 0xc20804e588, 0x0, 0x0, 0xc20804e620, 0x0)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/pathfs/pathfs.go:624 +0x1c0
github.com/hanwen/go-fuse/fuse/nodefs.(_rawBridge).GetAttr(0xc20803c9c0, 0xc20804e608, 0xc20804e578, 0xc20804e480)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/nodefs/fsops.go:123 +0x114
github.com/hanwen/go-fuse/fuse.doGetAttr(0xc208084000, 0xc20804e480)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/opcode.go:219 +0x58
github.com/hanwen/go-fuse/fuse.(_Server).handleRequest(0xc208084000, 0xc20804e480)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/server.go:333 +0x29a
github.com/hanwen/go-fuse/fuse.(_Server).loop(0xc208084000, 0x1)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/server.go:312 +0xcd
created by github.com/hanwen/go-fuse/fuse.(_Server).readRequest
/data/gopath/src/github.com/hanwen/go-fuse/fuse/server.go:239 +0x625

goroutine 1 [syscall]:
syscall.Syscall(0x4, 0xc20812c230, 0xc2080a8000, 0x0, 0x0, 0x4ec159, 0x90)
/usr/lib/go/src/syscall/asm_linux_amd64.s:21 +0x5
syscall.Stat(0xc20812c1c0, 0x63, 0xc2080a8000, 0x0, 0x0)
/usr/lib/go/src/syscall/zsyscall_linux_amd64.go:1723 +0x92
os.Stat(0xc20812c1c0, 0x63, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/os/file_unix.go:134 +0x75
tmsu/vfs.FuseVfs.getFileEntryAttr(0xc20801e320, 0x7fffe9f5b4bf, 0x4, 0xc208084000, 0x10, 0x35, 0x10)
/home/wichtounet/dev/TMSU/src/tmsu/vfs/fusevfs.go:758 +0x255
tmsu/vfs.FuseVfs.getTaggedEntryAttr(0xc20801e320, 0x7fffe9f5b4bf, 0x4, 0xc208084000, 0xc2080988d0, 0x4, 0x4, 0x0, 0x0)
/home/wichtounet/dev/TMSU/src/tmsu/vfs/fusevfs.go:658 +0x475
tmsu/vfs.FuseVfs.GetAttr(0xc20801e320, 0x7fffe9f5b4bf, 0x4, 0xc208084000, 0xc2080b5f80, 0x51, 0xc20804e3e0, 0x0, 0x0)
/home/wichtounet/dev/TMSU/src/tmsu/vfs/fusevfs.go:177 +0x6ab
tmsu/vfs.(_FuseVfs).GetAttr(0xc20801e340, 0xc2080b5f80, 0x51, 0xc20804e3e0, 0x51, 0x6de5d2213ae86d8d)
:8 +0xbe
github.com/hanwen/go-fuse/fuse/pathfs.(_pathInode).Lookup(0xc2080f97c0, 0xc20804e360, 0xc20807ae80, 0x35, 0xc20804e3e0, 0x0, 0xbd)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/pathfs/pathfs.go:579 +0x151
github.com/hanwen/go-fuse/fuse/nodefs.(_FileSystemConnector).internalLookup(0xc20803c9c0, 0xc20804e360, 0xc2080c4f50, 0xc20807ae80, 0x35, 0xc20804e3c8, 0x0, 0x604246)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/nodefs/fsops.go:76 +0x180
github.com/hanwen/go-fuse/fuse/nodefs.(_rawBridge).Lookup(0xc20803c9c0, 0xc20804e3c8, 0xc20807ae80, 0x35, 0xc20804e338, 0x0)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/nodefs/fsops.go:89 +0x222
github.com/hanwen/go-fuse/fuse.doLookup(0xc208084000, 0xc20804e240)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/opcode.go:252 +0x97
github.com/hanwen/go-fuse/fuse.(_Server).handleRequest(0xc208084000, 0xc20804e240)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/server.go:333 +0x29a
github.com/hanwen/go-fuse/fuse.(_Server).loop(0xc208084000, 0x0)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/server.go:312 +0xcd
github.com/hanwen/go-fuse/fuse.(*Server).Serve(0xc208084000)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/server.go:281 +0x57
tmsu/vfs.FuseVfs.Serve(0xc20801e320, 0x7fffe9f5b4bf, 0x4, 0xc208084000)
/home/wichtounet/dev/TMSU/src/tmsu/vfs/fusevfs.go:118 +0x28
tmsu/cli.vfsExec(0xc20801e320, 0xc208054320, 0x1, 0x1, 0xc20802a3d0, 0x1, 0x1, 0x0, 0x0)
/home/wichtounet/dev/TMSU/src/tmsu/cli/vfs.go:57 +0x3f8
tmsu/cli.processCommand(0xc20801e320, 0x7fffe9f5b4bb, 0x3, 0xc208054320, 0x1, 0x1, 0xc20802a3d0, 0x1, 0x1, 0x0, ...)
/home/wichtounet/dev/TMSU/src/tmsu/cli/cli.go:138 +0x1e7
tmsu/cli.Run()
/home/wichtounet/dev/TMSU/src/tmsu/cli/cli.go:64 +0x559
main.main()
/home/wichtounet/dev/TMSU/src/tmsu/main.go:23 +0x1b

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 5 [chan receive]:
database/sql.(*DB).connectionOpener(0xc208032320)
/usr/lib/go/src/database/sql/sql.go:589 +0x4c
created by database/sql.Open
/usr/lib/go/src/database/sql/sql.go:452 +0x31c

goroutine 7 [runnable]:
github.com/hanwen/go-fuse/fuse.(_Server).loop(0xc208084000, 0x1)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/server.go:289
created by github.com/hanwen/go-fuse/fuse.(_Server).readRequest
/data/gopath/src/github.com/hanwen/go-fuse/fuse/server.go:239 +0x625

The full trace is very long, do you need it ?

Baptiste

@oniony
Copy link
Owner

oniony commented Mar 8, 2015

Many thanks. I'll have a look at this this evening and try the get a fix.

Which version of TMSU are you using?

Paul

On Sun, 8 Mar 2015 12:46 Baptiste Wicht notifications@github.com wrote:

Hello,

Here is the error I get:

panic: could not begin transaction: there is already an open transaction

goroutine 6 [running]:
tmsu/storage/database.(

_Database).Begin(0xc20801e240, 0x0, 0x0)
/home/wichtounet/dev/TMSU/src/tmsu/storage/database/database.go:121 +0x97
tmsu/storage.(_Storage).Begin(0xc20801e320, 0x0, 0x0)
/home/wichtounet/dev/TMSU/src/tmsu/storage/storage.go:47 +0x3d
tmsu/vfs.FuseVfs.GetAttr(0xc20801e320, 0x7fffe9f5b4bf, 0x4, 0xc208084000,
0xc2080521e0, 0x51, 0xc20804e620, 0x0, 0xc200000000)
/home/wichtounet/dev/TMSU/src/tmsu/vfs/fusevfs.go:157 +0x269
tmsu/vfs.(

_FuseVfs).GetAttr(0xc20801e340, 0xc2080521e0, 0x51, 0xc20804e620, 0x200,
0x659f6f) :8 +0xbe github.com/hanwen/go-fuse/fuse/pathfs.(
http://github.com/hanwen/go-fuse/fuse/pathfs.(_pathInode).GetAttr(0xc2080e44c0,
0xc20804e588, 0x0, 0x0, 0xc20804e620, 0x0)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/pathfs/pathfs.go:624
+0x1c0
github.com/hanwen/go-fuse/fuse/nodefs.(

_rawBridge).GetAttr(0xc20803c9c0, 0xc20804e608, 0xc20804e578,
0xc20804e480)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/nodefs/fsops.go:123
http://github.com/hanwen/go-fuse/fuse/nodefs/fsops.go:123 +0x114
github.com/hanwen/go-fuse/fuse.doGetAttr(0xc208084000
http://github.com/hanwen/go-fuse/fuse.doGetAttr(0xc208084000,
0xc20804e480) /data/gopath/src/github.com/hanwen/go-fuse/fuse/opcode.go:219
http://github.com/hanwen/go-fuse/fuse/opcode.go:219 +0x58
github.com/hanwen/go-fuse/fuse.( http://github.com/hanwen/go-fuse/fuse.(_Server).handleRequest(0xc208084000,
0xc20804e480)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/server.go:333 +0x29a
github.com/hanwen/go-fuse/fuse.(

Server).loop(0xc208084000, 0x1)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/server.go:312
http://github.com/hanwen/go-fuse/fuse/server.go:312 +0xcd created by
github.com/hanwen/go-fuse/fuse.( http://github.com/hanwen/go-fuse/fuse.(

Server).readRequest
/data/gopath/src/github.com/hanwen/go-fuse/fuse/server.go:239 +0x625

goroutine 1 [syscall]:
syscall.Syscall(0x4, 0xc20812c230, 0xc2080a8000, 0x0, 0x0, 0x4ec159, 0x90)
/usr/lib/go/src/syscall/asm_linux_amd64.s:21 +0x5
syscall.Stat(0xc20812c1c0, 0x63, 0xc2080a8000, 0x0, 0x0)
/usr/lib/go/src/syscall/zsyscall_linux_amd64.go:1723 +0x92
os.Stat(0xc20812c1c0, 0x63, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/os/file_unix.go:134 +0x75
tmsu/vfs.FuseVfs.getFileEntryAttr(0xc20801e320, 0x7fffe9f5b4bf, 0x4,
0xc208084000, 0x10, 0x35, 0x10)
/home/wichtounet/dev/TMSU/src/tmsu/vfs/fusevfs.go:758 +0x255
tmsu/vfs.FuseVfs.getTaggedEntryAttr(0xc20801e320, 0x7fffe9f5b4bf, 0x4,
0xc208084000, 0xc2080988d0, 0x4, 0x4, 0x0, 0x0)
/home/wichtounet/dev/TMSU/src/tmsu/vfs/fusevfs.go:658 +0x475
tmsu/vfs.FuseVfs.GetAttr(0xc20801e320, 0x7fffe9f5b4bf, 0x4, 0xc208084000,
0xc2080b5f80, 0x51, 0xc20804e3e0, 0x0, 0x0)
/home/wichtounet/dev/TMSU/src/tmsu/vfs/fusevfs.go:177 +0x6ab
tmsu/vfs.(

_FuseVfs).GetAttr(0xc20801e340, 0xc2080b5f80, 0x51, 0xc20804e3e0, 0x51,
0x6de5d2213ae86d8d) :8 +0xbe github.com/hanwen/go-fuse/fuse/pathfs.(
http://github.com/hanwen/go-fuse/fuse/pathfs.(_pathInode).Lookup(0xc2080f97c0,
0xc20804e360, 0xc20807ae80, 0x35, 0xc20804e3e0, 0x0, 0xbd)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/pathfs/pathfs.go:579
+0x151
github.com/hanwen/go-fuse/fuse/nodefs.(

_FileSystemConnector).internalLookup(0xc20803c9c0, 0xc20804e360,
0xc2080c4f50, 0xc20807ae80, 0x35, 0xc20804e3c8, 0x0, 0x604246)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/nodefs/fsops.go:76
http://github.com/hanwen/go-fuse/fuse/nodefs/fsops.go:76 +0x180
github.com/hanwen/go-fuse/fuse/nodefs.(
http://github.com/hanwen/go-fuse/fuse/nodefs.(_rawBridge).Lookup(0xc20803c9c0,
0xc20804e3c8, 0xc20807ae80, 0x35, 0xc20804e338, 0x0)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/nodefs/fsops.go:89 +0x222
github.com/hanwen/go-fuse/fuse.doLookup(0xc208084000, 0xc20804e240)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/opcode.go:252 +0x97
github.com/hanwen/go-fuse/fuse.(

_Server).handleRequest(0xc208084000, 0xc20804e240)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/server.go:333
http://github.com/hanwen/go-fuse/fuse/server.go:333 +0x29a
github.com/hanwen/go-fuse/fuse.( http://github.com/hanwen/go-fuse/fuse.(_Server).loop(0xc208084000,
0x0)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/server.go:312 +0xcd
github.com/hanwen/go-fuse/fuse.(*Server).Serve(0xc208084000)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/server.go:281 +0x57
tmsu/vfs.FuseVfs.Serve(0xc20801e320, 0x7fffe9f5b4bf, 0x4, 0xc208084000)
/home/wichtounet/dev/TMSU/src/tmsu/vfs/fusevfs.go:118 +0x28
tmsu/cli.vfsExec(0xc20801e320, 0xc208054320, 0x1, 0x1, 0xc20802a3d0, 0x1,
0x1, 0x0, 0x0)
/home/wichtounet/dev/TMSU/src/tmsu/cli/vfs.go:57 +0x3f8
tmsu/cli.processCommand(0xc20801e320, 0x7fffe9f5b4bb, 0x3, 0xc208054320,
0x1, 0x1, 0xc20802a3d0, 0x1, 0x1, 0x0, ...)
/home/wichtounet/dev/TMSU/src/tmsu/cli/cli.go:138 +0x1e7
tmsu/cli.Run()
/home/wichtounet/dev/TMSU/src/tmsu/cli/cli.go:64 +0x559
main.main()
/home/wichtounet/dev/TMSU/src/tmsu/main.go:23 +0x1b

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 5 [chan receive]:
database/sql.(*DB).connectionOpener(0xc208032320)
/usr/lib/go/src/database/sql/sql.go:589 +0x4c
created by database/sql.Open
/usr/lib/go/src/database/sql/sql.go:452 +0x31c

goroutine 7 [runnable]:
github.com/hanwen/go-fuse/fuse.(

Server).loop(0xc208084000, 0x1)
/data/gopath/src/github.com/hanwen/go-fuse/fuse/server.go:289
http://github.com/hanwen/go-fuse/fuse/server.go:289 created by
github.com/hanwen/go-fuse/fuse.( http://github.com/hanwen/go-fuse/fuse.(

Server).readRequest
/data/gopath/src/github.com/hanwen/go-fuse/fuse/server.go:239 +0x625

The full trace is very long, do you need it ?

Baptiste


Reply to this email directly or view it on GitHub
#28 (comment).

@wichtounet
Copy link
Author

I used the last version from the master branch, compiled from sources.

oniony added a commit that referenced this issue Mar 9, 2015
Added locking in the VFS to manage concurrent access.
@oniony
Copy link
Owner

oniony commented Mar 9, 2015

Sorry for the delay. This is fixed in commit ec35158.

The issue was there was no handling of concurrent access to the virtual filesystem. I've added some coarse grained locking which will solve the issue but it may need to be made a bit finer grained in a later version to improve performance.

@oniony
Copy link
Owner

oniony commented Mar 13, 2015

FYI I'm going to push out a 0.5.2 that includes this fix.

@oniony
Copy link
Owner

oniony commented Mar 13, 2015

Hi, this fix is now in the v0.5.2 release.

@wichtounet
Copy link
Author

Sorry to test only this now. I tried it on the last master and it does indeed works like a charm :)

Thanks a lot.

@oniony
Copy link
Owner

oniony commented Mar 14, 2015

Thanks for letting me know. I'm going to completely rework the database layer: there should be no need for the locking I added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants