Figure 4. Pitch tubes are an external sign of bark beetle infestation. This occurs when the tree, in an attempt to defend itself, extrudes sap as a beetle attempts to bore in. This sap hardens, giving an almost popcorn-like appearance.
A tree trunk covered in white popcorn like structures.

James R. Meeker, USDA Forest Service,