Syncing two UAS devices causes Ubuntu to hang

elatllat
Posts: 1687
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by elatllat » Sat Aug 17, 2019 6:20 am

alvarow wrote:
Sat Aug 17, 2019 6:15 am
...my NAS...
Because we don't have access to your NAS, please try the other examples to see if any of them crash USB3 for you.

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

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by alvarow » Sat Aug 17, 2019 9:30 am

Like I said, I did try... the f3 one I am not sure what it does, so I skipped it. Point is, we have several cases where it is easy to break it.

Here's how you can replicate my NAS and break it (this breaks it for me) (warning this requires little under 50gb of free space)

Code: Select all

dd if=/dev/urandom of=/media/usb0/test0 bs=1MB count=17000
dd if=/dev/urandom of=/media/usb0/test1 bs=1MB count=17000
dd if=/dev/urandom of=/media/usb0/test2 bs=1MB count=17000
rsync /media/usb0/* /media/usb1/
Not sure why you were dropping caches, I don't do that on a regular basis, especially not when I am running my backups, so I did not performed it on my example above.

Thanks for all the help
elatllat wrote:
Sat Aug 17, 2019 6:20 am
alvarow wrote:
Sat Aug 17, 2019 6:15 am
...my NAS...
Because we don't have access to your NAS, please try the other examples to see if any of them crash USB3 for you.

elatllat
Posts: 1687
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by elatllat » Sat Aug 17, 2019 10:33 am

alvarow thank you for the example. Cache dropping would not help with your test because 50gb is already larger than the 4gb ram. your test might be made faster/smaller with cash dropping.

So what broke USB3 for Nighti did not break it for you?

"several cases" contradicts "those didn't crash" so please explicitly copy paste which tests broke USB3 and which did not for you.

nick793
Posts: 36
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 » Sat Aug 17, 2019 1:34 pm

Just a shot in the dark here...but it appears that the tests aren't covering some real world behavior with rsync.

Since I doubt the rsync package is broken, what is rsync doing differently with these files than what the existing tests cover?

I'll add that my system isn't fixed yet but I haven't been able to test all week. Been out of town with no access to the box to flash a new image on (so I haven't been sharing out of fear that my test setup is invalid). I'll be able to resume testing Monday night with the new image though

User avatar
Nighti
Posts: 39
Joined: Tue Sep 13, 2016 11:59 am
languages_spoken: english
ODROIDs: XU4, N2
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by Nighti » Sat Aug 17, 2019 4:12 pm

Just another hint. I've managed to try the most recent 5.3-rc4 kernel. (thanks @elatllat for the script)
New installation with my USB2 hard drives attached. My regular rsync test from one device to another.
With the most recent 4.9.187-53 kernel the drives are getting reset pretty fast

Code: Select all

usb 1-1.2: reset high-speed USB device number 4 using xhci-hcd
. With the 5.3 kernel ext4 format is happening a lot faster and rsync is working fine.

There are other issues on this unstable branch, but at least I can confirm that 5.3 kernel behaves different in regards to USB.

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

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by alvarow » Sun Aug 18, 2019 2:29 am

The tests all seem to use "little" files ... 1gb ...I backup my Bluray disks and those go from 16-25gb ... I sometimes re-encode them with high quality settings and it might drop to 2-8gb ... so that's more real world than rsyncing little files.

Perhaps rsyncing over ethernet is also a contributing factor.

Stuff is broken in real world use, and because it I can't satisfy the specific scenarios some dude is asking doesn't make my problem less real and significant.
nick793 wrote:
Sat Aug 17, 2019 1:34 pm
Just a shot in the dark here...but it appears that the tests aren't covering some real world behavior with rsync.

Since I doubt the rsync package is broken, what is rsync doing differently with these files than what the existing tests cover?

I'll add that my system isn't fixed yet but I haven't been able to test all week. Been out of town with no access to the box to flash a new image on (so I haven't been sharing out of fear that my test setup is invalid). I'll be able to resume testing Monday night with the new image though

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

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by alvarow » Sun Aug 18, 2019 2:30 am

I showed you ... run those rsync commands with larger files and over ethernet and watch the N2 crash. Not that complicated.
elatllat wrote:
Sat Aug 17, 2019 10:33 am
alvarow thank you for the example. Cache dropping would not help with your test because 50gb is already larger than the 4gb ram. your test might be made faster/smaller with cash dropping.

So what broke USB3 for Nighti did not break it for you?

"several cases" contradicts "those didn't crash" so please explicitly copy paste which tests broke USB3 and which did not for you.

elatllat
Posts: 1687
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by elatllat » Sun Aug 18, 2019 7:17 am

alvarow wrote:
Sun Aug 18, 2019 2:30 am
...Not that complicated...
I tried your test and (for me) it did not break USB3, but it did reboot the device (maybe a bad mmu/scheduler or an over active watchdog) on 4.9, no issues on 5.3.
If you just want to stop crashing try 5.3.
Otherwise might be best to start a new thread as I think the crash/reboot issue is not directly related to the USB3 issue.

Code: Select all

Unhandled fault: synchronous external abort (0x96000210) at 0xffffffc0f5401000
Full crash log attached.
Attachments
uart.txt.7z
(8.29 KiB) Downloaded 27 times
Last edited by elatllat on Sun Aug 18, 2019 11:28 am, edited 2 times in total.

nick793
Posts: 36
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 » Sun Aug 18, 2019 11:19 am

alvarow wrote:
Sun Aug 18, 2019 2:29 am
The tests all seem to use "little" files ... 1gb ...I backup my Bluray disks and those go from 16-25gb ... I sometimes re-encode them with high quality settings and it might drop to 2-8gb ... so that's more real world than rsyncing little files.

Perhaps rsyncing over ethernet is also a contributing factor.

Stuff is broken in real world use, and because it I can't satisfy the specific scenarios some dude is asking doesn't make my problem less real and significant.
nick793 wrote:
Sat Aug 17, 2019 1:34 pm
Just a shot in the dark here...but it appears that the tests aren't covering some real world behavior with rsync.

Since I doubt the rsync package is broken, what is rsync doing differently with these files than what the existing tests cover?

I'll add that my system isn't fixed yet but I haven't been able to test all week. Been out of town with no access to the box to flash a new image on (so I haven't been sharing out of fear that my test setup is invalid). I'll be able to resume testing Monday night with the new image though
Sorry I wasn't trying to say that your problem is less real or significant. I'm in the same boat. I am hesitant to use this box as a small file server/media server because it keeps crashing.

The latest patches (applied using apt upgrade instead of reflashing the whole image since I'm not near the box) appear to help, but until I start running workloads again I'm not sure if it's fixed or not.
These users thanked the author nick793 for the post:
alvarow (Sun Aug 18, 2019 12:21 pm)

nick793
Posts: 36
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 » Sun Aug 18, 2019 12:11 pm

Ok quick update. I'm downloading a file right now at about 50Mb/s, but running

Code: Select all

dmesg -w | grep xhci
And here's the output throughout this 14G download:

Code: Select all

[  611.338978] xhci-hcd xhci-hcd.0.auto: @00000000d7612860 00000000 00000000 1b000000 05078001
[  611.420274] usb 2-1.2: reset SuperSpeed USB device number 4 using xhci-hcd
[  709.226759] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  709.230850] xhci-hcd xhci-hcd.0.auto: @00000000d7612450 00000000 00000000 04000000 06038000
[  739.835019] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  739.839110] xhci-hcd xhci-hcd.0.auto: @00000000d76122f0 00000000 00000000 1b000000 06078001
[  739.847812] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  739.857308] xhci-hcd xhci-hcd.0.auto: @00000000d76124e0 00000000 00000000 1b000000 06078001
[  739.865933] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  739.875508] xhci-hcd xhci-hcd.0.auto: @00000000d7612520 00000000 00000000 1b000000 06078001
[  739.884086] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  739.893707] xhci-hcd xhci-hcd.0.auto: @00000000d76125f0 00000000 00000000 1b000000 06078001
[  739.902268] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  739.911906] xhci-hcd xhci-hcd.0.auto: @00000000d7612660 00000000 00000000 1b000000 06078001
[  739.920469] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  739.930106] xhci-hcd xhci-hcd.0.auto: @00000000d7612710 00000000 00000000 1b000000 06078001
[  739.938680] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  739.948306] xhci-hcd xhci-hcd.0.auto: @00000000d7612790 00000000 00000000 1b000000 06078001
[  739.956885] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  739.966505] xhci-hcd xhci-hcd.0.auto: @00000000d7612870 00000000 00000000 1b000000 06078001
[  739.976433] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  739.984710] xhci-hcd xhci-hcd.0.auto: @00000000d7612ca0 00000000 00000000 1b000000 06078001
[  739.993507] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.002910] xhci-hcd xhci-hcd.0.auto: @00000000d7612e20 00000000 00000000 1b000000 06078001
[  740.011667] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.021107] xhci-hcd xhci-hcd.0.auto: @00000000d7612ff0 00000000 00000000 1b000000 06078001
[  740.029883] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.039307] xhci-hcd xhci-hcd.0.auto: @00000000d76122a0 00000000 00000000 1b000000 06078000
[  740.047996] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.057507] xhci-hcd xhci-hcd.0.auto: @00000000d7612430 00000000 00000000 1b000000 06078000
[  740.066180] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.075707] xhci-hcd xhci-hcd.0.auto: @00000000d7612620 00000000 00000000 1b000000 06078000
[  740.084293] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.093907] xhci-hcd xhci-hcd.0.auto: @00000000d76126b0 00000000 00000000 1b000000 06078000
[  740.102783] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.112109] xhci-hcd xhci-hcd.0.auto: @00000000d7612880 00000000 00000000 1b000000 06078000
[  740.120811] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.130308] xhci-hcd xhci-hcd.0.auto: @00000000d7612a10 00000000 00000000 1b000000 06078000
[  740.138932] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.148508] xhci-hcd xhci-hcd.0.auto: @00000000d7612b30 00000000 00000000 1b000000 06078000
[  740.157081] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.166706] xhci-hcd xhci-hcd.0.auto: @00000000d7612bb0 00000000 00000000 1b000000 06078000
[  740.175310] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.184906] xhci-hcd xhci-hcd.0.auto: @00000000d7612c40 00000000 00000000 1b000000 06078000
[  740.193562] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.203107] xhci-hcd xhci-hcd.0.auto: @00000000d7612d30 00000000 00000000 1b000000 06078000
[  740.211982] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.221310] xhci-hcd xhci-hcd.0.auto: @00000000d7612f90 00000000 00000000 1b000000 06078000
[  740.230041] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.239506] xhci-hcd xhci-hcd.0.auto: @00000000d7612120 00000000 00000000 1b000000 06078001
[  740.248207] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.257707] xhci-hcd xhci-hcd.0.auto: @00000000d76122c0 00000000 00000000 1b000000 06078001
[  740.266469] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.275905] xhci-hcd xhci-hcd.0.auto: @00000000d7612480 00000000 00000000 1b000000 06078001
[  740.284905] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.294108] xhci-hcd xhci-hcd.0.auto: @00000000d76126e0 00000000 00000000 1b000000 06078001
[  740.302811] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.312309] xhci-hcd xhci-hcd.0.auto: @00000000d76129a0 00000000 00000000 1b000000 06078001
[  740.320862] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.330506] xhci-hcd xhci-hcd.0.auto: @00000000d7612a10 00000000 00000000 1b000000 06078001
[  740.339050] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.348705] xhci-hcd xhci-hcd.0.auto: @00000000d7612a60 00000000 00000000 1b000000 06078001
[  740.357287] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  740.366905] xhci-hcd xhci-hcd.0.auto: @00000000d7612ae0 00000000 00000000 1b000000 06078001
[  740.465137] usb 2-1.3: reset SuperSpeed USB device number 5 using xhci-hcd
Seems the issue persists at least for me
These users thanked the author nick793 for the post:
alvarow (Sun Aug 18, 2019 12:27 pm)

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

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by alvarow » Sun Aug 18, 2019 12:26 pm

How can you say it is not related? If I do the same to the eMMC card, it works no problem, it's only when it goes to the USB3 drive, so to me this is very much related.

You can try to discredit the problem as much as you want, but sadly it does not make it go away, I am wish we would hear something back from HardKernel or the manufacturer of the parts. As it is, this is a unreliable device, I am sad to say.
elatllat wrote:
Sun Aug 18, 2019 7:17 am
alvarow wrote:
Sun Aug 18, 2019 2:30 am
...Not that complicated...
I tried your test and (for me) it did not break USB3, but it did reboot the device (maybe a bad mmu/scheduler or an over active watchdog) on 4.9, no issues on 5.3.
If you just want to stop crashing try 5.3.
Otherwise might be best to start a new thread as I think the crash/reboot issue is not directly related to the USB3 issue.

Code: Select all

Unhandled fault: synchronous external abort (0x96000210) at 0xffffffc0f5401000
Full crash log attached.

elatllat
Posts: 1687
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by elatllat » Sun Aug 18, 2019 12:39 pm

alvarow wrote:
Sun Aug 18, 2019 12:26 pm
How can you say it is not related?...
The symptoms (a crash) are different/worse than just USB falling offline. (it's easiest to fix bugs if they are not all mixed together)
There are other reports of limiting RAM as a solution to your type of crash (maybe only the relatively slow nature of HDDs (vs eMMc cause the buffer to grow into the buggy memory) anyway 3 options try 5.3, limit ram, wait 1+weeks for a new image.
Last edited by elatllat on Sun Aug 18, 2019 12:47 pm, edited 2 times in total.

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

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by alvarow » Sun Aug 18, 2019 12:41 pm

Definitely not only you ...
nick793 wrote:
Sun Aug 18, 2019 12:11 pm
... Seems the issue persists at least for me

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

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by alvarow » Sun Aug 18, 2019 12:49 pm

I understand what you are saying, I just don't agree with it. I don't think there's enough evidence this is not related, just happen that on your test cases you don't push the device enough. If it was buggy memory, then only my device would be affected, wouldn't it? but there's other people, including you with the same problem.

Anyway ... I thank you for your time and effort trying to help.
elatllat wrote:
Sun Aug 18, 2019 12:39 pm
alvarow wrote:
Sun Aug 18, 2019 12:26 pm
How can you say it is not related?...
The symptoms (a crash) are different/worse than just USB falling offline. (it's easiest to fix bugs if they are not all mixed together)
There are other reports of limiting RAM as a solution to your type of crash (maybe only the relatively slow nature of HDDs (vs eMMc cause the buffer to grow into the buggy memory) anyway 3 options try 5.3, limit ram, wait 1+weeks for a new image.
@tobetter?

elatllat
Posts: 1687
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by elatllat » Sun Aug 18, 2019 12:52 pm

alvarow wrote:
Sun Aug 18, 2019 12:49 pm
...If it was buggy memory, then only my device would be affected, wouldn't it? ...
not physically buggy; the last image added an extra 128mb that was previously reserved, maybe some still should be.
viewtopic.php?f=177&t=34773#p265700

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

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by alvarow » Sun Aug 18, 2019 12:57 pm

elatllat wrote:
Sun Aug 18, 2019 12:52 pm
alvarow wrote:
Sun Aug 18, 2019 12:49 pm
...If it was buggy memory, then only my device would be affected, wouldn't it? ...
not physically Buggy; the last image added an extra 200mb that was previously reserved, maybe some still should be.
I don't think so, as I've been having the exact same problem weeks before that.

elatllat
Posts: 1687
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by elatllat » Sun Aug 18, 2019 1:24 pm

Anyway I think there is enough for hk to release another 4.9 build for a fresh round of user tesing (from users not already happy with 5.3 that is :twisted: )

User avatar
mad_ady
Posts: 7534
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 385 times
Been thanked: 293 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by mad_ady » Sun Aug 18, 2019 3:43 pm

A bit offtopic, but a suggestion for HK engineers. If you can reproduce an issue you can use ftrace to record and later analyze what the kernel was doing with kernel shark. If relevant, users could do a trace on their end while reproducing the issue and you could analyze it.
https://youtu.be/68osT1soAPM
I expect it is a high learning curve, but may help with gaining visibility for future issues.

sundtek
Posts: 5
Joined: Sat Nov 15, 2014 11:35 am
languages_spoken: english
Has thanked: 0
Been thanked: 3 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by sundtek » Sun Aug 18, 2019 7:30 pm

To seriously debug this issue someone needs to attach a USB Analyzer.

Everything else is more or less a waste of time.

We have seen issues with android and some cheaper (Amlogic) based Settopboxes one or two years ago. Similar pattern, OTG port worked fine other ports had timeouts or other issues after some time. We thought it's because of poor hardware design - no this issue makes it clear Amlogic has an issue in their USB-IP/State machine.
We stumbled over USB issues with other arm chipsets already (eg. when doing firmware), at some random point usb control requests just never arrived on the clients side because of a bad usb state machine.
I doubt Odroid can do anything here since this issue is on a higher level, and they have no insight on what's going on in the USB RTL of the amlogic chipset.
Amlogic themselves have licensed the USB core from another company, so that original company (whoever that is) would have to be approached.

Hardkernel guys, why don't you use a USB DVB-S/S2 unit for testing? DVB-S/S2 is available all over the world. USB ATSC might have a too low bandwidth in Korea.

This bug is very likely not fixable, the bug needs to be identified and then all that can be done is that clients might try to work around that - and that will be very likely on USB protocol level.

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

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by alvarow » Mon Aug 19, 2019 5:37 am

elatllat wrote:
Sun Aug 18, 2019 12:52 pm
alvarow wrote:
Sun Aug 18, 2019 12:49 pm
...If it was buggy memory, then only my device would be affected, wouldn't it? ...
not physically buggy; the last image added an extra 128mb that was previously reserved, maybe some still should be.
viewtopic.php?f=177&t=34773#p265700
FWIW, I have set the memory limit on the kernel, and it crashed the same...

elatllat
Posts: 1687
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by elatllat » Mon Aug 19, 2019 7:13 am

alvarow wrote:
Mon Aug 19, 2019 5:37 am
...memory limit on the kernel, and it crashed the same.
Thanks for testing, so now it's down to trying 5.3 or waiting for the next HK update.
sundtek wrote:
Sun Aug 18, 2019 7:30 pm
...This bug is very likely not fixable...
Except everyone who tried the 5.3 kernel reported it fixed.

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

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by alvarow » Mon Aug 19, 2019 10:49 am

What do we lose with 5.3?

User avatar
Nighti
Posts: 39
Joined: Tue Sep 13, 2016 11:59 am
languages_spoken: english
ODROIDs: XU4, N2
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by Nighti » Mon Aug 19, 2019 11:35 am

alvarow wrote:
Mon Aug 19, 2019 10:49 am
What do we lose with 5.3?
For me IPsec isn't part of default build. Most likely many other stuff is missing/untested.
Reboot doesn't work with SD card.
But as a headless server the default 5.3 build look more stable to me than the "stable" 4.9 build.

trex_daemon
Posts: 42
Joined: Wed Jul 17, 2019 4:47 pm
languages_spoken: english
ODROIDs: C2, N2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by trex_daemon » Mon Aug 19, 2019 9:47 pm

elatllat wrote:
Mon Aug 19, 2019 7:13 am
alvarow wrote:
Mon Aug 19, 2019 5:37 am
...memory limit on the kernel, and it crashed the same.
Thanks for testing, so now it's down to trying 5.3 or waiting for the next HK update.
sundtek wrote:
Sun Aug 18, 2019 7:30 pm
...This bug is very likely not fixable...
Except everyone who tried the 5.3 kernel reported it fixed.
No, no everybody.
I also reported that this does not fix the issue with other, non HDD related bandwidth hungry devices, like DVB-S2 tv tuners.
It also does work with very few crashes (but there are crashes) with DVB-C tuners, as DVB-C transmission has usually much lower bandwidth than via satellite.
Therefore, this "fix" might work (but I am still not convinced that this is really a fix) with HDDs, but it's not a fix for the buggy USB subsystem, where clearly the problem lies.
These users thanked the author trex_daemon for the post:
alvarow (Mon Aug 19, 2019 10:02 pm)

elatllat
Posts: 1687
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by elatllat » Mon Aug 19, 2019 11:47 pm

trex_daemon wrote:
Mon Aug 19, 2019 9:47 pm
...crashes with DVB-C tuners [on the 5.3 kernel]...
Please post steps to reproduce and a uart crash log on the 5.3 thread (so the correct kernel.org maintainer can be notified).

trex_daemon
Posts: 42
Joined: Wed Jul 17, 2019 4:47 pm
languages_spoken: english
ODROIDs: C2, N2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by trex_daemon » Tue Aug 20, 2019 2:14 pm

It's easy to reproduce.
Tune to a high bandwidth channel with tvheadend client, and then watch the kernel logs:

[ 8429.957184@1] usb 1-1.1: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 192 rq 6 len 1 ret -71
[ 8440.705991@1] usb 1-1.1: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 192 rq 6 len 1 ret -71
[ 8487.763387@0] usb 1-1.1: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 192 rq 6 len 1 ret -71
[ 8491.225514@0] usb 1-1.1: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 192 rq 6 len 1 ret -71
[ 8522.967619@0] usb 1-1.1: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 192 rq 6 len 1 ret -71
[ 8523.929888@1] usb 1-1.1: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 192 rq 6 len 1 ret -71
[ 8534.342804@0] usb 1-1.1: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 192 rq 6 len 1 ret -71
[ 8542.808738@0] usb 1-1.1: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 192 rq 6 len 1 ret -71
[ 8543.713886@0] usb 1-1.1: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 192 rq 6 len 1 ret -71
[ 8549.268023@1] usb 1-1.1: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 192 rq 6 len 1 ret -71
[ 8624.757834@0] usb 1-1.1: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 192 rq 6 len 1 ret -71
[ 8655.632369@0] usb 1-1.1: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 192 rq 6 len 1 ret -71
[ 8671.576014@0] usb 1-1.1: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 192 rq 6 len 1 ret -71
[ 8860.824137@0] usb 1-1.1: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 192 rq 6 len 1 ret -71
[ 8923.363169@1] usb 1-1.1: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 192 rq 6 len 1 ret -71
[ 8931.479829@1] usb 1-1.1: usbfs: USBDEVFS_CONTROL failed cmd mediasrv rqt 192 rq 6 len 1 ret -71

When this happens video stream becomes choppy until restart.
Sundtek confirmed that this is an usb communication problem.
Tried with several cables, no change. Tuner works in OTG port without issues.

User avatar
odroid
Site Admin
Posts: 33615
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 491 times
Been thanked: 500 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by odroid » Tue Aug 20, 2019 2:20 pm

Please make a new topic to trace/gather the USB tuner related issues.

User avatar
mad_ady
Posts: 7534
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 385 times
Been thanked: 293 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by mad_ady » Tue Aug 20, 2019 3:14 pm

@trex_daemon: maybe it would be easier for HK to reproduce the issues using the tv card as a SDR. If you have an example of using it as SDR instead of TV, maybe it would be easier to set-up.

trex_daemon
Posts: 42
Joined: Wed Jul 17, 2019 4:47 pm
languages_spoken: english
ODROIDs: C2, N2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by trex_daemon » Tue Aug 20, 2019 3:47 pm

I am willing to support HK with debugging in case it's needed with my tv tuners (I have 4 connected to each of the USB port).

User avatar
odroid
Site Admin
Posts: 33615
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 491 times
Been thanked: 500 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by odroid » Tue Aug 20, 2019 3:48 pm

Please make a new thread.

elatllat
Posts: 1687
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by elatllat » Fri Aug 23, 2019 10:57 am

elatllat wrote:
Mon Aug 19, 2019 7:13 am
alvarow wrote:
Mon Aug 19, 2019 5:37 am
...rsync...
...so now it's down to using 5.3 or waiting for the next HK update.
Some other things to try with the easily reproducible rsync bug (in case no one knows the root cause from the uart log);
USB2 (otg),
ionice,
--bwlimit,
and limit memory with cgroups.
(I know rsync has caused similar issues on the XU4 [4.7 era] and on x86 in the past;
why I suspect it may not be a USB issue other than the reboot symptom)

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

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by alvarow » Fri Aug 23, 2019 11:06 am

I can replicate it with a simple cp over NFS. I use ionice and it does nothing to prevent it either. If I rsync —bwlimit=5000 then it doesn’t crash (I think I’ve stated that before)

elatllat can you create the big files and try to cp see if it reboots there as well ?

elatllat
Posts: 1687
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by elatllat » Thu Aug 29, 2019 8:18 pm

alvarow wrote:
Fri Aug 23, 2019 11:06 am
...try to cp see if it reboots there as well ?
yes cp (or rsync, or btrfs) will bring the 4.9 kernel down for me.
- we have not tested cgroups
- rsync --bwlimit can be used as a limited workaround
- using kernel 5.3 works

not sure if HK/AML are working on this 4.9 bug or if they are busy with other things.

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

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by alvarow » Thu Aug 29, 2019 8:22 pm

Thanks, so a least we rule out rsync... as cp also breaks it.

elatllat
Posts: 1687
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by elatllat » Thu Aug 29, 2019 9:18 pm

for testing 3 x 17GB files is likely overkill 2 x 8GB files may break 4.9 faster (untested).

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

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by alvarow » Thu Aug 29, 2019 10:14 pm

I hope they are busy working on this. This is definitely a problem.

binhex
Posts: 26
Joined: Wed Jun 19, 2019 5:54 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by binhex » Thu Aug 29, 2019 11:37 pm

The problem is, for coreelec users there is no option of moving to kernel 5.3 so we are stuck with kernel 4.9 and the issues with it.

Sent from my CLT-L09 using Tapatalk


User avatar
Nighti
Posts: 39
Joined: Tue Sep 13, 2016 11:59 am
languages_spoken: english
ODROIDs: XU4, N2
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by Nighti » Sat Aug 31, 2019 2:55 am

Based on my experience in last couple weeks, the 5.3 does work better for me (faster/more stable).
* USB2 HDD is working without any issues
* USB3 Network stick is working without any issues
* USB3 HDD rsync between drives 8T (small/big files mixed) with ext4 FS, is fast. But still ejecting at some point the drives randomly.

So it seems like there is still some work to do to make it stable and it's not like switching to 5.3 is solving all issues.

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 Aug 31, 2019 3:10 am

Similar not-buildable raid-1 USAP issue here with 2x WD red NAS 3.5" drives with seperate 2A 12V supplies and N2 powered with 12V 4A.
Also posted in viewtopic.php?f=176&t=33932&p=267171#p267171

Freshly baught Harddisks tested with HD sentinel pro and also tested with three different USAP bridge chipsets.

Code: Select all

[75762.447603] IRQRatio___ERR.irq:23 ratio:52
[75762.447626] t_isr:528  t_total:1000, cnt:14392
...
[75823.591704] IRQRatio___ERR.irq:23 ratio:54
[75823.591726] t_isr:544  t_total:1000, cnt:14704
[75825.451887] sd 0:0:0:0: [sda] tag#3 data cmplt err -71 uas-tag 1 inflight: CMD
[75825.451902] sd 0:0:0:0: [sda] tag#3 CDB: Read(16) 88 00 00 00 00 00 02 65 d9 70 00 00 00 10 00 00
[75825.451980] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[75825.456081] xhci-hcd xhci-hcd.0.auto: @00000000cf612950 00000000 00000000 04000000 03038001
...
[75894.453704] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[75894.463344] xhci-hcd xhci-hcd.0.auto: @00000000cf612c50 00000000 00000000 1b000000 03078001
[75894.553203] usb 2-1.1: reset SuperSpeed USB device number 3 using xhci-hcd
[75894.576767] scsi host0: uas_eh_bus_reset_handler success
[75894.929228] IRQRatio___ERR.irq:23 ratio:68
[75894.929249] t_isr:680  t_total:1000, cnt:2613
...
[76679.438494] xhci-hcd xhci-hcd.0.auto: @00000000cf6124f0 00000000 00000000 1b000000 03078001
[76679.528456] usb 2-1.1: reset SuperSpeed USB device number 3 using xhci-hcd
[76679.548771] usb 2-1.1: device firmware changed
[76679.549006] scsi host0: uas_eh_bus_reset_handler FAILED err -19
[76679.549019] sd 0:0:0:0: Device offlined - not ready after error recovery
...
[76679.549214] sd 0:0:0:0: Device offlined - not ready after error recovery
[76679.549222] usb 2-1.1: USB disconnect, device number 3
[76679.549226] sd 0:0:0:0: Device offlined - not ready after error recovery
[76679.549233] sd 0:0:0:0: Device offlined - not ready after error recovery
[76679.549263] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_TIMEOUT
[76679.549276] sd 0:0:0:0: [sda] tag#0 CDB: Read(16) 88 00 00 00 00 00 08 69 0b b0 00 00 00 10 00 00
[76679.549284] blk_update_request: I/O error, dev sda, sector 141102000
[76679.550246] blk_update_request: I/O error, dev sda, sector 141102016
[76679.557929] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[76679.572344] blk_update_request: I/O error, dev sda, sector 141101568
[76679.573283] blk_update_request: I/O error, dev sda, sector 141101616
[76679.580148] blk_update_request: I/O error, dev sda, sector 141101776
[76679.586306] blk_update_request: I/O error, dev sda, sector 141101856
[76679.592785] blk_update_request: I/O error, dev sda, sector 141101968
[76679.599540] blk_update_request: I/O error, dev sda, sector 141101584
[76679.606559] blk_update_request: I/O error, dev sda, sector 141101680
[76679.612279] blk_update_request: I/O error, dev sda, sector 141102032
[76679.618862] md: super_written gets error=-5
[76679.618869] md/raid1:md0: Disk failure on sda1, disabling device.
               md/raid1:md0: Operation continuing on 1 devices.
[76679.848323] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[76679.916081] md: md0: resync interrupted.
[76679.929833] md: checkpointing resync of md0.

elatllat
Posts: 1687
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by elatllat » Sat Aug 31, 2019 11:17 am

Nighti wrote:
Sat Aug 31, 2019 2:55 am
...5.3 ... ejecting at some point the drives randomly...
Do you have a log of that?

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by Viald » Tue Sep 03, 2019 4:44 pm

odroid wrote:
Wed Aug 14, 2019 10:54 am
A quick list of what we did for the stability improvement.
- Lower the transaction packet size with sg_tablesize=2 parameter.
- Compensate the speed drop by a higher internal peripheral clock source settings (166Mhz -> 222Mhz)
- Assign the XHCI IRQ handler to a big A73 core.
- Change the minimum CPU clock freq from 100Mhz to 667Mhz.
- Performance governor (this was not effective probably)
With last updates, my peripheral internal clock is still at 166. How can I increase it to 222 ?
Thank you

User avatar
odroid
Site Admin
Posts: 33615
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 491 times
Been thanked: 500 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by odroid » Tue Sep 03, 2019 5:00 pm

@Viald,
If you use our latest Ubuntu 18.04.3 images, the default internal peripheral clock must be 222Mhz.

Viald
Posts: 60
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by Viald » Tue Sep 03, 2019 5:04 pm

I didn't install the lasted image, but I did all updates from previous image. Is it enough ?
Installing the last image will reset all my software and settings :(

## I close this post for this one viewtopic.php?p=267442#p267442

elatllat
Posts: 1687
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by elatllat » Wed Sep 04, 2019 1:28 am

As noted above there are a few easy ways to break the HK/AML 4.9 kernel (cp, rsync, brtfs)
But using kernel 5.3-RC7, and u-boot 57 with rsync I was also able to break the N2;

Code: Select all

[  221.141621] xhci-hcd xhci-hcd.0.auto: xHCI host not responding to stop endpoint command.
[  221.157631] xhci-hcd xhci-hcd.0.auto: Host halt failed, -110
[  221.157635] xhci-hcd xhci-hcd.0.auto: xHCI host controller not responding, assume dead
[  221.159901] xhci-hcd xhci-hcd.0.auto: xHCI host not responding to stop endpoint command.
[  221.159961] hub 2-1.1:1.0: hub_ext_port_status failed (err = -22)
[  221.160076] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
[  221.165946] usb 2-1.1-port1: cannot reset (err = -22)
...
@odroid please pressure AML to make (USB on) the N2 usable.

User avatar
tobetter
Posts: 4656
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: 87 times
Been thanked: 336 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by tobetter » Wed Sep 04, 2019 1:58 am

elatllat wrote:
Wed Sep 04, 2019 1:28 am
As noted above there are a few easy ways to break the HK/AML 4.9 kernel (cp, rsync, brtfs)
But using kernel 5.3-RC7, and u-boot 57 with rsync I was also able to break the N2;

Code: Select all

[  221.141621] xhci-hcd xhci-hcd.0.auto: xHCI host not responding to stop endpoint command.
[  221.157631] xhci-hcd xhci-hcd.0.auto: Host halt failed, -110
[  221.157635] xhci-hcd xhci-hcd.0.auto: xHCI host controller not responding, assume dead
[  221.159901] xhci-hcd xhci-hcd.0.auto: xHCI host not responding to stop endpoint command.
[  221.159961] hub 2-1.1:1.0: hub_ext_port_status failed (err = -22)
[  221.160076] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
[  221.165946] usb 2-1.1-port1: cannot reset (err = -22)
...
@odroid please pressure AML to make (USB on) the N2 usable.
Would you be able to try this patch to your kernel build? There is an interesting change from Amlogic and I've made the change for the mainline kernel.

Code: Select all

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index c9bb93a2c81e..7e9bdf3e2c9b 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -983,6 +983,9 @@ static int dwc3_core_init(struct dwc3 *dwc)
                if (dwc->dis_tx_ipgap_linecheck_quirk)
                        reg |= DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS;
 
+               reg |= (DWC3_GUCTL_NAKPERENHHS |
+                               DWC3_GUCTL_PARKMODEDISABLESS);
+
                dwc3_writel(dwc->regs, DWC3_GUCTL1, reg);
        }
 
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 3dd783b889cb..975886bd4d38 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -247,6 +247,8 @@
 
 /* Global User Control Register */
 #define DWC3_GUCTL_HSTINAUTORETRY      BIT(14)
