one long rain or heavy spring snowmelt in the distant mountains could lash the river-serpents into a frenzy in which they tore out the intake weirs and ate their way through the headgates and even the massive embankments of the canals .