On our Minecraft Realms server I've started a farm with three fenced-off animals: sheep, cows, and pigs. There are also a few gates thrown in as well. Over the course of a few days whenever I log on I notice that most of my cows and pigs have escaped their fenced-off areas however my sheep are still where I fenced them off at. I do not believe this to be someone trolling me as I know the members of the server well and their techniques of trolling are more intricate than letting animals out of fenced areas. I believe this may be the result of the server restarting or users logging off and on.
Duplicate of MC-2025. If you have not, please use the search function in the future to check whether your bug already has been reported. More than 50% of all bugs ever reported had to be closed as duplicate.