ovh / svfs

The Swift Virtual File System
Other
375 stars 54 forks source link

Rename error issuse, use: panic in handler for Rename #77

Closed supnobita closed 8 years ago

supnobita commented 8 years ago

Context

  1. install pureftpd
  2. mount swift with svfs (at: /home/ftpuser)
  3. create user with home directory is /home/ftpuser
  4. Upload some medium file (10mb)
  5. Delete it

    Results you expected :

Delete OK, not have any error

Results you observed :

fuse: panic in handler for Rename [ID=0x25 Node=0x2 Uid=46 Gid=1001 Pid=74424] from "Properties.Resources.Designer.cs.dll" to dirnode 0x2 ".pureftpd-rename.74424.2c833f21": runtime error: invalid memory address or nil pointer dereference goroutine 100 [running]: bazil.org/fuse/fs.func·003() /root/.gvm/gos/go1.4/src/fress-svfs/src/bazil.org/fuse/fs/serve.go:857 +0xd0 github.com/ovh/svfs/svfs.(_Object).delete(0xc20a1133e0, 0x0, 0x0) /root/.gvm/gos/go1.4/src/fress-svfs/src/github.com/ovh/svfs/svfs/object.go:132 +0xe6 github.com/ovh/svfs/svfs.(_Object).rename(0xc20a1133e0, 0xc20802d4a0, 0xc20b1845a0, 0x1f, 0x0, 0x0) /root/.gvm/gos/go1.4/src/fress-svfs/src/github.com/ovh/svfs/svfs/object.go:170 +0x9f github.com/ovh/svfs/svfs.(_Directory).Rename(0xc20802d4a0, 0x7f57078b40f0, 0xc20b13aa40, 0xc20b19a720, 0x7f57078b49d0, 0xc20802d4a0, 0x0, 0x0) /root/.gvm/gos/go1.4/src/fress-svfs/src/github.com/ovh/svfs/svfs/directory.go:391 +0x1cb bazil.org/fuse/fs.(_Server).handleRequest(0xc208035520, 0x7f57078b40f0, 0xc20b13aa40, 0x7f57078b49d0, 0xc20802d4a0, 0xc20802fc40, 0x7f57078b5a80, 0xc20b19a720, 0xc20b19ff18, 0x0, ...) /root/.gvm/gos/go1.4/src/fress-svfs/src/bazil.org/fuse/fs/serve.go:1335 +0x3303 bazil.org/fuse/fs.(_Server).serve(0xc208035520, 0x7f57078b5a80, 0xc20b19a720) /root/.gvm/gos/go1.4/src/fress-svfs/src/bazil.org/fuse/fs/serve.go:878 +0x781 bazil.org/fuse/fs.func·001() /root/.gvm/gos/go1.4/src/fress-svfs/src/bazil.org/fuse/fs/serve.go:425 +0x77 created by bazil.org/fuse/fs.(_Server).Serve

Debug log :

2016/06/21 17:41:16 FUSE: <- Lookup [ID=0x115 Node=0xe Uid=46 Gid=1001 Pid=75579] ".pureftpd-rename.75579.2be00f47" 2016/06/21 17:41:16 FUSE: -> [ID=0x115] Lookup error=ENOENT 2016/06/21 17:41:16 FUSE: <- Rename [ID=0x116 Node=0xe Uid=46 Gid=1001 Pid=75579] from "Properties.Resources.Designer.cs.dll" to dirnode 0xe ".pureftpd-rename.75579.2be00f47" Rename requestRename requestCopy OK 2016/06/21 17:41:16 fuse: panic in handler for Rename [ID=0x116 Node=0xe Uid=46 Gid=1001 Pid=75579] from "Properties.Resources.Designer.cs.dll" to dirnode 0xe ".pureftpd-rename.75579.2be00f47": runtime error: invalid memory address or nil pointer dereference goroutine 573 [running]: bazil.org/fuse/fs.func·003() /root/.gvm/gos/go1.4/src/bazil.org/fuse/fs/serve.go:850 +0xd0 github.com/ovh/svfs/svfs.(_Object).delete(0xc20a0f90e0, 0x0, 0x0) /root/.gvm/gos/go1.4/src/github.com/ovh/svfs/svfs/object.go:134 +0x3b4 github.com/ovh/svfs/svfs.(_Object).rename(0xc20a0f90e0, 0xc20a0e1220, 0xc20a0ff2c0, 0x1f, 0x0, 0x0) /root/.gvm/gos/go1.4/src/github.com/ovh/svfs/svfs/object.go:174 +0x194 github.com/ovh/svfs/svfs.(_Directory).Rename(0xc20a0e1220, 0x7fdaca20e1a8, 0xc20f1d8900, 0xc20a15a780, 0x7fdaca20ebb8, 0xc20a0e1220, 0x0, 0x0) /root/.gvm/gos/go1.4/src/github.com/ovh/svfs/svfs/directory.go:392 +0x3b4 bazil.org/fuse/fs.(_Server).handleRequest(0xc208035790, 0x7fdaca20e1a8, 0xc20f1d8900, 0x7fdaca20ebb8, 0xc20a0e1220, 0xc20a16a3c0, 0x7fdaca20f3c8, 0xc20a15a780, 0xc20f1edf18, 0x0, ...) /root/.gvm/gos/go1.4/src/bazil.org/fuse/fs/serve.go:1322 +0x32bc bazil.org/fuse/fs.(_Server).serve(0xc208035790, 0x7fdaca20f3c8, 0xc20a15a780) /root/.gvm/gos/go1.4/src/bazil.org/fuse/fs/serve.go:871 +0x781 bazil.org/fuse/fs.func·001() /root/.gvm/gos/go1.4/src/bazil.org/fuse/fs/serve.go:418 +0x77 created by bazil.org/fuse/fs.(_Server).Serve /root/.gvm/gos/go1.4/src/bazil.org/fuse/fs/serve.go:419 +0x7ea 2016/06/21 17:41:16 FUSE: -> [ID=0x116] Rename error=EIO: handler panicked: runtime error: invalid memory address or nil pointer dereference

Additional information :

Well, When pureftpd or proftpd delete file, it will rename file to ".pureftp-rename xxx" then delete renamed-file (i think It do that for avoid conflict), sometime FPT can delete normal, without error, but sometime It have error :(I debug but i don't know where nill object ? I think it fail at line 132 at object.go https://github.com/ovh/svfs/blob/master/svfs/object.go#L132)

I don't know what object is nill in this issue, Could give me some advice to fix it ?

Thanks

xlucas commented 8 years ago

Duplicate of #76