Ошибка libmtp could not delete object

I’ve tried again two times, and both times I got errors and go-mtpfs
crashed.

Long story made short: mount->hang->force unmount->terminal trace
(segmentation fault)->cycle USB->mount->delete and copy->nautilus
error->terminal trace (segfault)->cycle USB->mount->hang->force
unmount->terminal trace (segfault)->cycle USB->mount->delete and
copy->nautilus error->terminal trace (segfault)->cycle USB->mount->delete
with Nautilus, copy with cp->semacquire terminal trace (segfault)

Long story with full details (I hope it’s not too verbose, I’ve added the
previous steps on every step so it may be easier to follow):

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

The first time log. First I mount the device (go-mtpfs nexus10mount &):

2013/02/08 19:52:24 starting FUSE unknown

Then I double click on the Internal storage folder:

2013/02/08 19:52:40 GetObjectInfo failed: transaction ID mismatch got 18
want 19
2013/02/08 19:52:40 GetStorageInfo %x: %v 65537 got type 2 in response
2013/02/08 19:52:42 GetStorageInfo %x: %v 65537 transaction ID mismatch got
19 want 1a
2013/02/08 19:52:42 GetObjectHandles failed: transaction ID mismatch got 1a
want 1b
2013/02/08 19:52:42 GetObjectHandles failed: transaction ID mismatch got 1b
want 1c
2013/02/08 19:52:42 GetStorageInfo %x: %v 65537 transaction ID mismatch got
1c want 1d

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

Go-mtpfs gets hung there. If force to umount the device an output of a
trace call is written in the console. Using fusermount does not work:

panic: runtime error: invalid memory address or nil pointer dereference

[signal 0xb code=0x1 addr=0x48 pc=0x7f6241ee3fe5]

goroutine 1 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_reset_device(0x0, 0x1e)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:274 +0x2f
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).Reset(0x0, 0xf840050060,
0xf84006c670, 0x44fd29)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1101 +0x38
github.com/hanwen/go-mtpfs/mtp.(_Device).Close(0xf8400005b0, 0x0,
0xf8400005b0, 0x100000001)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:71 +0x85
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:75 +0xb6f

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 4 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

If I try to mount again without disconnecting the device, go-mtpfs returns
the following error and closes afterwards:
20:00:12 Configure failed: OpenSession after reset: LIBUSB_ERROR_TIMEOUT

The second time it mounted flawlessly (just after the previous LIBUSB
error and plug in the USB cable again). Could access the «Internal storage»
folder and then the «Movies» folder. I could delete files and the available
space was updated properly. But when I tried to copy the file (an MKV
movie) it crashed. Nautilus shows a dialog telling that an error happened
while copying the file to the folder. The description is Failed to attach
the file: The program ended the connection
(in spanish: «Error al unir el
archivo: El programa provocó el fin de la conexión»).

mount->hang->force unmount->terminal trace->cycle USB->mount->delete
and copy
->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

2013/02/08 20:01:38 starting FUSE unknown
2013/02/08 20:08:17 GetStorageInfo %x: %v 65537 transaction ID mismatch got
55b want 55c *<- first line of the copy error. *
2013/02/08 20:08:17 AndroidSendPartialObject failed: no sink for data
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x40 pc=0x7f121ae3c9df]

