Syncing two UAS devices causes Ubuntu to hang

Moan
Posts: 27
Joined: Fri Feb 01, 2019 11:51 pm
languages_spoken: english
ODROIDs: N2, XU4
Has thanked: 3 times
Been thanked: 0
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by Moan » Thu Sep 05, 2019 6:25 am

Jay4692 wrote:
Thu Sep 05, 2019 5:07 am
I have tested the new kernel 4.9.190-61 and it didn't crash trying to rsync files between drives, although it was very slow (max speed was 24 MB/s and it was hovering betwwen 3 MB/s to 15 MB/s most of the time) so it took almost 7 minutes to rsync a 4 Gb file.
Could you please check if boot.ini by any chance contains "usb-xhci.tablesize=2"? If yes, could you remove it and repeat tests?

EDIT:
Also, are those new EXT4 partitions (just formatted) or formatted a while ago? I'm asking because after formatting to EXT4, usually a process called "ext4lazyinit" is working in the background for quite a long time, until filesystem is fully created. It can drastically reduce speeds.

Jay4692
Posts: 16
Joined: Sat Jun 29, 2019 6:31 pm
languages_spoken: english, spanish
ODROIDs: N2
Has thanked: 6 times
Been thanked: 3 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by Jay4692 » Fri Sep 06, 2019 2:47 am

I removed usb-xhci.tablesize=2 and it crashed immediately, I added it again to boot.ini and I couldn't complete the rsync, eventhough system is the same as yesterday.

No, drives have been formatted for months, It's strange that touching that param of boot.ini made it crash again, and adding it again didn't complete the same way as it did yesterday.

User avatar
tobetter
Posts: 4123
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 48 times
Been thanked: 213 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by tobetter » Fri Sep 06, 2019 3:26 am

Jay4692 wrote:
Fri Sep 06, 2019 2:47 am
I removed usb-xhci.tablesize=2 and it crashed immediately, I added it again to boot.ini and I couldn't complete the rsync, eventhough system is the same as yesterday.

No, drives have been formatted for months, It's strange that touching that param of boot.ini made it crash again, and adding it again didn't complete the same way as it did yesterday.
Would you be able to update the Linux kernel with a fix for USB issue? A couple of users have tested this and giving a positive response with it. With this update, you won't need to add usb-xhci.tablesize=2.
viewtopic.php?f=177&t=36251&p=267563#p267559
These users thanked the author tobetter for the post:
Jay4692 (Fri Sep 06, 2019 5:50 am)

Jay4692
Posts: 16
Joined: Sat Jun 29, 2019 6:31 pm
languages_spoken: english, spanish
ODROIDs: N2
Has thanked: 6 times
Been thanked: 3 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by Jay4692 » Fri Sep 06, 2019 4:43 am

tobetter wrote:
Fri Sep 06, 2019 3:26 am
Jay4692 wrote:
Fri Sep 06, 2019 2:47 am
I removed usb-xhci.tablesize=2 and it crashed immediately, I added it again to boot.ini and I couldn't complete the rsync, eventhough system is the same as yesterday.

No, drives have been formatted for months, It's strange that touching that param of boot.ini made it crash again, and adding it again didn't complete the same way as it did yesterday.
Would you be able to update the Linux kernel with a fix for USB issue? A couple of users have tested this and giving a positive response with it. With this update, you won't need to add usb-xhci.tablesize=2.
viewtopic.php?f=177&t=36251&p=267563#p267559
Okey, I will try it and share my results

EDIT: First try, first success. I did rsync a 4GB file through the powered USB 3.0 HUB without issues at a decent speed. I did try it without usb-xhci.tablesize=2 in boot.ini

