I've had this issue a couple of time with my automatic outhouse morb spawner system. I control the open and lock state of doors and checkpoints of the toilet with a state machine. When I open the right door of the toilet, the checkpoint on its right prevents dupes from entering, but dupes will sometimes go wait there for it to turn green. when the dupe using the toilet leaves, I automatically close the right door before that checkpoint. The dupe that was waiting there will get stuck there forever, won't even go to sleep. You have to reload the scene for him to become normal again.
open the attached scene, Ada is currently stuck in front of the checkpoint on the right side of the middle base toilet. but reloading the scene will fix her. To repro, you will have to recreate a similar setup or let my system play for a while until it happens again. The system counts the number of visits to the outhouse to then enter lockdown to prevent dupes from cleaning it until a morb has been spawned and trapped in the creature trap that's inside the bathroom.