the message
packet HMAC authentication failed
normally occurs when a client is sending badly formatted packets - either the HMAC is corrupt, or the packet is malformed etc; if a connection is working most of the time and then suddenly is showing this behaviour then I'd suspect a bad line/router/switch somewhere (on either client or server side).
Your best bet to hunt down a problem like this is to add more logging on the client side (add 'verb 5') and see if you can match the client log against the server logs - perhaps that will give you a clue.