This may be a bit confusing, but I joined the Companions and married Farkas, then joined the Dark Brotherhood. I just finished doing the majority of the Dark Brotherhood missions, and decide to go home to my family. Now Farkas keeps approaching me drawing out a weapon, then puts it up acting normal again. He keeps talking to me as if it's something important, but there are no different options than the usual ones. He also follows me around if I run away. I tried to fast travel and it said something like "You cannot fast travel while a guard is pursuing you". I got away, but I can't go back home without him doing this. I think it's about me being a member of the Dark Brotherhood, but nobody else, like Aela or Vilkas, will act like this - it's just Farkas.
Incur a small bounty in Whiterun (e.g. by walking up to a guard and punching them), and then immediately pay it off. This should convince Farkas to stop acting weird.
Some of the Companions are flagged as guards, and there are a variety of ways that both they and "regular" guards can "get confused" about whether the player has a bounty. Unfortunately, the Companions are also unable to arrest you, so this bug is particularly nasty when it affects them. In rare cases, it can turn the entire faction hostile. Fortunately, it's usually very simple to reset the player's bounty, by just incurring and paying off a "real" bounty.
(They will confiscate any stolen items you are carrying, and unless you have installed certain mods, they will also transport you to the Dragonsreach front door. So make sure you're prepared for that.)