I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

Jakub Lach
As of now, I'm rebuilding system with a GENERIC kernel, what
should I do to provide as much as possible useful debug?

I think the problem only manifested itself after I've switched to
much faster internal SSD, that would explain why some mitigate
it by throttling USB speed.
Reply | Threaded
Open this post in threaded view
|

Re: I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

Hans Petter Selasky-6
On 02/08/17 18:18, Jakub Lach wrote:
> As of now, I'm rebuilding system with a GENERIC kernel, what
> should I do to provide as much as possible useful debug?
>
> I think the problem only manifested itself after I've switched to
> much faster internal SSD, that would explain why some mitigate
> it by throttling USB speed.
>

Hi,

Some suggestions:

1) UMASS has a set of debug knobs under hw.usb.umass.debug

2) Stress test a fresh disk, which you don't have any data on with
/usr/src/tools/tools/usbtest to ensure it is 100% compatible with FreeBSD.

3) usbdump can be used to capture the USB traffic and identify failing
commands.

--HPS

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

Jakub Lach
Thanks for a reply.

Currently both of them are empty, usbtest looks promising,
I will look into it. usbdump might be too much for me.

As of now, I've hoped to take a disk dumps via USB, but it
doesn't look possible. Smaller writes (<50 G) are sometimes
ok.

Devices in question-

