I see reference to this happening as a result of world-loading. How certain is everyone of the cause? I also see this issue, using a 2x2 box, but I can't say if this is caused by loading or sleeping. I can say that they pass through walls that are not on chunk boundaries.
2x2 box floor layout:
XXXS
XP S
XFWS
XYYS
X - Wall
Y - Wall villager appears to have passed through
W - Workstation
F - Feet
P - Pillow
S - Slab below, staircase above
Note: Noticed in Linux Java Edition 1.15.1
After the broken villager's discount wore off, the villager became unbroken.
Additional odd behavior from the broken villager:
Open villager trading window
click on green dye (64 green dye added to trading window)
click on emerald (53 green dye remaining in trading window)
drop emerald in inventory (green dye in trading window changes to 40 spontaneously)
click on green dye (40 green dye picked up)
I managed to generate a second villager with the green dye trade and this one does not (currently) experience the problem. This villager does not have the discount of the broken villager. Edit: I gave the non-broken villager a discount by buying a painting and the villager remained non-broken.
I also checked a couple of other trades which seem to be working normally (wool for emeralds, emeralds for carpets).
I have a very similar problem; my laptop has an i5 and nVidia GT 525M, and plays at 100+ fps in 1.5.1, with a 128x texture pack. In the snapshot, I'm playing on default tp, and getting rarely above 10fps.
Dw - tried reproducing and I couldn't do it again. Looks like a restart fixed whatever it was.
A villager went through a wall without a restart, so I can confirm that it isn't caused by loading.