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.
James R. Meeker, USDA Forest Service, Bugwood.org.