ugen6.2: <JMicron USB to ATAATAPI bridge> at usbus6, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA) (it's internally a <SAMSUNG HD322HJ >)

ugen7.2: <HGST TOURO S> at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (0mA), (it's a HGST HTS721010A9E630  using internally a USB bridge [0x4971:0x1023 (0x100)])
Reply | Threaded
Open this post in threaded view
|

Re: I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

Jakub Lach
Hello again,

Any more pointers on how to test the devices
thoroughly?

http://pastebin.ca/3765422 touro s

http://pastebin.ca/3765426 samsung
Reply | Threaded
Open this post in threaded view
|

Re: I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

Hans Petter Selasky-6
On 02/08/17 21:41, Jakub Lach wrote:
> Hello again,
>
> Any more pointers on how to test the devices
> thoroughly?
>
> http://pastebin.ca/3765422 touro s
>
> http://pastebin.ca/3765426 samsung
>

        13) Set test duration: <60> seconds

Set it to 3600 for one hour and see if the DERR or RST OR ERR counters
increase.

--HPS

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

Jakub Lach
Will do, I've found your recommendation in another thread, but only
after I've posted. I will probably leave both drives overnight.

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

Jakub Lach
http://pastebin.ca/3765605 samsung/jmicron

It disconnected itself? ERR=03, RST=13, DERR=0
went to ERR=17, RST=27, DERR=0

http://pastebin.ca/3765608 touro s
ERR=14, RST=24, DERR=0 went to ERR=27, RST=37, DERR=0

starting point:

https://s24.postimg.org/oo95be9d1/2017_02_09_012128_1440x900_scrot.png

Reply | Threaded
Open this post in threaded view
|

Re: I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

Jakub Lach
For some reason, samsung/jmicron one is prone to disconnecting
itself, which could explain some errors, as in usbdump.

However, under GENERIC, I was able to use dump twice time
on touro s without problems (4h+ of disk writes).

_BUT_ as soon as I've returned to my usual kernel config, the
problem reappeared.

http://pastebin.ca/3765981

So I blame kernel config now. Is it possible that usb related modules
behave differently than in kernel default ones?
Reply | Threaded
Open this post in threaded view
|

Re: I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

Jakub Lach
I've added to my config options USB_DEBUG
and turned on hw.usb.debug: 1 and hw.usb.umass.debug: 1

This time the dump finished.

  DUMP: 95.35% done, finished in 0:03 at Thu Feb  9 23:06:21 2017
  DUMP: 99.23% done, finished in 0:00 at Thu Feb  9 23:08:19 2017
  DUMP: DUMP: 99117484 tape blocks
  DUMP: finished in 4916 seconds, throughput 20162 KBytes/sec
  DUMP: DUMP IS DONE

and log filled with-

Feb  9 22:39:43 Thinkpad kernel: usbd_pipe_enter: enter
Feb  9 22:39:43 Thinkpad kernel: usbd_pipe_start: start
Feb  9 22:39:43 Thinkpad kernel: usbd_transfer_done: err=USB_ERR_NORMAL_COMPLETION
Feb  9 22:39:43 Thinkpad kernel: usbd_callback_wrapper_sub: xfer=0xfffffe000140c868 endpoint=0xfffff8005fdbb968 sts=0 alen=65536, slen=65536, afrm=1, nfrm=1
Feb  9 22:39:43 Thinkpad kernel: usbd_transfer_submit: xfer=0xfffffe000140cac8, endpoint=0xfffff8005fdbb800, nframes=1, dir=read
Feb  9 22:39:43 Thinkpad kernel: usb_dump_endpoint: endpoint=0xfffff8005fdbb800 edesc=0xfffff8005fa7b692 isoc_next=0 toggle_next=0 bEndpointAddress=0x81
Feb  9 22:39:43 Thinkpad kernel: usb_dump_queue: endpoint=0xfffff8005fdbb800 xfer:
Feb  9 22:39:43 Thinkpad kernel: usbd_pipe_enter: enter
Feb  9 22:39:43 Thinkpad kernel: usbd_pipe_start: start
Feb  9 22:39:43 Thinkpad kernel: usbd_transfer_done: err=USB_ERR_NORMAL_COMPLETION

I wonder if this is due to slightly reduced throughput? Will try again
without logging.
Reply | Threaded
Open this post in threaded view
|

Re: I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

Jakub Lach
Once again,

  DUMP: 67.52% done, finished in 0:21 at Fri Feb 10 01:02:38 2017
  DUMP: 75.50% done, finished in 0:16 at Fri Feb 10 01:02:12 2017
  DUMP: 83.32% done, finished in 0:11 at Fri Feb 10 01:01:59 2017
  DUMP: 91.31% done, finished in 0:05 at Fri Feb 10 01:01:41 2017
  DUMP: 97.26% done, finished in 0:01 at Fri Feb 10 01:02:48 2017
  DUMP: DUMP: 99186741 tape blocks
  DUMP: finished in 4141 seconds, throughput 23952 KBytes/sec
  DUMP: DUMP IS DONE

without logging this time.

Is it possible that adding USB_DEBUG changes something?
Reply | Threaded
Open this post in threaded view
|

Re: I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

Hans Petter Selasky-6
In reply to this post by Jakub Lach
On 02/09/17 21:05, Jakub Lach wrote:

> For some reason, samsung/jmicron one is prone to disconnecting
> itself, which could explain some errors, as in usbdump.
>
> However, under GENERIC, I was able to use dump twice time
> on touro s without problems (4h+ of disk writes).
>
> _BUT_ as soon as I've returned to my usual kernel config, the
> problem reappeared.
>
> http://pastebin.ca/3765981
>
> So I blame kernel config now. Is it possible that usb related modules
> behave differently than in kernel default ones?
>

Hi,

What options are different between these two kernel configurations?

There is also:
hw.usb.umass.throttle

to throttle USB UMASS traffic.

--HPS
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

Jakub Lach
Adding back "options         USB_DEBUG       # enable debug msgs"
to my STRIPPED config (as I had it commented out lately) was what
restored the behaviour to GENERIC (working one) (sic!).
Finishing now 4th? dump.

http://pastebin.ca/3766145
Reply | Threaded
Open this post in threaded view
|

Re: I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

Hans Petter Selasky-6
On 02/10/17 10:12, Jakub Lach wrote:
> Adding back "options         USB_DEBUG       # enable debug msgs"
> to my STRIPPED config (as I had it commented out lately) was what
> restored the behaviour to GENERIC (working one) (sic!).
> Finishing now 4th? dump.
>
> http://pastebin.ca/3766145
>

Does it make any difference with usbtest ?

It might be a timing issue in the USB firmware in your USB HDD.

--HPS

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

Jakub Lach
It starts with STATUS: ID=63, RX=33467392 bytes/sec, TX=0 bytes/sec, ERR=14, RST=24, DERR=0
I will get back to you after it ends (7200 sec.).
Reply | Threaded
Open this post in threaded view
|

Re: I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

Jakub Lach
And it ends with-

STATUS: ID=10842, RX=32339456 bytes/sec, TX=0 bytes/sec, ERR=21, RST=31, DERR=0

Read & Write, 7200 sec.
Reply | Threaded
Open this post in threaded view
|

Re: I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

Hans Petter Selasky-6
On 02/17/17 12:13, Jakub Lach wrote:
> And it ends with-
>
> STATUS: ID=10842, RX=32339456 bytes/sec, TX=0 bytes/sec, ERR=21, RST=31,
> DERR=0
>
> Read & Write, 7200 sec.
>

 From the log it turns out there are some errors, though they appear
recoverable through a mass storage reset.

--HPS

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: I'm experiencing g_vfs_done() error = 5 with more than one USB/HDD storage device on 11-STABLE when heavy writing.

Jakub Lach
I'm yet to encounter device that would not have any errors with the long run.

Similar, I think that some -

Feb 17 12:31:14 Thinkpad kernel: (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 1d 51 6f 10 00 00 80 00
Feb 17 12:31:14 Thinkpad kernel: (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
Feb 17 12:31:14 Thinkpad kernel: (da0:umass-sim0:0:0:0): Retrying command
Feb 17 12:31:43 Thinkpad kernel: (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 1d 63 b4 10 00 00 80 00
Feb 17 12:31:43 Thinkpad kernel: (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
Feb 17 12:31:43 Thinkpad kernel: (da0:umass-sim0:0:0:0): Retrying command

<stops there>

Are benign, as it appears the command must have succeeded in the end?