In Japan, many of the busiest commuter railway and subway lines have special trains designated for female passengers only during commute hours (usually 0600 to 0900 and 1500 to 1800 hours during weekdays). The reason is simple: there’s been a number of problems with male passengers harassing female passengers, especially when the trains get really crowded during commute hours.
That is true, if by “harassing” you mean “engaging in extremely intrusive groping.”
It seems it is a well-known aspect of ultra-crowded Tokyo trains.