Rapid growth of black holes in massive star-forming galaxies