+#define DWC3_GUCTL_PARKMODEDISABLESS   BIT(17)
+#define DWC3_GUCTL_NAKPERENHHS         BIT(18)
 
 /* Global User Control 1 Register */
 #define DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS     BIT(28)
These users thanked the author tobetter for the post:
elatllat (Wed Sep 04, 2019 4:51 am)

elatllat
Posts: 1687
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by elatllat » Wed Sep 04, 2019 2:33 am

tobetter wrote:
Wed Sep 04, 2019 1:58 am
...try this patch...
Thanks, that seems to have fixed the issue, I'll let it run for a few hours then check performance.
These users thanked the author elatllat for the post:
tobetter (Wed Sep 04, 2019 8:21 am)

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

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by alvarow » Wed Sep 04, 2019 6:07 am

Will this also address the reboots or only the disconnects? Any chance we can get a second deb file on the repo, so folks can apt install the alpha kernel?

elatllat
Posts: 1687
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by elatllat » Wed Sep 04, 2019 7:47 am

alvarow wrote:
Wed Sep 04, 2019 6:07 am
Will this also address the reboots or only the disconnects? Any chance we can get a second deb file on the repo, so folks can apt install the alpha kernel?
reboots are only an issue on 4.9 (not 5.3) and IMO they are memory related not USB related.
I could learn how to make a deb but then I might as well learn how to make a repo, but then odroid might as well add it to theirs, but then HK only builds once a month, and HK will likely wait for the next LTS (5.4?) to adopt a new kernel version....if a user can't "7z x" the build they likely should not be using an RC.