goroutine 1 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf8402af000, 0x1100000011000, 0x4447a0, 0x0,
…)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070668, 0xf8402af000, 0x1100000011000, 0xffffffff,
0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070668, 0xf8402af000, 0x1100000011000, 0xf8400a2000,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf8400a2000, 0xf8400a2000, 0xf800000000, 0xf800000001, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x0, 0x0,
0x40175e)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
github.com/hanwen/go-fuse/fuse.(*MountState).Loop(0xf84006d1e0,
0x7261747300000010)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:292 +0x48
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:74 +0xb5e

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 4 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_bulk_transfer(0x0,
0xf840070a04)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:50 +0x34
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).BulkTransfer(0x0,
0xf8401f5704, 0xf840052e00, 0x2000000020, 0x7d0, …)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1077 +0xc7
github.com/hanwen/go-mtpfs/mtp.(_Device).sendReq(0xf8400005b0,
0x7f121b202cf0, 0x8, 0x414981, 0x69ac00, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:176 +0x3b6
github.com/hanwen/go-mtpfs/mtp.(_Device).RunTransaction(0xf8400005b0,
0x7f121b202cf0, 0x7f121b202cd0, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:246 +0x189
github.com/hanwen/go-mtpfs/mtp.(_Device).AndroidSendPartialObject(0xf8400005b0,
0xf57, 0x3ab000, 0xf800001000, 0xf840099240, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/android.go:65 +0x163
github.com/hanwen/go-mtpfs/fs.(_androidFile).Write(0xf840070828,
0xf8402ff050, 0x10fb000001000, 0x3ab000, 0xf840099780, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/fs/android.go:37 +0x12d
github.com/hanwen/go-fuse/fuse.(_FileSystemConnector).Write(0xf840093bc0,
0xf8400dc1d0, 0xf8402ff028, 0xf8402ff050, 0x10fb000001000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/fsops.go:373 +0xaf
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).Write(0xf84009a720,
0xf8400dc1d0, 0xf8402ff028, 0xf8402ff050, 0x10fb000001000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:289 +0xa4
github.com/hanwen/go-fuse/fuse.doWrite(0xf84006d1e0, 0xf8400dc000, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go:149 +0x73
github.com/hanwen/go-fuse/fuse.(_MountState).handleRequest(0xf84006d1e0,
0xf8400dc000, 0xf8400dc000, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:340 +0x235
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0,
0xf800000001, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:320 +0x84
created by github.com/hanwen/go-fuse/fuse.(_MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

goroutine 5 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

goroutine 6 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf8402ee000, 0x1100000011000, 0x100000001, 0x0,
…)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070668, 0xf8402ee000, 0x1100000011000,
0x11000ffffffff, 0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070668, 0xf8402ee000, 0x1100000011000, 0xf8402ee000,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf840128c01, 0xf840128c00, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0,
0xf800000001, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

After that if I plug in the USB cable again (unplug, plug) and try to
access the Internal storage folder, Nautilus shows again a dialog of
Input/Output error and the terminal where I run go-mtpfs shows again these
errors with go-mtpfs hung again:

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

2013/02/08 20:14:54 GetObjectInfo failed: transaction ID mismatch got 1b

want 1c
2013/02/08 20:14:54 GetStorageInfo %x: %v 65537 got type 2 in response
2013/02/08 20:14:55 GetStorageInfo %x: %v 65537 transaction ID mismatch
got 1c want 1d
2013/02/08 20:14:55 GetObjectHandles failed: transaction ID mismatch got
1d want 1e
2013/02/08 20:14:55 GetObjectHandles failed: transaction ID mismatch got
1e want 1f
2013/02/08 20:14:55 GetStorageInfo %x: %v 65537 transaction ID mismatch
got 1f want 20

An umount of the folder where the device is mounted makes go-mtpfs write
this trace:
mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->*force unmount
*->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

panic: runtime error: invalid memory address or nil pointer dereference

[signal 0xb code=0x1 addr=0x48 pc=0x7fe67c1defe5]

goroutine 1 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_reset_device(0x0, 0x21)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:274 +0x2f
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).Reset(0x0, 0xf840050060,
0xf84006c2f0, 0x44fd29)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1101 +0x38
github.com/hanwen/go-mtpfs/mtp.(_Device).Close(0xf840000540, 0x0,
0xf840000540, 0x100000001)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:71 +0x85
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:75 +0xb6f

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 4 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

Then I mount the device again (USB cable cycle), and after being able to
access the Movies folder that sits inside the Internal storage folder, I
try to copy the same file. A new crash and trace appears on the terminal:

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error
->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

2013/02/08 20:21:14 GetStorageInfo %x: %v 65537 transaction ID mismatch got

474 want 475
2013/02/08 20:21:14 AndroidSendPartialObject failed: no sink for data
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x40 pc=0x7f94260f79df]

goroutine 1 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf840201000, 0x1100000011000, 0x4447a0, 0x0,
…)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070670, 0xf840201000, 0x1100000011000, 0xffffffff,
0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070670, 0xf840201000, 0x1100000011000, 0xf8400a3000,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf8400a3000, 0xf8400a3000, 0xf800000000, 0xf800000001, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x0, 0x0,
0x40175e)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
github.com/hanwen/go-fuse/fuse.(*MountState).Loop(0xf84006d1e0,
0x7261747300000010)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:292 +0x48
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:74 +0xb5e

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 3 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf84037c000, 0x1100000011000, 0x100000001,
0x0, …)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070670, 0xf84037c000, 0x1100000011000,
0x11000ffffffff, 0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070670, 0xf84037c000, 0x1100000011000, 0xf84037c000,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf8400cf001, 0xf8400cf000, 0x0, 0xf840098000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x1, 0x0,
0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

goroutine 4 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

goroutine 5 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_bulk_transfer(0x0,
0xf840070e04)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:50 +0x34
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).BulkTransfer(0x0,
0xf840173d04, 0xf84018ce60, 0x2000000020, 0x7d0, …)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1077 +0xc7
github.com/hanwen/go-mtpfs/mtp.(_Device).sendReq(0xf8400005b0,
0x7f94264becf0, 0x8, 0x414981, 0x69ac00, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:176 +0x3b6
github.com/hanwen/go-mtpfs/mtp.(*Device).RunTransaction(0xf8400005b0,
0x7f94264becf0, 0x7f94264becd0, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:246 +0x189

github.com/hanwen/go-mtpfs/mtp.(_Device).AndroidSendPartialObject(0xf8400005b0,
0xf58, 0x3ee000, 0xf800001000, 0xf8400992d0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/android.go:65 +0x163
github.com/hanwen/go-mtpfs/fs.(_androidFile).Write(0xf840070fe0,
0xf84038d050, 0x10fb000001000, 0x3ee000, 0xf840099750, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/fs/android.go:37 +0x12d
github.com/hanwen/go-fuse/fuse.(_FileSystemConnector).Write(0xf840093c00,
0xf8400a3fd0, 0xf84038d028, 0xf84038d050, 0x10fb000001000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/fsops.go:373 +0xaf
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).Write(0xf84009a760,
0xf8400a3fd0, 0xf84038d028, 0xf84038d050, 0x10fb000001000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:289 +0xa4
github.com/hanwen/go-fuse/fuse.doWrite(0xf84006d1e0, 0xf8400a3e00, 0x0,
0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go:149 +0x73
github.com/hanwen/go-fuse/fuse.(_MountState).handleRequest(0xf84006d1e0,
0xf8400a3e00, 0xf8400a3e00, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:340 +0x235
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0,
0xf800000001, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:320 +0x84
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

So, I tried again to mount the device. After every crash I have to cycle
the USB cable so I can access the device due to the LIBUSB_ERROR_TIMEOUT
error. Also it seems there are some quirks with the timing between the
device USB being plugged to the computer and when you can use go-mtpfs
without getting LIBUSB_ERROR_TIMEOUT error.
I haven’t mentioned it before, but every time go-mtpfs crashed while
copying the file, after I could mount the device again, I can see that
around ~4 MB of the file were copied, including this last try.

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete with Nautilus, copy
with cp
->semacquire terminal trace

This last try I used cp via the text terminal. Got again this message:
2013/02/08 20:36:12 GetStorageInfo %x: %v 65537 transaction ID mismatch got
233 want 234

And cp got hung with an uninterruptible state. Killing cp (Ctrl+C and
waiting for a while) results in another trace:

^C2013/02/08 20:36:32 Unimplemented opcode INTERRUPT

^C

AndroidSendPartialObject failed: LIBUSB_ERROR_TIMEOUT
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x40 pc=
0x7f84bbece9df]

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xf84009a774, 0x500000001)
/build/buildd/golang-1.0.2/src/pkg/runtime/zsema_amd64.c:146 +0x25
sync.(_Mutex).Lock(0xf84009a770, 0xf8400702e8)
/usr/lib/go/src/pkg/sync/mutex.go:60 +0xbe
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).locked(0xf84009a760,
0x38, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:156 +0x47
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).GetAttr(0xf84009a760,
0xf8400a30c0, 0xf8400a31d0, 0xf8400a3178, 0x0, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:177 +0x2b
github.com/hanwen/go-fuse/fuse.doGetAttr(0xf84006d1e0, 0xf8400a3000, 0x1,
0xf8400a3150)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go:216 +0x6c
github.com/hanwen/go-fuse/fuse.(_MountState).handleRequest(0xf84006d1e0,
0xf8400a3000, 0xf8400a3000, 0xf800000000)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:340 +0x235
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x0, 0x0,
0x40175e)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:320 +0x84
github.com/hanwen/go-fuse/fuse.(_MountState).Loop(0xf84006d1e0,
0x7261747300000010)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:292 +0x48
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:74 +0xb5e

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 5 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

goroutine 6 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf8403a4000, 0x1100000011000, 0x6, 0x0, …)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070670, 0xf8403a4000, 0x1100000011000, 0xffffffff,
0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070670, 0xf8403a4000, 0x1100000011000, 0xf840186200,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf840186201, 0xf840186200, 0xf800000000, 0xf840145c60, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x1, 0x0,
0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

goroutine 7 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_bulk_transfer(0x0,
0xf840070204)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:50 +0x34
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).BulkTransfer(0x0,
0xf84018bc04, 0xf84018afe0, 0x2000000020, 0x7d0, …)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1077 +0xc7
github.com/hanwen/go-mtpfs/mtp.(_Device).sendReq(0xf840000540,
0x7f84bc173d28, 0x0, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:176 +0x3b6
github.com/hanwen/go-mtpfs/mtp.(_Device).RunTransaction(0xf840000540,
0x7f84bc173d28, 0x7f84bc173d48, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:246 +0x189
github.com/hanwen/go-mtpfs/mtp.(_Device).AndroidEndEditObject(0xf840000540,
0xf59, 0xf800000000, 0x100000000, 0x100000001, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/android.go:75 +0xfc
github.com/hanwen/go-mtpfs/fs.(_fileNode).endEdit(0xf84015b270,
0xf84009a620, 0x42b0dc, 0xf840070f40)
/tmp/go/src/github.com/hanwen/go-mtpfs/fs/fs.go:296 +0x59
github.com/hanwen/go-mtpfs/fs.(_androidFile).Release(0xf840070f40,
0xaa01f0800021e)
/tmp/go/src/github.com/hanwen/go-mtpfs/fs/android.go:50 +0x28
github.com/hanwen/go-fuse/fuse.(_FileSystemConnector).Release(0xf840093c00,
0xf84012d5d0, 0xf84012d578, 0xf840075480, 0xf840093c00, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/fsops.go:321 +0x86
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).Release(0xf84009a760,
0xf84012d5d0, 0xf84012d578, 0xf8400755a0, 0xf84009a760, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:274 +0x7f
github.com/hanwen/go-fuse/fuse.doRelease(0xf84006d1e0, 0xf84012d400,
filiprino@kiwi64:~/nexu10mount/Almacenamiento interno/Movies$ 0x1,
0xf84012d550)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go
:296 +0x66
github.com/hanwen/go-fuse/fuse.(_MountState).handleRequest(0xf84006d1e0,
0xf84012d400, 0xf84012d400, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:340 +0x235
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x1, 0x0,
0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:320 +0x84
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

I’ve tried again two times, and both times I got errors and go-mtpfs
crashed.

Long story made short: mount->hang->force unmount->terminal trace
(segmentation fault)->cycle USB->mount->delete and copy->nautilus
error->terminal trace (segfault)->cycle USB->mount->hang->force
unmount->terminal trace (segfault)->cycle USB->mount->delete and
copy->nautilus error->terminal trace (segfault)->cycle USB->mount->delete
with Nautilus, copy with cp->semacquire terminal trace (segfault)

Long story with full details (I hope it’s not too verbose, I’ve added the
previous steps on every step so it may be easier to follow):

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

The first time log. First I mount the device (go-mtpfs nexus10mount &):

2013/02/08 19:52:24 starting FUSE unknown

Then I double click on the Internal storage folder:

2013/02/08 19:52:40 GetObjectInfo failed: transaction ID mismatch got 18
want 19
2013/02/08 19:52:40 GetStorageInfo %x: %v 65537 got type 2 in response
2013/02/08 19:52:42 GetStorageInfo %x: %v 65537 transaction ID mismatch got
19 want 1a
2013/02/08 19:52:42 GetObjectHandles failed: transaction ID mismatch got 1a
want 1b
2013/02/08 19:52:42 GetObjectHandles failed: transaction ID mismatch got 1b
want 1c
2013/02/08 19:52:42 GetStorageInfo %x: %v 65537 transaction ID mismatch got
1c want 1d

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

Go-mtpfs gets hung there. If force to umount the device an output of a
trace call is written in the console. Using fusermount does not work:

panic: runtime error: invalid memory address or nil pointer dereference

[signal 0xb code=0x1 addr=0x48 pc=0x7f6241ee3fe5]

goroutine 1 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_reset_device(0x0, 0x1e)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:274 +0x2f
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).Reset(0x0, 0xf840050060,
0xf84006c670, 0x44fd29)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1101 +0x38
github.com/hanwen/go-mtpfs/mtp.(_Device).Close(0xf8400005b0, 0x0,
0xf8400005b0, 0x100000001)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:71 +0x85
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:75 +0xb6f

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 4 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

If I try to mount again without disconnecting the device, go-mtpfs returns
the following error and closes afterwards:
20:00:12 Configure failed: OpenSession after reset: LIBUSB_ERROR_TIMEOUT

The second time it mounted flawlessly (just after the previous LIBUSB
error and plug in the USB cable again). Could access the «Internal storage»
folder and then the «Movies» folder. I could delete files and the available
space was updated properly. But when I tried to copy the file (an MKV
movie) it crashed. Nautilus shows a dialog telling that an error happened
while copying the file to the folder. The description is Failed to attach
the file: The program ended the connection
(in spanish: «Error al unir el
archivo: El programa provocó el fin de la conexión»).

mount->hang->force unmount->terminal trace->cycle USB->mount->delete
and copy
->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

2013/02/08 20:01:38 starting FUSE unknown
2013/02/08 20:08:17 GetStorageInfo %x: %v 65537 transaction ID mismatch got
55b want 55c *<- first line of the copy error. *
2013/02/08 20:08:17 AndroidSendPartialObject failed: no sink for data
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x40 pc=0x7f121ae3c9df]

goroutine 1 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf8402af000, 0x1100000011000, 0x4447a0, 0x0,
…)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070668, 0xf8402af000, 0x1100000011000, 0xffffffff,
0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070668, 0xf8402af000, 0x1100000011000, 0xf8400a2000,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf8400a2000, 0xf8400a2000, 0xf800000000, 0xf800000001, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x0, 0x0,
0x40175e)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
github.com/hanwen/go-fuse/fuse.(*MountState).Loop(0xf84006d1e0,
0x7261747300000010)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:292 +0x48
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:74 +0xb5e

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 4 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_bulk_transfer(0x0,
0xf840070a04)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:50 +0x34
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).BulkTransfer(0x0,
0xf8401f5704, 0xf840052e00, 0x2000000020, 0x7d0, …)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1077 +0xc7
github.com/hanwen/go-mtpfs/mtp.(_Device).sendReq(0xf8400005b0,
0x7f121b202cf0, 0x8, 0x414981, 0x69ac00, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:176 +0x3b6
github.com/hanwen/go-mtpfs/mtp.(_Device).RunTransaction(0xf8400005b0,
0x7f121b202cf0, 0x7f121b202cd0, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:246 +0x189
github.com/hanwen/go-mtpfs/mtp.(_Device).AndroidSendPartialObject(0xf8400005b0,
0xf57, 0x3ab000, 0xf800001000, 0xf840099240, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/android.go:65 +0x163
github.com/hanwen/go-mtpfs/fs.(_androidFile).Write(0xf840070828,
0xf8402ff050, 0x10fb000001000, 0x3ab000, 0xf840099780, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/fs/android.go:37 +0x12d
github.com/hanwen/go-fuse/fuse.(_FileSystemConnector).Write(0xf840093bc0,
0xf8400dc1d0, 0xf8402ff028, 0xf8402ff050, 0x10fb000001000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/fsops.go:373 +0xaf
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).Write(0xf84009a720,
0xf8400dc1d0, 0xf8402ff028, 0xf8402ff050, 0x10fb000001000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:289 +0xa4
github.com/hanwen/go-fuse/fuse.doWrite(0xf84006d1e0, 0xf8400dc000, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go:149 +0x73
github.com/hanwen/go-fuse/fuse.(_MountState).handleRequest(0xf84006d1e0,
0xf8400dc000, 0xf8400dc000, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:340 +0x235
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0,
0xf800000001, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:320 +0x84
created by github.com/hanwen/go-fuse/fuse.(_MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

goroutine 5 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

goroutine 6 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf8402ee000, 0x1100000011000, 0x100000001, 0x0,
…)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070668, 0xf8402ee000, 0x1100000011000,
0x11000ffffffff, 0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070668, 0xf8402ee000, 0x1100000011000, 0xf8402ee000,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf840128c01, 0xf840128c00, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0,
0xf800000001, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

After that if I plug in the USB cable again (unplug, plug) and try to
access the Internal storage folder, Nautilus shows again a dialog of
Input/Output error and the terminal where I run go-mtpfs shows again these
errors with go-mtpfs hung again:

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

2013/02/08 20:14:54 GetObjectInfo failed: transaction ID mismatch got 1b

want 1c
2013/02/08 20:14:54 GetStorageInfo %x: %v 65537 got type 2 in response
2013/02/08 20:14:55 GetStorageInfo %x: %v 65537 transaction ID mismatch
got 1c want 1d
2013/02/08 20:14:55 GetObjectHandles failed: transaction ID mismatch got
1d want 1e
2013/02/08 20:14:55 GetObjectHandles failed: transaction ID mismatch got
1e want 1f
2013/02/08 20:14:55 GetStorageInfo %x: %v 65537 transaction ID mismatch
got 1f want 20

An umount of the folder where the device is mounted makes go-mtpfs write
this trace:
mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->*force unmount
*->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

panic: runtime error: invalid memory address or nil pointer dereference

[signal 0xb code=0x1 addr=0x48 pc=0x7fe67c1defe5]

goroutine 1 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_reset_device(0x0, 0x21)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:274 +0x2f
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).Reset(0x0, 0xf840050060,
0xf84006c2f0, 0x44fd29)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1101 +0x38
github.com/hanwen/go-mtpfs/mtp.(_Device).Close(0xf840000540, 0x0,
0xf840000540, 0x100000001)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:71 +0x85
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:75 +0xb6f

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 4 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

Then I mount the device again (USB cable cycle), and after being able to
access the Movies folder that sits inside the Internal storage folder, I
try to copy the same file. A new crash and trace appears on the terminal:

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error
->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

2013/02/08 20:21:14 GetStorageInfo %x: %v 65537 transaction ID mismatch got

474 want 475
2013/02/08 20:21:14 AndroidSendPartialObject failed: no sink for data
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x40 pc=0x7f94260f79df]

goroutine 1 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf840201000, 0x1100000011000, 0x4447a0, 0x0,
…)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070670, 0xf840201000, 0x1100000011000, 0xffffffff,
0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070670, 0xf840201000, 0x1100000011000, 0xf8400a3000,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf8400a3000, 0xf8400a3000, 0xf800000000, 0xf800000001, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x0, 0x0,
0x40175e)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
github.com/hanwen/go-fuse/fuse.(*MountState).Loop(0xf84006d1e0,
0x7261747300000010)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:292 +0x48
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:74 +0xb5e

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 3 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf84037c000, 0x1100000011000, 0x100000001,
0x0, …)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070670, 0xf84037c000, 0x1100000011000,
0x11000ffffffff, 0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070670, 0xf84037c000, 0x1100000011000, 0xf84037c000,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf8400cf001, 0xf8400cf000, 0x0, 0xf840098000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x1, 0x0,
0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

goroutine 4 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

goroutine 5 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_bulk_transfer(0x0,
0xf840070e04)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:50 +0x34
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).BulkTransfer(0x0,
0xf840173d04, 0xf84018ce60, 0x2000000020, 0x7d0, …)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1077 +0xc7
github.com/hanwen/go-mtpfs/mtp.(_Device).sendReq(0xf8400005b0,
0x7f94264becf0, 0x8, 0x414981, 0x69ac00, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:176 +0x3b6
github.com/hanwen/go-mtpfs/mtp.(*Device).RunTransaction(0xf8400005b0,
0x7f94264becf0, 0x7f94264becd0, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:246 +0x189

github.com/hanwen/go-mtpfs/mtp.(_Device).AndroidSendPartialObject(0xf8400005b0,
0xf58, 0x3ee000, 0xf800001000, 0xf8400992d0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/android.go:65 +0x163
github.com/hanwen/go-mtpfs/fs.(_androidFile).Write(0xf840070fe0,
0xf84038d050, 0x10fb000001000, 0x3ee000, 0xf840099750, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/fs/android.go:37 +0x12d
github.com/hanwen/go-fuse/fuse.(_FileSystemConnector).Write(0xf840093c00,
0xf8400a3fd0, 0xf84038d028, 0xf84038d050, 0x10fb000001000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/fsops.go:373 +0xaf
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).Write(0xf84009a760,
0xf8400a3fd0, 0xf84038d028, 0xf84038d050, 0x10fb000001000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:289 +0xa4
github.com/hanwen/go-fuse/fuse.doWrite(0xf84006d1e0, 0xf8400a3e00, 0x0,
0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go:149 +0x73
github.com/hanwen/go-fuse/fuse.(_MountState).handleRequest(0xf84006d1e0,
0xf8400a3e00, 0xf8400a3e00, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:340 +0x235
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0,
0xf800000001, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:320 +0x84
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

So, I tried again to mount the device. After every crash I have to cycle
the USB cable so I can access the device due to the LIBUSB_ERROR_TIMEOUT
error. Also it seems there are some quirks with the timing between the
device USB being plugged to the computer and when you can use go-mtpfs
without getting LIBUSB_ERROR_TIMEOUT error.
I haven’t mentioned it before, but every time go-mtpfs crashed while
copying the file, after I could mount the device again, I can see that
around ~4 MB of the file were copied, including this last try.

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete with Nautilus, copy
with cp
->semacquire terminal trace

This last try I used cp via the text terminal. Got again this message:
2013/02/08 20:36:12 GetStorageInfo %x: %v 65537 transaction ID mismatch got
233 want 234

And cp got hung with an uninterruptible state. Killing cp (Ctrl+C and
waiting for a while) results in another trace:

^C2013/02/08 20:36:32 Unimplemented opcode INTERRUPT

^C

AndroidSendPartialObject failed: LIBUSB_ERROR_TIMEOUT
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x40 pc=
0x7f84bbece9df]

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xf84009a774, 0x500000001)
/build/buildd/golang-1.0.2/src/pkg/runtime/zsema_amd64.c:146 +0x25
sync.(_Mutex).Lock(0xf84009a770, 0xf8400702e8)
/usr/lib/go/src/pkg/sync/mutex.go:60 +0xbe
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).locked(0xf84009a760,
0x38, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:156 +0x47
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).GetAttr(0xf84009a760,
0xf8400a30c0, 0xf8400a31d0, 0xf8400a3178, 0x0, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:177 +0x2b
github.com/hanwen/go-fuse/fuse.doGetAttr(0xf84006d1e0, 0xf8400a3000, 0x1,
0xf8400a3150)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go:216 +0x6c
github.com/hanwen/go-fuse/fuse.(_MountState).handleRequest(0xf84006d1e0,
0xf8400a3000, 0xf8400a3000, 0xf800000000)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:340 +0x235
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x0, 0x0,
0x40175e)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:320 +0x84
github.com/hanwen/go-fuse/fuse.(_MountState).Loop(0xf84006d1e0,
0x7261747300000010)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:292 +0x48
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:74 +0xb5e

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 5 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

goroutine 6 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf8403a4000, 0x1100000011000, 0x6, 0x0, …)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070670, 0xf8403a4000, 0x1100000011000, 0xffffffff,
0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070670, 0xf8403a4000, 0x1100000011000, 0xf840186200,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf840186201, 0xf840186200, 0xf800000000, 0xf840145c60, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x1, 0x0,
0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

goroutine 7 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_bulk_transfer(0x0,
0xf840070204)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:50 +0x34
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).BulkTransfer(0x0,
0xf84018bc04, 0xf84018afe0, 0x2000000020, 0x7d0, …)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1077 +0xc7
github.com/hanwen/go-mtpfs/mtp.(_Device).sendReq(0xf840000540,
0x7f84bc173d28, 0x0, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:176 +0x3b6
github.com/hanwen/go-mtpfs/mtp.(_Device).RunTransaction(0xf840000540,
0x7f84bc173d28, 0x7f84bc173d48, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:246 +0x189
github.com/hanwen/go-mtpfs/mtp.(_Device).AndroidEndEditObject(0xf840000540,
0xf59, 0xf800000000, 0x100000000, 0x100000001, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/android.go:75 +0xfc
github.com/hanwen/go-mtpfs/fs.(_fileNode).endEdit(0xf84015b270,
0xf84009a620, 0x42b0dc, 0xf840070f40)
/tmp/go/src/github.com/hanwen/go-mtpfs/fs/fs.go:296 +0x59
github.com/hanwen/go-mtpfs/fs.(_androidFile).Release(0xf840070f40,
0xaa01f0800021e)
/tmp/go/src/github.com/hanwen/go-mtpfs/fs/android.go:50 +0x28
github.com/hanwen/go-fuse/fuse.(_FileSystemConnector).Release(0xf840093c00,
0xf84012d5d0, 0xf84012d578, 0xf840075480, 0xf840093c00, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/fsops.go:321 +0x86
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).Release(0xf84009a760,
0xf84012d5d0, 0xf84012d578, 0xf8400755a0, 0xf84009a760, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:274 +0x7f
github.com/hanwen/go-fuse/fuse.doRelease(0xf84006d1e0, 0xf84012d400,
filiprino@kiwi64:~/nexu10mount/Almacenamiento interno/Movies$ 0x1,
0xf84012d550)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go
:296 +0x66
github.com/hanwen/go-fuse/fuse.(_MountState).handleRequest(0xf84006d1e0,
0xf84012d400, 0xf84012d400, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:340 +0x235
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x1, 0x0,
0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:320 +0x84
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

1 Answer

Sorted by:

Reset to default

2

Which version of Ubuntu are you running?

lsb_release -a

Perhaps you do not have the right MTP packages installed on your system?

Try with:

sudo apt-get install mtp-server libmtpserver-dev

and reconnect.

Also I’ve seen cases when it failed and renaming the file did the job (kinda strange). In case you want to go that way.

edited Jul 6, 2016 at 16:01

coatless's user avatar

coatless

19.9k13 gold badges69 silver badges84 bronze badges

answered Jul 5, 2016 at 23:41

Gustavo Cipriani's user avatar

Gustavo CiprianiGustavo Cipriani

665 bronze badges

1

  • i am using Ubuntu 14.04.4 LTS…..!!1

    Jul 6, 2016 at 4:07

Add a comment
 | 

Not the answer you’re looking for? Browse other questions tagged

  • linux
  • usb
  • usb-drive

or ask your own question.

I’ve tried again two times, and both times I got errors and go-mtpfs
crashed.

Long story made short: mount->hang->force unmount->terminal trace
(segmentation fault)->cycle USB->mount->delete and copy->nautilus
error->terminal trace (segfault)->cycle USB->mount->hang->force
unmount->terminal trace (segfault)->cycle USB->mount->delete and
copy->nautilus error->terminal trace (segfault)->cycle USB->mount->delete
with Nautilus, copy with cp->semacquire terminal trace (segfault)

Long story with full details (I hope it’s not too verbose, I’ve added the
previous steps on every step so it may be easier to follow):

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

The first time log. First I mount the device (go-mtpfs nexus10mount &):

2013/02/08 19:52:24 starting FUSE unknown

Then I double click on the Internal storage folder:

2013/02/08 19:52:40 GetObjectInfo failed: transaction ID mismatch got 18
want 19
2013/02/08 19:52:40 GetStorageInfo %x: %v 65537 got type 2 in response
2013/02/08 19:52:42 GetStorageInfo %x: %v 65537 transaction ID mismatch got
19 want 1a
2013/02/08 19:52:42 GetObjectHandles failed: transaction ID mismatch got 1a
want 1b
2013/02/08 19:52:42 GetObjectHandles failed: transaction ID mismatch got 1b
want 1c
2013/02/08 19:52:42 GetStorageInfo %x: %v 65537 transaction ID mismatch got
1c want 1d

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

Go-mtpfs gets hung there. If force to umount the device an output of a
trace call is written in the console. Using fusermount does not work:

panic: runtime error: invalid memory address or nil pointer dereference

[signal 0xb code=0x1 addr=0x48 pc=0x7f6241ee3fe5]

goroutine 1 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_reset_device(0x0, 0x1e)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:274 +0x2f
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).Reset(0x0, 0xf840050060,
0xf84006c670, 0x44fd29)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1101 +0x38
github.com/hanwen/go-mtpfs/mtp.(_Device).Close(0xf8400005b0, 0x0,
0xf8400005b0, 0x100000001)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:71 +0x85
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:75 +0xb6f

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 4 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

If I try to mount again without disconnecting the device, go-mtpfs returns
the following error and closes afterwards:
20:00:12 Configure failed: OpenSession after reset: LIBUSB_ERROR_TIMEOUT

The second time it mounted flawlessly (just after the previous LIBUSB
error and plug in the USB cable again). Could access the «Internal storage»
folder and then the «Movies» folder. I could delete files and the available
space was updated properly. But when I tried to copy the file (an MKV
movie) it crashed. Nautilus shows a dialog telling that an error happened
while copying the file to the folder. The description is Failed to attach
the file: The program ended the connection
(in spanish: «Error al unir el
archivo: El programa provocó el fin de la conexión»).

mount->hang->force unmount->terminal trace->cycle USB->mount->delete
and copy
->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

2013/02/08 20:01:38 starting FUSE unknown
2013/02/08 20:08:17 GetStorageInfo %x: %v 65537 transaction ID mismatch got
55b want 55c *<- first line of the copy error. *
2013/02/08 20:08:17 AndroidSendPartialObject failed: no sink for data
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x40 pc=0x7f121ae3c9df]

goroutine 1 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf8402af000, 0x1100000011000, 0x4447a0, 0x0,
…)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070668, 0xf8402af000, 0x1100000011000, 0xffffffff,
0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070668, 0xf8402af000, 0x1100000011000, 0xf8400a2000,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf8400a2000, 0xf8400a2000, 0xf800000000, 0xf800000001, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x0, 0x0,
0x40175e)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
github.com/hanwen/go-fuse/fuse.(*MountState).Loop(0xf84006d1e0,
0x7261747300000010)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:292 +0x48
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:74 +0xb5e

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 4 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_bulk_transfer(0x0,
0xf840070a04)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:50 +0x34
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).BulkTransfer(0x0,
0xf8401f5704, 0xf840052e00, 0x2000000020, 0x7d0, …)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1077 +0xc7
github.com/hanwen/go-mtpfs/mtp.(_Device).sendReq(0xf8400005b0,
0x7f121b202cf0, 0x8, 0x414981, 0x69ac00, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:176 +0x3b6
github.com/hanwen/go-mtpfs/mtp.(_Device).RunTransaction(0xf8400005b0,
0x7f121b202cf0, 0x7f121b202cd0, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:246 +0x189
github.com/hanwen/go-mtpfs/mtp.(_Device).AndroidSendPartialObject(0xf8400005b0,
0xf57, 0x3ab000, 0xf800001000, 0xf840099240, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/android.go:65 +0x163
github.com/hanwen/go-mtpfs/fs.(_androidFile).Write(0xf840070828,
0xf8402ff050, 0x10fb000001000, 0x3ab000, 0xf840099780, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/fs/android.go:37 +0x12d
github.com/hanwen/go-fuse/fuse.(_FileSystemConnector).Write(0xf840093bc0,
0xf8400dc1d0, 0xf8402ff028, 0xf8402ff050, 0x10fb000001000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/fsops.go:373 +0xaf
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).Write(0xf84009a720,
0xf8400dc1d0, 0xf8402ff028, 0xf8402ff050, 0x10fb000001000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:289 +0xa4
github.com/hanwen/go-fuse/fuse.doWrite(0xf84006d1e0, 0xf8400dc000, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go:149 +0x73
github.com/hanwen/go-fuse/fuse.(_MountState).handleRequest(0xf84006d1e0,
0xf8400dc000, 0xf8400dc000, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:340 +0x235
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0,
0xf800000001, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:320 +0x84
created by github.com/hanwen/go-fuse/fuse.(_MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

goroutine 5 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

goroutine 6 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf8402ee000, 0x1100000011000, 0x100000001, 0x0,
…)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070668, 0xf8402ee000, 0x1100000011000,
0x11000ffffffff, 0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070668, 0xf8402ee000, 0x1100000011000, 0xf8402ee000,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf840128c01, 0xf840128c00, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0,
0xf800000001, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

After that if I plug in the USB cable again (unplug, plug) and try to
access the Internal storage folder, Nautilus shows again a dialog of
Input/Output error and the terminal where I run go-mtpfs shows again these
errors with go-mtpfs hung again:

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

2013/02/08 20:14:54 GetObjectInfo failed: transaction ID mismatch got 1b

want 1c
2013/02/08 20:14:54 GetStorageInfo %x: %v 65537 got type 2 in response
2013/02/08 20:14:55 GetStorageInfo %x: %v 65537 transaction ID mismatch
got 1c want 1d
2013/02/08 20:14:55 GetObjectHandles failed: transaction ID mismatch got
1d want 1e
2013/02/08 20:14:55 GetObjectHandles failed: transaction ID mismatch got
1e want 1f
2013/02/08 20:14:55 GetStorageInfo %x: %v 65537 transaction ID mismatch
got 1f want 20

An umount of the folder where the device is mounted makes go-mtpfs write
this trace:
mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->*force unmount
*->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

panic: runtime error: invalid memory address or nil pointer dereference

[signal 0xb code=0x1 addr=0x48 pc=0x7fe67c1defe5]

goroutine 1 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_reset_device(0x0, 0x21)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:274 +0x2f
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).Reset(0x0, 0xf840050060,
0xf84006c2f0, 0x44fd29)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1101 +0x38
github.com/hanwen/go-mtpfs/mtp.(_Device).Close(0xf840000540, 0x0,
0xf840000540, 0x100000001)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:71 +0x85
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:75 +0xb6f

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 4 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

Then I mount the device again (USB cable cycle), and after being able to
access the Movies folder that sits inside the Internal storage folder, I
try to copy the same file. A new crash and trace appears on the terminal:

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error
->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

2013/02/08 20:21:14 GetStorageInfo %x: %v 65537 transaction ID mismatch got

474 want 475
2013/02/08 20:21:14 AndroidSendPartialObject failed: no sink for data
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x40 pc=0x7f94260f79df]

goroutine 1 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf840201000, 0x1100000011000, 0x4447a0, 0x0,
…)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070670, 0xf840201000, 0x1100000011000, 0xffffffff,
0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070670, 0xf840201000, 0x1100000011000, 0xf8400a3000,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf8400a3000, 0xf8400a3000, 0xf800000000, 0xf800000001, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x0, 0x0,
0x40175e)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
github.com/hanwen/go-fuse/fuse.(*MountState).Loop(0xf84006d1e0,
0x7261747300000010)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:292 +0x48
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:74 +0xb5e

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 3 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf84037c000, 0x1100000011000, 0x100000001,
0x0, …)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070670, 0xf84037c000, 0x1100000011000,
0x11000ffffffff, 0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070670, 0xf84037c000, 0x1100000011000, 0xf84037c000,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf8400cf001, 0xf8400cf000, 0x0, 0xf840098000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x1, 0x0,
0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

goroutine 4 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

goroutine 5 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_bulk_transfer(0x0,
0xf840070e04)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:50 +0x34
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).BulkTransfer(0x0,
0xf840173d04, 0xf84018ce60, 0x2000000020, 0x7d0, …)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1077 +0xc7
github.com/hanwen/go-mtpfs/mtp.(_Device).sendReq(0xf8400005b0,
0x7f94264becf0, 0x8, 0x414981, 0x69ac00, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:176 +0x3b6
github.com/hanwen/go-mtpfs/mtp.(*Device).RunTransaction(0xf8400005b0,
0x7f94264becf0, 0x7f94264becd0, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:246 +0x189

github.com/hanwen/go-mtpfs/mtp.(_Device).AndroidSendPartialObject(0xf8400005b0,
0xf58, 0x3ee000, 0xf800001000, 0xf8400992d0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/android.go:65 +0x163
github.com/hanwen/go-mtpfs/fs.(_androidFile).Write(0xf840070fe0,
0xf84038d050, 0x10fb000001000, 0x3ee000, 0xf840099750, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/fs/android.go:37 +0x12d
github.com/hanwen/go-fuse/fuse.(_FileSystemConnector).Write(0xf840093c00,
0xf8400a3fd0, 0xf84038d028, 0xf84038d050, 0x10fb000001000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/fsops.go:373 +0xaf
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).Write(0xf84009a760,
0xf8400a3fd0, 0xf84038d028, 0xf84038d050, 0x10fb000001000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:289 +0xa4
github.com/hanwen/go-fuse/fuse.doWrite(0xf84006d1e0, 0xf8400a3e00, 0x0,
0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go:149 +0x73
github.com/hanwen/go-fuse/fuse.(_MountState).handleRequest(0xf84006d1e0,
0xf8400a3e00, 0xf8400a3e00, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:340 +0x235
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0,
0xf800000001, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:320 +0x84
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

So, I tried again to mount the device. After every crash I have to cycle
the USB cable so I can access the device due to the LIBUSB_ERROR_TIMEOUT
error. Also it seems there are some quirks with the timing between the
device USB being plugged to the computer and when you can use go-mtpfs
without getting LIBUSB_ERROR_TIMEOUT error.
I haven’t mentioned it before, but every time go-mtpfs crashed while
copying the file, after I could mount the device again, I can see that
around ~4 MB of the file were copied, including this last try.

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete with Nautilus, copy
with cp
->semacquire terminal trace

This last try I used cp via the text terminal. Got again this message:
2013/02/08 20:36:12 GetStorageInfo %x: %v 65537 transaction ID mismatch got
233 want 234

And cp got hung with an uninterruptible state. Killing cp (Ctrl+C and
waiting for a while) results in another trace:

^C2013/02/08 20:36:32 Unimplemented opcode INTERRUPT

^C

AndroidSendPartialObject failed: LIBUSB_ERROR_TIMEOUT
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x40 pc=
0x7f84bbece9df]

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xf84009a774, 0x500000001)
/build/buildd/golang-1.0.2/src/pkg/runtime/zsema_amd64.c:146 +0x25
sync.(_Mutex).Lock(0xf84009a770, 0xf8400702e8)
/usr/lib/go/src/pkg/sync/mutex.go:60 +0xbe
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).locked(0xf84009a760,
0x38, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:156 +0x47
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).GetAttr(0xf84009a760,
0xf8400a30c0, 0xf8400a31d0, 0xf8400a3178, 0x0, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:177 +0x2b
github.com/hanwen/go-fuse/fuse.doGetAttr(0xf84006d1e0, 0xf8400a3000, 0x1,
0xf8400a3150)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go:216 +0x6c
github.com/hanwen/go-fuse/fuse.(_MountState).handleRequest(0xf84006d1e0,
0xf8400a3000, 0xf8400a3000, 0xf800000000)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:340 +0x235
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x0, 0x0,
0x40175e)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:320 +0x84
github.com/hanwen/go-fuse/fuse.(_MountState).Loop(0xf84006d1e0,
0x7261747300000010)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:292 +0x48
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:74 +0xb5e

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 5 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

goroutine 6 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf8403a4000, 0x1100000011000, 0x6, 0x0, …)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070670, 0xf8403a4000, 0x1100000011000, 0xffffffff,
0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070670, 0xf8403a4000, 0x1100000011000, 0xf840186200,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf840186201, 0xf840186200, 0xf800000000, 0xf840145c60, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x1, 0x0,
0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

goroutine 7 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_bulk_transfer(0x0,
0xf840070204)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:50 +0x34
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).BulkTransfer(0x0,
0xf84018bc04, 0xf84018afe0, 0x2000000020, 0x7d0, …)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1077 +0xc7
github.com/hanwen/go-mtpfs/mtp.(_Device).sendReq(0xf840000540,
0x7f84bc173d28, 0x0, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:176 +0x3b6
github.com/hanwen/go-mtpfs/mtp.(_Device).RunTransaction(0xf840000540,
0x7f84bc173d28, 0x7f84bc173d48, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:246 +0x189
github.com/hanwen/go-mtpfs/mtp.(_Device).AndroidEndEditObject(0xf840000540,
0xf59, 0xf800000000, 0x100000000, 0x100000001, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/android.go:75 +0xfc
github.com/hanwen/go-mtpfs/fs.(_fileNode).endEdit(0xf84015b270,
0xf84009a620, 0x42b0dc, 0xf840070f40)
/tmp/go/src/github.com/hanwen/go-mtpfs/fs/fs.go:296 +0x59
github.com/hanwen/go-mtpfs/fs.(_androidFile).Release(0xf840070f40,
0xaa01f0800021e)
/tmp/go/src/github.com/hanwen/go-mtpfs/fs/android.go:50 +0x28
github.com/hanwen/go-fuse/fuse.(_FileSystemConnector).Release(0xf840093c00,
0xf84012d5d0, 0xf84012d578, 0xf840075480, 0xf840093c00, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/fsops.go:321 +0x86
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).Release(0xf84009a760,
0xf84012d5d0, 0xf84012d578, 0xf8400755a0, 0xf84009a760, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:274 +0x7f
github.com/hanwen/go-fuse/fuse.doRelease(0xf84006d1e0, 0xf84012d400,
filiprino@kiwi64:~/nexu10mount/Almacenamiento interno/Movies$ 0x1,
0xf84012d550)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go
:296 +0x66
github.com/hanwen/go-fuse/fuse.(_MountState).handleRequest(0xf84006d1e0,
0xf84012d400, 0xf84012d400, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:340 +0x235
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x1, 0x0,
0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:320 +0x84
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

Whoops, sorry about that. I meant to paste a message I had already written, but forgotten that I had copied a song lyric in the meantime. Quite offtopic.

I meant to post that I also own an iRiver H10 20 GB and I’m having problems using libmtp with it. I tried to use the example tools that came with the libmtp package such as detect. When I run detect while my iRiver is connected it detects the device, waits for about half a minute, then prints out all the information it can find, waits for another half a minute and then prints the WMPInfo.xml file. Then another wait and finally it prints the following:

PTP: Closing session
inep: usb_get_endpoint_status(): Broken pipe
outep: usb_get_endpoint_status(): Broken pipe
OK.

So I checked the kernel logs, as it seems «Broken pipe» is a kernel thing. In there I notice this:

usb 1-4: new high speed USB device using ehci_hcd and address 51
usb 1-4: reset high speed USB device using ehci_hcd and address 51
usb 1-4: can’t restore configuration #128 (error=-32)
usb 1-4: USB disconnect, address 51
usb 1-4: new high speed USB device using ehci_hcd and address 52
usb 1-4: can’t set config #128, error -32
usb 1-4: new high speed USB device using ehci_hcd and address 53
usb 1-4: can’t set config #128, error -32
usb 1-4: new high speed USB device using ehci_hcd and address 54
usb 1-4: can’t set config #128, error -32
usb 1-4: new high speed USB device using ehci_hcd and address 55
usb 1-4: can’t set config #128, error -32

So it seems that at the end of the program it resets the device and apparently something is going wrong with the reset. On the device I see the message «OK to Disconnect». If I then run the detect program again it says it can’t detect the device, which makes sence because resetting the device seems to go wrong at which point the kernel will just ignore the device.

It would be great if we can get this to work. Having to reset the device every time, in order to use USB Mass Storage mode, isn’t very practical sometimes.

I’ve always had issues with compatibility between my Android phone and Ubuntu, but now it’s gotten to the point that I can’t do anything with it over USB. It’s always been that when I plug in my device, an error message appear:

«Unable to mount Android phone
«Unable to open MTP device ‘[usb:001,035]’»

Regardless, I was able to manage my files as long as the phone was unlocked when I plugged it in. However, I now seem to get a new error message (or at least one that I don’t recall getting before), which reads:

Unhandled error message:  No such interface 'org.gtk.vfs.Mount' on object at path/org/gtk/vfs/mount/1

I’m not sure if this is the root of my problem. I can view all of the files on my Android device, but when I try to do anything like creating/deleting files, I receive a message saying something like:

Error while creating directory Untitled Folder.
There was an error creating the directory in mtp://[usb001,037]/Internal%20storage.

Under «Show more details», I receive the error:

libmtp error:  Could not send object info.

I can do everything I need to over FTP, but it ridiculously slow for large files. Any help getting my Android and PC to talk to each other is greatly appreciated.

1 Answer

Sorted by:

Reset to default

2

Which version of Ubuntu are you running?

lsb_release -a

Perhaps you do not have the right MTP packages installed on your system?

Try with:

sudo apt-get install mtp-server libmtpserver-dev

and reconnect.

Also I’ve seen cases when it failed and renaming the file did the job (kinda strange). In case you want to go that way.

Improve this answer

edited Jul 6, 2016 at 16:01

coatless's user avatar

coatless

20k13 gold badges69 silver badges84 bronze badges

answered Jul 5, 2016 at 23:41

Gustavo Cipriani's user avatar

Gustavo CiprianiGustavo Cipriani

665 bronze badges

1

  • i am using Ubuntu 14.04.4 LTS…..!!1

    – bhumika rijiya

    Jul 6, 2016 at 4:07

Add a comment
 | 

Not the answer you’re looking for? Browse other questions tagged

  • linux
  • usb
  • usb-drive

or ask your own question.

I’ve tried again two times, and both times I got errors and go-mtpfs
crashed.

Long story made short: mount->hang->force unmount->terminal trace
(segmentation fault)->cycle USB->mount->delete and copy->nautilus
error->terminal trace (segfault)->cycle USB->mount->hang->force
unmount->terminal trace (segfault)->cycle USB->mount->delete and
copy->nautilus error->terminal trace (segfault)->cycle USB->mount->delete
with Nautilus, copy with cp->semacquire terminal trace (segfault)

Long story with full details (I hope it’s not too verbose, I’ve added the
previous steps on every step so it may be easier to follow):

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

The first time log. First I mount the device (go-mtpfs nexus10mount &):

2013/02/08 19:52:24 starting FUSE unknown

Then I double click on the Internal storage folder:

2013/02/08 19:52:40 GetObjectInfo failed: transaction ID mismatch got 18
want 19
2013/02/08 19:52:40 GetStorageInfo %x: %v 65537 got type 2 in response
2013/02/08 19:52:42 GetStorageInfo %x: %v 65537 transaction ID mismatch got
19 want 1a
2013/02/08 19:52:42 GetObjectHandles failed: transaction ID mismatch got 1a
want 1b
2013/02/08 19:52:42 GetObjectHandles failed: transaction ID mismatch got 1b
want 1c
2013/02/08 19:52:42 GetStorageInfo %x: %v 65537 transaction ID mismatch got
1c want 1d

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

Go-mtpfs gets hung there. If force to umount the device an output of a
trace call is written in the console. Using fusermount does not work:

panic: runtime error: invalid memory address or nil pointer dereference

[signal 0xb code=0x1 addr=0x48 pc=0x7f6241ee3fe5]

goroutine 1 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_reset_device(0x0, 0x1e)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:274 +0x2f
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).Reset(0x0, 0xf840050060,
0xf84006c670, 0x44fd29)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1101 +0x38
github.com/hanwen/go-mtpfs/mtp.(_Device).Close(0xf8400005b0, 0x0,
0xf8400005b0, 0x100000001)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:71 +0x85
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:75 +0xb6f

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 4 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

If I try to mount again without disconnecting the device, go-mtpfs returns
the following error and closes afterwards:
20:00:12 Configure failed: OpenSession after reset: LIBUSB_ERROR_TIMEOUT

The second time it mounted flawlessly (just after the previous LIBUSB
error and plug in the USB cable again). Could access the «Internal storage»
folder and then the «Movies» folder. I could delete files and the available
space was updated properly. But when I tried to copy the file (an MKV
movie) it crashed. Nautilus shows a dialog telling that an error happened
while copying the file to the folder. The description is Failed to attach
the file: The program ended the connection
(in spanish: «Error al unir el
archivo: El programa provocó el fin de la conexión»).

mount->hang->force unmount->terminal trace->cycle USB->mount->delete
and copy
->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

2013/02/08 20:01:38 starting FUSE unknown
2013/02/08 20:08:17 GetStorageInfo %x: %v 65537 transaction ID mismatch got
55b want 55c *<- first line of the copy error. *
2013/02/08 20:08:17 AndroidSendPartialObject failed: no sink for data
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x40 pc=0x7f121ae3c9df]

goroutine 1 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf8402af000, 0x1100000011000, 0x4447a0, 0x0,
…)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070668, 0xf8402af000, 0x1100000011000, 0xffffffff,
0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070668, 0xf8402af000, 0x1100000011000, 0xf8400a2000,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf8400a2000, 0xf8400a2000, 0xf800000000, 0xf800000001, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x0, 0x0,
0x40175e)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
github.com/hanwen/go-fuse/fuse.(*MountState).Loop(0xf84006d1e0,
0x7261747300000010)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:292 +0x48
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:74 +0xb5e

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 4 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_bulk_transfer(0x0,
0xf840070a04)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:50 +0x34
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).BulkTransfer(0x0,
0xf8401f5704, 0xf840052e00, 0x2000000020, 0x7d0, …)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1077 +0xc7
github.com/hanwen/go-mtpfs/mtp.(_Device).sendReq(0xf8400005b0,
0x7f121b202cf0, 0x8, 0x414981, 0x69ac00, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:176 +0x3b6
github.com/hanwen/go-mtpfs/mtp.(_Device).RunTransaction(0xf8400005b0,
0x7f121b202cf0, 0x7f121b202cd0, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:246 +0x189
github.com/hanwen/go-mtpfs/mtp.(_Device).AndroidSendPartialObject(0xf8400005b0,
0xf57, 0x3ab000, 0xf800001000, 0xf840099240, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/android.go:65 +0x163
github.com/hanwen/go-mtpfs/fs.(_androidFile).Write(0xf840070828,
0xf8402ff050, 0x10fb000001000, 0x3ab000, 0xf840099780, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/fs/android.go:37 +0x12d
github.com/hanwen/go-fuse/fuse.(_FileSystemConnector).Write(0xf840093bc0,
0xf8400dc1d0, 0xf8402ff028, 0xf8402ff050, 0x10fb000001000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/fsops.go:373 +0xaf
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).Write(0xf84009a720,
0xf8400dc1d0, 0xf8402ff028, 0xf8402ff050, 0x10fb000001000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:289 +0xa4
github.com/hanwen/go-fuse/fuse.doWrite(0xf84006d1e0, 0xf8400dc000, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go:149 +0x73
github.com/hanwen/go-fuse/fuse.(_MountState).handleRequest(0xf84006d1e0,
0xf8400dc000, 0xf8400dc000, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:340 +0x235
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0,
0xf800000001, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:320 +0x84
created by github.com/hanwen/go-fuse/fuse.(_MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

goroutine 5 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

goroutine 6 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf8402ee000, 0x1100000011000, 0x100000001, 0x0,
…)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070668, 0xf8402ee000, 0x1100000011000,
0x11000ffffffff, 0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070668, 0xf8402ee000, 0x1100000011000, 0xf8402ee000,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf840128c01, 0xf840128c00, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0,
0xf800000001, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

After that if I plug in the USB cable again (unplug, plug) and try to
access the Internal storage folder, Nautilus shows again a dialog of
Input/Output error and the terminal where I run go-mtpfs shows again these
errors with go-mtpfs hung again:

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

2013/02/08 20:14:54 GetObjectInfo failed: transaction ID mismatch got 1b

want 1c
2013/02/08 20:14:54 GetStorageInfo %x: %v 65537 got type 2 in response
2013/02/08 20:14:55 GetStorageInfo %x: %v 65537 transaction ID mismatch
got 1c want 1d
2013/02/08 20:14:55 GetObjectHandles failed: transaction ID mismatch got
1d want 1e
2013/02/08 20:14:55 GetObjectHandles failed: transaction ID mismatch got
1e want 1f
2013/02/08 20:14:55 GetStorageInfo %x: %v 65537 transaction ID mismatch
got 1f want 20

An umount of the folder where the device is mounted makes go-mtpfs write
this trace:
mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->*force unmount
*->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

panic: runtime error: invalid memory address or nil pointer dereference

[signal 0xb code=0x1 addr=0x48 pc=0x7fe67c1defe5]

goroutine 1 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_reset_device(0x0, 0x21)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:274 +0x2f
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).Reset(0x0, 0xf840050060,
0xf84006c2f0, 0x44fd29)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1101 +0x38
github.com/hanwen/go-mtpfs/mtp.(_Device).Close(0xf840000540, 0x0,
0xf840000540, 0x100000001)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:71 +0x85
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:75 +0xb6f

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 4 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

Then I mount the device again (USB cable cycle), and after being able to
access the Movies folder that sits inside the Internal storage folder, I
try to copy the same file. A new crash and trace appears on the terminal:

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete and copy->nautilus
error
->terminal trace->cycle USB->mount->delete with Nautilus, copy with
cp->semacquire terminal trace

2013/02/08 20:21:14 GetStorageInfo %x: %v 65537 transaction ID mismatch got

474 want 475
2013/02/08 20:21:14 AndroidSendPartialObject failed: no sink for data
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x40 pc=0x7f94260f79df]

goroutine 1 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf840201000, 0x1100000011000, 0x4447a0, 0x0,
…)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070670, 0xf840201000, 0x1100000011000, 0xffffffff,
0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070670, 0xf840201000, 0x1100000011000, 0xf8400a3000,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf8400a3000, 0xf8400a3000, 0xf800000000, 0xf800000001, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x0, 0x0,
0x40175e)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
github.com/hanwen/go-fuse/fuse.(*MountState).Loop(0xf84006d1e0,
0x7261747300000010)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:292 +0x48
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:74 +0xb5e

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 3 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf84037c000, 0x1100000011000, 0x100000001,
0x0, …)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070670, 0xf84037c000, 0x1100000011000,
0x11000ffffffff, 0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070670, 0xf84037c000, 0x1100000011000, 0xf84037c000,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf8400cf001, 0xf8400cf000, 0x0, 0xf840098000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x1, 0x0,
0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

goroutine 4 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

goroutine 5 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_bulk_transfer(0x0,
0xf840070e04)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:50 +0x34
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).BulkTransfer(0x0,
0xf840173d04, 0xf84018ce60, 0x2000000020, 0x7d0, …)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1077 +0xc7
github.com/hanwen/go-mtpfs/mtp.(_Device).sendReq(0xf8400005b0,
0x7f94264becf0, 0x8, 0x414981, 0x69ac00, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:176 +0x3b6
github.com/hanwen/go-mtpfs/mtp.(*Device).RunTransaction(0xf8400005b0,
0x7f94264becf0, 0x7f94264becd0, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:246 +0x189

github.com/hanwen/go-mtpfs/mtp.(_Device).AndroidSendPartialObject(0xf8400005b0,
0xf58, 0x3ee000, 0xf800001000, 0xf8400992d0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/android.go:65 +0x163
github.com/hanwen/go-mtpfs/fs.(_androidFile).Write(0xf840070fe0,
0xf84038d050, 0x10fb000001000, 0x3ee000, 0xf840099750, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/fs/android.go:37 +0x12d
github.com/hanwen/go-fuse/fuse.(_FileSystemConnector).Write(0xf840093c00,
0xf8400a3fd0, 0xf84038d028, 0xf84038d050, 0x10fb000001000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/fsops.go:373 +0xaf
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).Write(0xf84009a760,
0xf8400a3fd0, 0xf84038d028, 0xf84038d050, 0x10fb000001000, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:289 +0xa4
github.com/hanwen/go-fuse/fuse.doWrite(0xf84006d1e0, 0xf8400a3e00, 0x0,
0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go:149 +0x73
github.com/hanwen/go-fuse/fuse.(_MountState).handleRequest(0xf84006d1e0,
0xf8400a3e00, 0xf8400a3e00, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:340 +0x235
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0,
0xf800000001, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:320 +0x84
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

So, I tried again to mount the device. After every crash I have to cycle
the USB cable so I can access the device due to the LIBUSB_ERROR_TIMEOUT
error. Also it seems there are some quirks with the timing between the
device USB being plugged to the computer and when you can use go-mtpfs
without getting LIBUSB_ERROR_TIMEOUT error.
I haven’t mentioned it before, but every time go-mtpfs crashed while
copying the file, after I could mount the device again, I can see that
around ~4 MB of the file were copied, including this last try.

mount->hang->force unmount->terminal trace->cycle USB->mount->delete and
copy->nautilus error->terminal trace->cycle USB->mount->hang->force
unmount->terminal trace->cycle USB->mount->delete with Nautilus, copy
with cp
->semacquire terminal trace

This last try I used cp via the text terminal. Got again this message:
2013/02/08 20:36:12 GetStorageInfo %x: %v 65537 transaction ID mismatch got
233 want 234

And cp got hung with an uninterruptible state. Killing cp (Ctrl+C and
waiting for a while) results in another trace:

^C2013/02/08 20:36:32 Unimplemented opcode INTERRUPT

^C

AndroidSendPartialObject failed: LIBUSB_ERROR_TIMEOUT
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x40 pc=
0x7f84bbece9df]

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xf84009a774, 0x500000001)
/build/buildd/golang-1.0.2/src/pkg/runtime/zsema_amd64.c:146 +0x25
sync.(_Mutex).Lock(0xf84009a770, 0xf8400702e8)
/usr/lib/go/src/pkg/sync/mutex.go:60 +0xbe
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).locked(0xf84009a760,
0x38, 0x0, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:156 +0x47
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).GetAttr(0xf84009a760,
0xf8400a30c0, 0xf8400a31d0, 0xf8400a3178, 0x0, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:177 +0x2b
github.com/hanwen/go-fuse/fuse.doGetAttr(0xf84006d1e0, 0xf8400a3000, 0x1,
0xf8400a3150)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go:216 +0x6c
github.com/hanwen/go-fuse/fuse.(_MountState).handleRequest(0xf84006d1e0,
0xf8400a3000, 0xf8400a3000, 0xf800000000)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:340 +0x235
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x0, 0x0,
0x40175e)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:320 +0x84
github.com/hanwen/go-fuse/fuse.(_MountState).Loop(0xf84006d1e0,
0x7261747300000010)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:292 +0x48
main.main()
/tmp/go/src/github.com/hanwen/go-mtpfs/main.go:74 +0xb5e

goroutine 2 [syscall]:
created by runtime.main
/build/buildd/golang-1.0.2/src/pkg/runtime/proc.c:221

goroutine 5 [finalizer wait]:
created by runtime.gc
/build/buildd/golang-1.0.2/src/pkg/runtime/mgc0.c:882

goroutine 6 [syscall]:
syscall.Syscall()
/build/buildd/golang-1.0.2/src/pkg/syscall/asm_linux_amd64.s:15 +0x5
syscall.Read(0xf800000009, 0xf8403a4000, 0x1100000011000, 0x6, 0x0, …)
/usr/lib/go/src/pkg/syscall/zerrors_linux_amd64.go:2137 +0x78
os.(_File).read(0xf840070670, 0xf8403a4000, 0x1100000011000, 0xffffffff,
0x0, …)
/usr/lib/go/src/pkg/os/file_unix.go:163 +0x58
os.(_File).Read(0xf840070670, 0xf8403a4000, 0x1100000011000, 0xf840186200,
0x0, …)
/usr/lib/go/src/pkg/os/file.go:95 +0x83
github.com/hanwen/go-fuse/fuse.(_MountState).readRequest(0xf84006d1e0,
0xf840186201, 0xf840186200, 0xf800000000, 0xf840145c60, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:227 +0x1aa
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x1, 0x0,
0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:304 +0x51
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

goroutine 7 [syscall]:
github.com/hanwen/go-mtpfs/usb._Cfunc_libusb_bulk_transfer(0x0,
0xf840070204)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_defun.c:50 +0x34
github.com/hanwen/go-mtpfs/usb.(_DeviceHandle).BulkTransfer(0x0,
0xf84018bc04, 0xf84018afe0, 0x2000000020, 0x7d0, …)
/tmp/go-build259133475/
github.com/hanwen/go-mtpfs/usb/_obj/_cgo_gotypes.go:1077 +0xc7
github.com/hanwen/go-mtpfs/mtp.(_Device).sendReq(0xf840000540,
0x7f84bc173d28, 0x0, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:176 +0x3b6
github.com/hanwen/go-mtpfs/mtp.(_Device).RunTransaction(0xf840000540,
0x7f84bc173d28, 0x7f84bc173d48, 0x0, 0x0, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/mtp.go:246 +0x189
github.com/hanwen/go-mtpfs/mtp.(_Device).AndroidEndEditObject(0xf840000540,
0xf59, 0xf800000000, 0x100000000, 0x100000001, …)
/tmp/go/src/github.com/hanwen/go-mtpfs/mtp/android.go:75 +0xfc
github.com/hanwen/go-mtpfs/fs.(_fileNode).endEdit(0xf84015b270,
0xf84009a620, 0x42b0dc, 0xf840070f40)
/tmp/go/src/github.com/hanwen/go-mtpfs/fs/fs.go:296 +0x59
github.com/hanwen/go-mtpfs/fs.(_androidFile).Release(0xf840070f40,
0xaa01f0800021e)
/tmp/go/src/github.com/hanwen/go-mtpfs/fs/android.go:50 +0x28
github.com/hanwen/go-fuse/fuse.(_FileSystemConnector).Release(0xf840093c00,
0xf84012d5d0, 0xf84012d578, 0xf840075480, 0xf840093c00, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/fsops.go:321 +0x86
github.com/hanwen/go-fuse/fuse.(_LockingRawFileSystem).Release(0xf84009a760,
0xf84012d5d0, 0xf84012d578, 0xf8400755a0, 0xf84009a760, …)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/lockingfs.go:274 +0x7f
github.com/hanwen/go-fuse/fuse.doRelease(0xf84006d1e0, 0xf84012d400,
filiprino@kiwi64:~/nexu10mount/Almacenamiento interno/Movies$ 0x1,
0xf84012d550)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/opcode.go
:296 +0x66
github.com/hanwen/go-fuse/fuse.(_MountState).handleRequest(0xf84006d1e0,
0xf84012d400, 0xf84012d400, 0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:340 +0x235
github.com/hanwen/go-fuse/fuse.(_MountState).loop(0xf84006d1e0, 0x1, 0x0,
0x0)
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:320 +0x84
created by github.com/hanwen/go-fuse/fuse.(*MountState).readRequest
/tmp/go/src/github.com/hanwen/go-fuse/fuse/mountstate.go:251 +0x604

I have gnomad2 2.8.8 setup with libnjb 2.2.5 and libmtp
0.0.15, and I recieve the following error when
transfering certain files, here is an example of trying
to transfer Flaming from «The Piper at the Gates of Dawn»:

LIBMTP_Send_Track_From_File_Descriptor: error setting
metadata for new track
PTP: I/O error
LIBMTP_Delete_Object(): could not delete object
Error sending file «/tmp/fileYNcttY/04. Flaming.mp3» to
MTP device!

This file will fail every single time I try to put it
on my Vision:M, others include I Will from «The Beatles
(white album)» and others I can’t think of at midnight,
anyhow, this is anoying me very much, after it crashes
like this, I am not able to do anything else with the
mp3 player. All of my mp3’s are ripped with sound
juicer with lame and a bitrate of 192 kbps. The tags
are added/updated with programs using mutagen normally.

I have submitted this to gnomad2 also.

Понравилась статья? Поделить с друзьями:
  • Ошибка err 4 carrier рефрижератор
  • Ошибка error d3d device lost
  • Ошибка lexus lx450d p2197
  • Ошибка ldconfig статус ошибки 256
  • Ошибка lua dll