Ellen Pao became a hero to many when she took on the entrenched male-dominated culture of Silicon Valley. But sentiment is a fickle thing. Late Friday she fell victim to a crowd demanding her ouster as chief executive of the popular social media site Reddit.

Ms. Pao’s abrupt downfall in the face of a torrent of sexist and racist comments, many of them on Reddit itself, is quite likely to renew charges that bullying, harassment and cruel behavior are out of control on the web — and that Silicon Valley’s well-publicized problem with gender and ethnic diversity in its work force persists.

The debates over diversity in technology and invective on the Internet have been simmering for a long time, but they’ve boiled over in the last year. One reason is Ms. Pao’s lawsuit against her former employer, the venerable venture capital firm Kleiner Perkins Caufield & Byers.

Her gender discrimination case, years in the making, failed to sway a jury, but did reveal a community that casually tolerated an atmosphere where machismo was prized and women often seemed to be relegated to secondary roles.