Had this weird problem with an rsync transfer on a machine. The machine had been transferring files with no problems and then all the sudden it transfers some data and then dies with this cryptic error:
Disconnecting: Corrupted MAC on input. rsync: connection unexpectedly closed (xxxx bytes received so far) rsync error: error in rsync protocol data stream (code 12) at io.c(463) rsync: writefd_unbuffered failed to write 4092 bytes [generator]: Broken pipe rsync error: unexplained error (code 255) at io.c(1119) [generator=2.6.8]
The first line is the one to really pay attention to. It makes no sense but it's the only line that makes the error orginal from other rsync errors I've seen. What I have found from searching on this error and my experience with it is that it's a hardware error of some sort. Could be loose ram or bad/flaky ram. Could be flakey network cable or flakey switch port. Could be something is overheating. Whatever it is just start poking and wiggling everything on the box. Change network cables and switch ports. Reseat ram and network cards. Make sure things are tight. Then retry. I did all these things and the error went away. Whatever it was it was a physical problem with the machine not rsync.