Code: Select all

  4,622,522,321 100%   52.70MB/s    0:01:23 (xfr#1, to-chk=0/1)

sent 4,623,650,993 bytes  received 35 bytes  54,717,763.64 bytes/sec
total size is 4,622,522,321  speedup is 1.00
I will try to stress it a little bit more and share my results, but this looks promising. Thank you!

EDIT2: I tried a bit of a stress on the USB 3.0 fix provided and I have to say it works really well, it completed a transfer in both directions (from first drive to a second drive, then from the second drive to the first drive) with rsync of a 31 GB file.

Code: Select all

32900+0 records in
32900+0 records out
32900000000 bytes (33 GB, 31 GiB) copied, 296.14 s, 111 MB/s
sending incremental file list
test
 32,900,000,000 100%   83.05MB/s    0:06:17 (xfr#1, to-chk=0/1)

sent 32,908,032,328 bytes  received 35 bytes  86,943,282.33 bytes/sec
total size is 32,900,000,000  speedup is 1.00
sending incremental file list
test
 32,900,000,000 100%   78.87MB/s    0:06:37 (xfr#1, to-chk=0/1)

sent 32,908,032,328 bytes  received 35 bytes  82,579,754.99 bytes/sec
total size is 32,900,000,000  speedup is 1.00
Read speed has improved and write speed is good as well, without any spikes, speed was very consistent through the process. I also did a backup with lots of small archives and also some big ones and also completed without any issues. I will continue to test this kernel, but for the moment looks stable to me. Also it seems it resolved the problem with my drives.

I will keep you updated after a few days (and automated backups) and see how it all goes.

Thank you again.
These users thanked the author Jay4692 for the post:
rooted (Fri Sep 06, 2019 5:50 pm)

User avatar
odroid
Site Admin
Posts: 32519
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 184 times
Been thanked: 349 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by odroid » Tue Sep 10, 2019 2:21 pm

The USB fix is available with Kernel 4.9.190-62 and bootini update packages.
These users thanked the author odroid for the post (total 5):
elatllat (Tue Sep 10, 2019 7:18 pm) • alvarow (Wed Sep 11, 2019 12:01 am) • xabolcs (Thu Sep 12, 2019 8:34 pm) • FaeRhan (Sat Sep 14, 2019 4:45 am) • etcetera (Mon Oct 21, 2019 7:30 pm)

alvarow
Posts: 35
Joined: Wed Apr 10, 2019 10:44 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 16 times
Been thanked: 1 time
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by alvarow » Wed Sep 11, 2019 12:03 am

My N2 is back ... thanks for this! I was able to transfer 124gb file now... no problems and very fast!

User avatar
odroid
Site Admin
Posts: 32519
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 184 times
Been thanked: 349 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by odroid » Wed Sep 11, 2019 8:00 am

alvarow wrote:
Wed Sep 11, 2019 12:03 am
My N2 is back ... thanks for this! I was able to transfer 124gb file now... no problems and very fast!
Thank you for sharing the test result.

nick793
Posts: 26
Joined: Mon Jun 24, 2019 9:35 pm
languages_spoken: english
ODROIDs: N2, GO
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by nick793 » Wed Sep 11, 2019 9:43 pm

Thank you so much! My N2 is running smooth and even faster than before. I appreciate all the hard work on this and thanks everyone for all the help!

fcmts
Posts: 17
Joined: Mon May 13, 2019 8:25 pm
languages_spoken: english, portuguese
ODROIDs: N2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by fcmts » Thu Sep 12, 2019 8:49 am

My old webcam still doesn't work. Maybe because it's USB 1.1?

$ lsusb
Bus 002 Device 003: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge
Bus 002 Device 002: ID 05e3:0620 Genesys Logic, Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 093a:2620 Pixart Imaging, Inc.
Bus 001 Device 003: ID 045e:0800 Microsoft Corp.
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=uas, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 3: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 3: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 3: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 4: Dev 4, If 1, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 4: Dev 4, If 2, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 4: Dev 4, If 0, Class=Vendor Specific Class, Driver=gspca_pac7302, 12M

elatllat
Posts: 1573
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 24 times
Been thanked: 64 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by elatllat » Thu Sep 12, 2019 9:34 am

fcmts wrote:
Thu Sep 12, 2019 8:49 am
....
webcam still doesn't work.
...
Bus 001 Device 004: ID 093a:2620 Pixart Imaging, Inc.
...
likely unrelated. Please start a new thread detailing what ARM computer it does work on.

Quas7
Posts: 6
Joined: Wed Feb 22, 2017 5:14 pm
languages_spoken: english, german
ODROIDs: C2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by Quas7 » Sat Oct 19, 2019 7:07 pm

odroid wrote:
Tue Sep 10, 2019 2:21 pm
The USB fix is available with Kernel 4.9.190-62 and bootini update packages.

maybe a bit background and credits for this one

https://www.mail-archive.com/linux-kern ... 28467.html
These users thanked the author Quas7 for the post:
alvarow (Thu Oct 24, 2019 11:18 pm)

elatllat
Posts: 1573
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 24 times
Been thanked: 64 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by elatllat » Sun Oct 20, 2019 9:07 pm

Quas7 wrote:
Sat Oct 19, 2019 7:07 pm
...maybe a bit background and credits for this one...
1. due to ridiculous ARM/AML NDAs users had to experience this bug and properly report it to hk.
2. hk got a patch from AML and asked for user testing
3. users reported patch fixed 4.9 and 5.3
4. hk applied it to the HK build, but was not comfortable upstreaming it.
5. users asked BL to upstream the patch
6. BL asked AML, and received relevent descriptors from the NDAd DWC3 DataBook.
7. BL rewrote the patch for upstream and asked for user testing
8. users reported to BL new patch works.
9. BL sent patch to upstream
These users thanked the author elatllat for the post (total 4):
odroid (Mon Oct 21, 2019 9:33 am) • etcetera (Mon Oct 21, 2019 7:28 pm) • alvarow (Thu Oct 24, 2019 11:18 pm) • xabolcs (Fri Oct 25, 2019 5:26 am)

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 7 guests