Trouble

SSH Transfer Troubles Corrupted MAC on Input

14 11510
loomx  
Hi everyone,

A couple of days ago I got my Banana Pi (replacement for Raspberry). While everything works quite fine I keep getting nasty but weird errors related to file transfers. Files transmitted via Samba and SSH (local computer session + Raspberry Pi) supposedly transmit fine, however when using SCP or RSync (over SSH) to a remote server, I can hardly transmit any data. Also, e.g. using the CLI for copy.com brought up constant CURL errors while downloading. This happens on both Lubuntu plus the Bananian image. On the original Raspberry Pi, all these things work fine.

Error

Error

Googling for a solution, I found the recommendation of disabling TCP checksum offloading via ethtool or that the hardware may be faulty. I also changed the ethernet cable. The router I'm using isn't exactly cheap so I don't want to replace it anytime soon.

So, is this a known problem with the SOC/MAC PHY on BPi, is there any setting I could change or would you guys recommend asking the seller for a replacement unit as the hardware might be dodgy?

Thanks for any input
loomx  
Hi,

While I hate replying to myself ;) , I just wanted to let you know that I decided the Banana Pi to be DOA (I guess there's something weird going on with the Realtek NIC). I did try other routers and ports plus Raspbian for BPi but the errors are still there. Plus, I noticed that all larger non-encrypted downloads (i.e. wget http://...) also are corrupted. I now asked the seller for a replacement and will see how it goes.
Just wanted to give you this information to prevent someone wanting to help replying here in vain.

Thanks .

The bpi does gigabit. My guess is cable (non 8 wire fully connected), or switch problems. Please check all wires on your used cables (from the bpi to the switch and from the switch to your other device). With a large transfer (ssh use full ethernet frames), cables are electrically fully used (electric capacity build up) and cable faults will show itself like this.
Please followup if changeing the situation made any difference.

loomx  
Thanks robbedoes.

No, changing the cable does not make any difference (which was my first guess, too). I also forced the connection to 100MBit instead of 1GBit. Other ports, even a different router or other linux dists dont make any difference. The only thing left on the hardware is the Banana Pi itself.
I connected the Raspberry Pi again (which works flawlessly) and asked the seller for a replacement but they don't believe me so far. Ahh, the joys of Aliexpress ;).
Once I get a new unit, I will follow up.

What is your setup ? Gbit is auto-cross. So if your desktop/portable has gbit ethernet, you can also connect directly. I'd advise just leaving the bpi auto networked settings (no speed/duplexing etc). What other parts are involved outside the bpi ? Are you copying from or to the bpi ? Also have a look at the ethernet connector under a microscope/lense: maybe the solder joints have a small quality issue ?
Again: I'd advice using sata, no sd card, and especially not cheap powersupplies and other than class 10 if sata (SSD) is too costly.

loomx  
Post Last Edited by loomx at 2014-9-11 11:03

About your points:
* I am going to connect SATA but with a traditional HDD for mass storage. An SSD would be too expensive for my purposes. And BTW: Sata works like a charm and via Samba I get roughly 30 MB/s. I haven't done extensive CRC checking in this setup though.
* SD Card is a Transcend 32 GB Class10, which has been working on the RPi for a year or so. While testing different images I used one or two other quality brand cards I had lying around.
* Power supplies I used were decent ones. Everything I have seen and read about $2 USB SMPS makes me despise them on lacking security alone.
* Soldering on the SMT parts and the ethernet jack looks top-notch.
About the setup:
Setup is Router+Modem -> 100MBit -> Router1 -> Wired Connection to BPi. Both routers are AVM Fritzbox. My desktop and laptop are usually connected wirelessly (wired for testing but doesn't change a thing). The 100MBit connect was enforced through the router interface, on the BPi I had auto-settings. For testing, I mostly transferred to the BPi and also temporarily had it connected directly to the other router that is connected to the DSL line. I have never had any problems with the router before and neither does the Raspberry Pi I started using again. Sure, I could hook it up directly but even if that resulted in less errors this doesn't make sense for a permanent setup.
It is now not only encrypted SSH connections but also unencrypted HTTP connections that get messed up. If you download a larger file (i.e. > CDRom size) via wget it basically always has the wrong CRC.
I did some more testing today and yes: the failure rate is significantly higher if I download something from the net (different servers) as opposed to LAN  transfers. I am currently uploading a file via SCP to a storage provider (so I have no direct control on the other hardware) and at least the first 500 MB went through fine.
For my purposes, I'd need both internal and external transfers to work reliably but I can't make heads or tails of what is corrupting those transfers...


Edit: I uploaded about 1.4GByte to the server via SCP, which went through. After deleting it, I started a download in the opposite direction and it failed immediately. I am puzzled of what's going on here. If anyone could shed some light on this...

T.S.  
Similar results here.
I'm saving videos from an webcam via samba to BPi, connected with GBit Lan and external Sata HDD. Often getting garbled pictures.
The cam runs fine over years 24/7 in the same configuration but storing to the good old Dockstar via samba too.

loomx  
Edited by loomx at Thu Dec 11, 2014 15:14

3 months later, I decided to give it another try and get hold of another Banana Pi. Turns out it is most likely NOT a hardware problem as the new unit causes exactly the same problems.
I also sent Allnet (the importer/distributor here) support a message about my problems, but so far haven't heard back from them and I doubt they'll be any helpful in this issue.
In conclusion, my guess is there's some software related issue (e.g. Sunxi-GMAC). By the way: transferring data via a Wifi Dongle just works fine. So the router/modem (which is not an uncommon model here) basically works fine. What is weird to me is that I seem to be the only one having problems with Banana Pi ethernet.
If there's someone with more inside on how to solve this I'd welcome this help. If I can't find a solution, I'm afraid that I'll have to return my unit and again use my Raspberry Pi or s.th. else .

Thanks

Edit: Just to recap, here's  a screenshot of a normal http file download. As you can see checksums are not identical though they're supposed to match.
wget.png

pythonz  
Hi,

Did you find a solution for this problem?

I think I have the same problem as you. I have a Raspberry Pi with an external USB harddrive located at my girlfriends parents and a Banana Pi with an external USB harddrive at my place. Every night a cron job execute rsync on the Banana Pi to synchronize some folders forth and back.

The problem is that rsync copies a few files (~1-10) and suddenly fails with following error message:

Corrupted MAC on input.
Disconnecting: Packet corrupt
rsync: connection unexpectedly closed (22519048 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.1]
rsync: connection unexpectedly closed (149567 bytes received so far) [generator]
rsync error: unexplained error (code 255) at io.c(226) [generator=3.1.1]


From the beginning I had my Raspberry Pi and Banana Pi located on the same LAN, and never saw this problem. But since I moved my Raspberry Pi outside the LAN the problem is always seen. I have not tried to move the Raspberry Pi back to my LAN again so I don't know if that still works, if so I guess it must be something related to the fibremodem/router.

I have tried to disable checksum offloading (on both ends) but this does not help at all. Also, I have read that this problem could be due to RAM shortage but I have a lot of free RAM on both ends.

I read that some people see this only for ”big” files, but I get it for small (<5 MB) files as well.

sqlunix  
pythonz replied at Mon Apr 6, 2015 01:58
Hi,

Did you find a solution for this problem?

I have a raspberry pi and I get this same exact error when trying to just ssh to another box.  I am running OSMC as the OS.  I am not sure the issue. I tried running (ethtool -K eth0 tx off rx off) and that didn't work.  Anyone have any idea what could be the issue.  I am not overclocking either.

You have to log in before you can reply Login | Sign Up

Points Rules