Of course, someone snapping is always a possibility.
Nasa does highly intense psych testing on the astronauts and carefully monitors them for long term flights (think space stations terms). That said, may scifi authors have speculated about just such a scenario. I really don't think guns are an option.
Remember that bulkheads are lockable... so it would be feasible to lock someone away for their own safety, but a hell of a challenge. Feeding, bathrooms, etc. would require some kind of serious supervision and getting someone offworld even more so. There are enough tools that one could use as a weapon I suppose, prolly even a hack of the ground penetrating radar. Some meds could be used to keep the "perp" sedated, but long term it's too much a burden on the colony. I am betting at some point in the future, bad guys will be executed through the airlocks, and under some sort of military rules - where the commander has such rights for the good of the colony.
Now Jason on Mars... I smell another horrible sequel.