It's possible you have a bad switch as Harold said,
but typically it's an incorrect placement of wires
on the 3-way switches.
A 3-way switch has 3 terminals, two of the terminal
screws will be the same color. These are called travelers.
The traveler screws on one switch should each be
wired directly to the traveler screw on the other
switch. The odd colored screw is the common. The
common on one switch should be attached to the HOT.
The common screw of the other switch should be attached
to the light.
The most common error I witness is one of the traveler
wires is swapped with the wire belonging on the common
screw. This would cause the exact symptom you describe.