When entering solitude for the first time (when the execution is about to occur) and you get in the way of the executioner and he hits you, all guards will attack you and will not stop (sheathing wont offer a dialogue option). Way to fix is to reload or to attack/shout at an innocent bystander and then sheathing (note you will have to pay the appropriate bounty)