"Neither can live while the other survives"-- does it make logical sense?
You're correct, it is indeed contradictory. Taken purely logically, then, if neither can live while the other survives, then if Harry is alive Voldemort must be dead and if Voldemort is alive Harry must be dead. Since we know both Harry and Voldemort are alive, the statement is clearly false. Since the statement is part of a piece that refers to them as alive, and one killing the other, then the passage as a whole is clearly illogical.
However, there are a few sensible ways to read it.
One is to suggest that their life under this doom (in both the common sense, and the original sense of being fated to something) is incomplete. Neither truly live until after it comes to pass.
The other, is that as a prophesy it is speaking about the future, so even though the present tense is used, it should be thought about in terms of the future. This is an unusual use of tenses for most cases, but reasonable if we consider that we're talking about a magical trance that leads people to speak dialogue in a completely different register and rhythm than that the author normally uses! And this also makes it make perfect sense; some point in the future will come, in which one of them must be dead in order for the other one to survive.
Spoiler: Hover over the text to read it if you have read the end of the last book, or don't care about the plot being given away:
It also has a different interpretation, that becomes clear later. Voldemort is in a state that is neither life nor death, and for that reason cannot be killed. This state can only be ended when certain objects are destroyed, and Harry is one of those objects. This means that while Harry survives, Voldemort cannot truly live, and cannot truly die. Harry dies, and comes back to life. Harry's death is the destruction of the last object that keeps Voldemort in his non-life/non-death state, so Voldemort truly lives when Harry stops surviving. Then they can kill him.
The strangeness is justified as fitting with the general strangeness and cryptic opacity of the prophesy as a whole (again, especially in taking how it doesn't fit with the normal style of the books). It's justified further in light of the plot twist above.
It's also deliberately strange in its phrasing, because you're meant to be wondering about it until you've read on through the series.
The sentence is not two statements: "neither can live; while the other survives," ("neither can live" means they both die, and "while the other survives" means that one lives), but rather the second half of the sentence is a condition for the first half: "while one survives, the other can't live."