First of all, can you clarify the failure a bit more? There is failure to extract (doesn't pull the case from the chamber) and failure to Eject (case is extracted from chamber, but not thrown clear of the gun).
It sounds like failure to eject, with the fired case being fed back towards the chamber, and jamming with the new round being srtipped from the mag. If this is what is actually happening, then your problem is most likely a bad/frozen ejector or spring. Short stroking can be an issue, but usually, if the bolt isn't going back far enough to have the fired case clear the ejection port, it isn't going back far enough to pick up a new round from the mag.
However, there is no reason these two problems cannot be happening together.
short stroking from the bolt carrier not being forced hard enough to the rear. This would cause it to not hit the ejector hard enough, or at all,
The AR bolt uses a plunger style ejector, contained in the bolt, with a spring underneath it. The statement about the bolt "hitting" the ejector is inaccurate. (it would be correct if we were talking about short stroking a Mauser or Springfield bolt action, but we aren't)
It is also possible that your extractor spring is weak, or gummed up. Check the bolt for damage to the extractor claw (unlikely if rounds are being pulled from the chamber, but not impossible), extractor movement (you should be able to push it out from the bolt face, and it should return smoothly, not stick), and ejector travel (you should be able to push it in flush with the bolt face, and it should move right back out to its "rest" position with no sticking).
If the ejector isn't moving (or sticks) then you get failure to eject. If the extractor doesn't hold the case in the bolt long enough as the bolt moves back (due to weak spring/crud/damaged hook) then the case pops loose from the bolt face, and does not eject.
These are the most likely causes of failure to eject, which is what it sounds like your rifle is doing with some ammo.
Also be aware that it could also be the fault of the ammo, and not the gun. When a gun runs fine with some ammo, but not others, it is usually the ammo, not the gun. Brass cases vary in hardness, from different makers, and sometimes even from lot to lot from the same maker.
A case that is "softer" than what the rifle is intended for will "stick" in the chamber, requiring more force to extract than a case that is "harder", which can be a cause for malfunctions. Some rifles are very picky about that, others are not so much.
There are other things which might be causing your problems, but assuming correct maint of the rifle (clean and correctly lubed) its probably the ammo.
While its nice, there is no law saying every rifle must and will shoot all ammo properly. Many will, some will not. Use what the rifle behaves with, and don't shoot what it doesn't like. If your rifle jams with brand A but works fine with Brand B, don't shoot Brand A. Simple. And if Brand B is more expensive, live with it.