Passive mobs seem to have issues with collision detection and solid blocks. They will either walk partway into a solid wall or fall through the first block at surface level. I have witnessed this with cobblestone and dirt. They also will walk through wood doors for several blocks, and then teleport back to the outside.
Related issues
Comments

Duplicate of MC-10, please use the search function to see if your bug has already been submitted. Currently over 55% of tickets are being closed as duplicate.