I have the exact probelm right now ! I've had it be both the wiring
and the switch. Easiest check is - Turn the power off and loosen the
switches so you can check how they're wired. If they look correct
(check vs. a wiring chart), check the wiring at the light that they
control. There's multiple ways to wire 3-ways, one way has all the
connections at the lighting fixture's electrical box. Basically take
it all apart and put it back together correctly with all the
connections tight, etc.
If everything looks ok, I'd replace one switch, check it, and if still
messed up, then replace the other. This happened to me once where the
switch itself was broken, that was fun. If they still don't work,
panic, cause I'm out of answers and it could be a wiring problem.
There can be junctions along the way, etc. It's not some weird flaw in
the wire itself, it's either a switch or a connection.