The gemarah in Yevamos (78b) says "mamzer eino chai" (A mamzer [who is not known, look later in the daf] doesn't live [for more than 12 months] so not to proliferate mamzeirim).
On the other hand:
However, the Gemarah in Kiddushin (72b) say that if not for the din "keivan shenitmaa nitmaa" (a unknown mamzer is considered kosher) when Eliyahu would come, he would take out bunches and bunches of mamzeirim who were lost within the Jewish people.
How could there be so many of them if they should have died as soon as we lost track of them?
According to opinions (end of 1st chapter of Yevamos) who say that a result of a Jewess and a slave/non-Jew is a Mamzer forbids Tarmod, since there are many mamzerim there.
If unknown Mamzerim don't live, they should have died out already and one can marry whomever they want (assuming basic due diligence). Why is the whole town forbidden?