If that's the case, then how comes China, which has a massive excess of males, hasn't erupted into civil war yet?
Extremely effective social controls designed to suppress an insurrection for all the other reasons Chinese would have wanted to revolt over the years.
China does not have a "massive" excess of males, just around 3-4% overall. The worst hit generations showed 15% more males than global averages, but this seems to be largely an administrative effect where girls were simply reported with a delay.
That being said, China does face a bride price crisis (caili), that has reached tens of thousands of dollars, an exorbitant sum for the the rural areas where it is common. This has led to unrest and public pressure on the government to intervene and regulate this market.