Sequoia pitch moth, Synanthedon sequoiae, larvae feeding in bark cause these gummy masses on Monterey pine.

PITCH MASSES CAUSED BY SEQUOIA PITCH MOTH ON MONTEREY PINE BERKELEY, MARCH 1991 Credit: Jack Kelly Clark, UC IPM
Credit: Jack Kelly Clark, UC IPM