Running arch linux arm aarch64 on a Raspberry Pi 3B. I am getting random but consistent "client_loop: send disconnect: Broken pipe" type errors whenever sending data to this machine from any remote source where packets arrive via the onboard ethernet NIC.
At its worst, just a few keystrokes can trigger this error. But for hours to days after a reboot, the behavior improves enough that it will receive maybe 20-200MB worth of data before issuing the error. I can replicate the error with 100% failure rate using SCP of a large regular file, btrbk (over ssh), and commands like [user@remotemachine] # cat /dev/random | ssh <badmachine> 'tee /dev/null' .
However, the badmachine can send large amounts of data over SSH/SCP reliably, and I have 100% success sending a 1GB test text file of randomness to multiple other machines. It also seems to receive correctly over the USB Wifi NIC, which means the root of the problem is likely to be in the internal ethernet NIC, its drivers, etc.
The exact error message varies significantly depending on what command and verbosity level I use. Examples:
" ssh_dispatch_run_fatal: Connection to <othermachine> port 22: message authentication code incorrect"
" ERROR: ... SSH command failed (exitcode=255) ... ERROR: ... client_loop: send disconnect: Broken pipe"
" scp: debug3: In write loop, ack for 620 261120 bytes at 160588800
debug2: channel 0: rcvd adjust 163840
debug2: channel 0: rcvd adjust 65536
debug2: channel 0: rcvd adjust 65536
debug2: channel 0: rcvd adjust 32768
debug2: channel 0: rcvd adjust 65536
scp: debug3: Sent message SSH2_FXP_WRITE I:685 O:177561600 S:261120
scp: debug3: SSH2_FXP_STATUS 0
scp: debug3: In write loop, ack for 621 261120 bytes at 160849920
debug3: send packet: type 1
client_loop: send disconnect: Broken pipe
lost connection "
I ran scp -o MACs=<someMACoption> <remotefile> <localfile> with every MAC option that was on the list of available options, but all MAC options errored out. It is the same list on all of the local and remote machines I have compared.
# cat /proc/device-tree/model
Raspberry Pi 3 Model B
# uname -a
Linux 2691ap9 6.2.10-1-aarch64-ARCH #1 SMP PREEMPT_DYNAMIC Fri Apr 7 10:32:52 MDT 2023 aarch64 GNU/Linux
Packets from my LAN would all be arriving via the built-in ethernet port, which is part of a bridge with the built-in wireless NIC and one USB Wifi NIC (to make wifi AP functionality).
# ethtool iLAN (the built in ethernet NIC)
Settings for iLAN:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 100Mb/s
Duplex: Full
Auto-negotiation: on
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
MDI-X: Unknown
netlink error: Operation not permitted
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
iperf3 tests to all other machines on my LAN proceed normally, give 90+/- 8 Mbps speed, and retries in the 20-200 count range for a 10 second test in both directions.
I have tried quite a few random suggestions without improvement, including adding these to /etc/ssh/sshd_config and restarting sshd.service .
TCPKeepAlive no
IPQoS 0x00
IPQoS none
Compression no
ClientAliveInterval 60
ClientAliveCountMax 5
If anyone else has any good ideas of what else to try to troubleshoot this, please let me know! Thanks!