As I have read the law, you are not allowed to violently resist arrest, unless you have reason to believe that your life or bodily integrity are being illegally put at risk by the officer/officers involved.
It is a pretty high standard to meet, but a few have done so successfully.
John Bad Elk v. United States - 177 U.S. 529 (1900)
Three policemen in South Dakota attempted, under verbal orders, to arrest another policeman for an alleged violation of law when no charge had been formally made against him and no warrant had issued for his arrest. Those attempting to make the arrest carried arms, and when he refused to go, they tried to oblige him to do so by force. He fired and killed one of them. He was arrested, tried for murder, and convicted.
...
“At common law, if a party resisted arrest by an officer without warrant and who had no right to arrest him, and if in the course of that resistance the officer was killed, the offense of the party resisting arrest would be reduced from what would have been murder if the officer had had the right to arrest, to manslaughter. What would be murder if the officer had the right to arrest might be reduced to manslaughter by the very fact that he had no such right.”
...
“ And yet the charge presented the plaintiff in error to the jury as one having no right to make any resistance to an arrest by these officers, although he had been guilty of no offense, and it gave the jury to understand that the officers, in making the attempt, had the right to use all necessary force to overcome any and all opposition that might be made to the arrest, even to the extent of killing the individual whom they desired to take into their custody. Instead of saying that plaintiff in error had the right to use such force as was absolutely necessary to resist an attempted illegal arrest, the jury were informed that the policemen had the right to use all necessary force to arrest him, and that he had no right to resist. He, of course, had no right to unnecessarily injure, much less to kill, his assailant; but where the officer is killed in the course of the disorder which naturally accompanies an attempted arrest that is resisted, the law looks with very different eyes upon the transaction when the officer had the right to make the arrest from what it does if the officer had no such right. What might be murder in the first case might be nothing more than manslaughter in the other, or the facts might show that no offense had been committed.
The plaintiff in error was undoubtedly prejudiced by this error in the charge, and the judgment of the court below must therefore be Reversed, and the case remanded with instructions to grant a new trial.”