Actually it is a common problem. Most of the time this starts happening in the summer months. As the weather starts getting hotter, chickens lose vitamins and minerals in their systems. Of course you might be doing everything you can to keep them healthy, but there is one thing that chickens just don't get in natural high potency feeding. Calcium.
So there are a couple of issues now. The chickens are low in calcium AND they have formed a bad habit. You have to break the habit as well as give them oyster shells to munch on for calcium.
To break the habit, try some form of tobacco sauce or chili pepper mixed with water. You can break an eggshell in half, and fill it just about to the top and put the concoction in the hen house. Depending on how many chickens you have you might want to do two of these eggs. I would say if you have more than 10 chickens do 2 of them.
Check the next morning to see if they ate the "rotten" eggs. If they didn't leave them there for another day. The smell will help with the problem too. But don't leave it over 2 days before replacing it. If they did eat the 'rotten eggs' then I doubt they will be eating their own eggs again.
Hope that helps.