If the onions look or feel slimy, it's preferable to throw them out. If some pieces were not submerged in pickling liquid, they may have gone bad as well.