Generally speaking, placing a defendant twice in jeopardy for the same offense violates the 5th Amendment. However, like most other rules, the Double Jeopardy Clause has numerous exceptions. For example, if the judge declares a mistrial because of "manifest necessity" retrial of the defendant on the same charges does not violate the 5th Amendment.
In an interesting twist on this issue, an Ohio state trial judge declared a mistrial after becoming aware of misconduct by one juror. However, prior to making her oral ruling declaring a mistrial, the jurors in the jury room voted (completed and signed their verdict forms) to acquit the defendant of several of the charges he was facing. In the defendant's subsequent retrial, he argued that the government's case now violated the Double Jeopardy Clause. The (new) judge hearing the retrial agreed and found that there was "no manifest necessity" for the original mistrial because there were numerous other alternative options that the first judge failed to explore, e.g., determining whether actual prejudice existed because of juror misconduct.
This decision to bar re-prosecution, however, was overturned by the Ohio Court of Appeals which found that "manifest necessity" does not mean "absolute necessity." The defendant then subsequently filed a Habeas petition in Federal Court, which was granted. However, this decision was also overturned this time by the 6th Circuit in a 3-judge panel opinion, which included a strongly worded dissent. While noting that the initial judge could have handled the situation better, the 6th Circuit determined that "the likelihood of juror misconduct and corruption" was a possibility and a mistrial was appropriate. Thus, absent action by a full panel of the 6th Circuit or the Supreme Court either of which are likely, the defendant will be retried on all of the previous charges.