All potatoes produce small amounts of solanine as a form of natural insecticide. But potatoes that undergo prolonged exposure to light and warm temperatures can produce unusually high amounts of solanine.