Samba/Ethernet disconnecting copy process

@Stephen @jack please take a look at this:

About Samba/SSH file transfer to/from Rock Pi 4B. Speed is high (115 MB/s) but after dozen of seconds the copy process via samba freezes whole communication.

Problem is described here:

Ethernet gets reset. It is kernel+driver problem. Advice is to downgrade kernel or take lower version of driver for Ethernet controller.

The message in syslog is:

rock kernel: [   70.815213] NETDEV WATCHDOG: eth0 (rk_gmac-dwmac): transmit queue 0 timed out

The kernel is:

Linux rock 4.4.154-110-rockchip-gcef30e88a9f5 #1 SMP Mon Jun 22 07:37:10 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux

with

Ubuntu 18.04.5 LTS

The problem does also exist on the same kernel with Ubuntu 20.04.1 LTS focal stable.
Surely the problem is with fast SSD drives (and SanDisk Extreme Pro pendrive) connected to USB 3.0.
Not sure about eMMC with focal (seems ok), but on bionic the problem exists.

Are you able to reproduce this with iperf? We need to figure out if it’s just the driver/netcard issue. Downgrading the kernel can not work for sure.

@jack seems like USB 3.0 issue.

iperf -s/iperf -c IP - everything ok with simple usage of this tool. Eventually I can use more complicated parameters if you provide them.

------------------------------------------------------------
Client connecting to 10.0.0.100, TCP port 5001
TCP window size:  512 KByte (default)
------------------------------------------------------------
[  3] local 10.0.0.101 port 18182 connected with 10.0.0.100 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  1.09 GBytes   937 Mbits/sec
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 10.0.0.100 port 5001 connected with 10.0.0.101 port 18141
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  1.09 GBytes   937 Mbits/sec
[  4] local 10.0.0.100 port 5001 connected with 10.0.0.101 port 18142
[  4]  0.0-10.0 sec  1.09 GBytes   938 Mbits/sec
[  4] local 10.0.0.100 port 5001 connected with 10.0.0.101 port 18182
[  4]  0.0-10.0 sec  1.09 GBytes   939 Mbits/sec

@jack more tests from my side:

  1. writing to an USB 3.0 drive itself with no network connection involved makes no problem (10 GB of data)
  2. eMMC has no problem writing both ways: locally or via network
  3. problems seems to exist only when involved is [ network + USB 3.0 ]
  4. didn’t checked USB 2.0
1 Like

@jack

On only eMMC problem has appeared. When network copy involved.

Seems like bigger transfers via network with media storage makes the problem.
I suspect caching.

Oct 28 22:06:01 rock kernel: [159085.368820] NETDEV WATCHDOG: eth0 (rk_gmac-dwmac): transmit queue 0 timed out
Oct 28 22:06:01 rock kernel: [159085.369153] ------------[ cut here ]------------
Oct 28 22:06:01 rock kernel: [159085.369171] WARNING: at net/sched/sch_generic.c:306

EDIT: Disabling UFW didn’t helped.

Linux rock 4.4.154-110-rockchip-gcef30e88a9f5 #1 SMP Mon Jun 22 07:37:10 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:        20.04
Codename:       focal