Have you noticed that since 1.2 first was updated, mobs would occasionally spin around in circles and jump around? Here is an explanation of why they do that. (WARNING! LOTS OF WORDS)
Let's begin, in 1.2, most of the aggressive mobs were given an AI update, and all passive mobs (except for squids) were given a similar AI update. The AI update included path finding, which allows hostiles to easily get to you, and animals to get to you easier when you hold out wheat. This path finding AI makes it so they will not drop down from 4 block or higher spaces anymore. The AI can also easily be confused. When a mobs walks on top of a cake, it will almost always begin to spin around and jump. This is because the cake is not a full block on the top or sides, so the AI of the mob on the cake (let's say it's a creeper) will get confused of which direction to go next, this causes the glitching. Another thing would be and Iron Golem. For some reason I cannot explain, Iron Golems will jump on top of fences and start spinning a lot. When this happens, it's usually not because its path finding AI is confused the way a creeper's would be. Iron Golems are AI programmed to sort of walk around the edges of villages in a patrolling sort of fashion. When it jumps on a fence, it attempts to patrol the village, but gets confused on where it should go.
That ends it off, really! Now, i don't have the concrete facts, but I am pretty sure this is correct, if you have knowledge to disapprove something in here, then please tell me
I'm assuming what's happening is that the mob gets onto the half-block, begins to turn in search of a new valid direction to walk, and simply continues spinning because the AI can't calculate a new path off the fence or slab.