Stock losses were broad, with nearly every sector within the benchmark S&P 500 losing ground.