Shrinkage cavity or porosity occurs at hot spots inside the casting or at internal corners due to lack of feed metal to compensate for volumetric contraction during solidification.