User avatar
tobetter
Posts: 4656
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: 87 times
Been thanked: 336 times
Contact:

Re: Syncing two UAS devices causes Ubuntu to hang

Unread post by tobetter » Wed Sep 04, 2019 8:21 am

elatllat wrote:
Wed Sep 04, 2019 7:47 am
alvarow wrote:
Wed Sep 04, 2019 6:07 am
Will this also address the reboots or only the disconnects? Any chance we can get a second deb file on the repo, so folks can apt install the alpha kernel?
reboots are only an issue on 4.9 (not 5.3) and IMO they are memory related not USB related.
I could learn how to make a deb but then I might as well learn how to make a repo, but then odroid might as well add it to theirs, but then HK only builds once a month, and HK will likely wait for the next LTS (5.4?) to adopt a new kernel version....if a user can't "7z x" the build they likely should not be using an RC.
Personally I am working on it to package the upstream kernel to run with the current U-boot and Petitboot. The package for 5.3-rc7 can be found here, look up linux-image-5.3.0-rc7, not tested yet.
http://ppa.linuxfactory.or.kr/pool/main/l/linux/

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 » 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.

Code: Select all

  
4,622,522,321 100%   10.44MB/s    0:07:02 (xfr#1, to-chk=0/1)

sent 4,623,650,993 bytes  received 35 bytes  10,943,552.73 bytes/sec
total size is 4,622,522,321  speedup is 1.00
Average was 10.44 MB/s, which is really slow.

Same test conditions as the ones described here:
Jay4692 wrote:
Thu Aug 15, 2019 8:17 pm
...
I have connected two USB 3.0 spinning drives (drive1 is a 3TB and drive 2 is a 4TB in my case) formatted in EXT4, a USB hub with keyboard and mouse for both my desktop and the Odroid, HDMI ethernet and obviously the power supply. The latest image is flashed in a 32 GB SanDisk SD Card Class 10 A1.

1- Log in as user root and create new user with sudo privilegies

Code: Select all

adduser odroid
usermod -aG sudo odroid
2- Change password for root user, then logout

Code: Select all

passwd
logout
3- Log in as created user (odroid) and create directories where the drives will be mount (in my case I use /mnt) and set appropriate permissions

Code: Select all

mkdir /mnt/drive1
mkdir /mnt/drive2
chown -R odroid:odroid /mnt/drive1
chown -R odroid:odroid /mnt/drive2
chmod -R 775 /mnt/drive1
chmod -R 775 /mnt/drive2
4- Mount drives in /etc/fstab using UUID (ls -l /dev/disk/by-uuid/)

Code: Select all

nano /etc/fstab

UUID=uuid_of_drive1 /mnt/drive1 ext4 defaults,nofail 0 0
UUID=uuid_of_drive2 /mnt/drive2 ext4 defaults,nofail 0 0
5- Then simply reboot (I have experienced that even using mount -a doesn't properly mount the drives, a reboot is needed in my case)
...

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 1 guest