I have a board that uses ATMega1284P's. Dozens have been used in the field for years. My systems live in a very harsh lightning environment but over a period of 10 years my survival rate has increased dramatically (If interested, see: Living With Lightning and The Viability of Solid-State Components for Signal Systems ).
Recently a customer returned a board to me for repair. The board was fine except for PortB, pin 1 which always read as 0 even though a scope on the pin shows a solid 5v. This pin goes directly to a 40-pin connector which mates with a "Base Board" (containing field connections). On the Base Board it goes to a two-pin header with a jumper which is used to select an option setting (second pin is GND, normal setting is off/removed). I re-flashed the firmware just to be sure it wasn't a firmware issue (I use the same firmware on all boards) so this is not code related.
This pin is not subject to any outside stress - unlike the 8 ADC inputs which come in through a GDT & TVS suppression circuit and then to an RC conditioning circuit and then to the ADC pin. These ADC inputs are connected to 100's of feet of aluminum rail on the ground and are routinely subject to both inductive and ground differential lightning-induced surges/spikes.
Has anyone experienced an unexplained failure of a port pin after being installed in the field (i.e.: not an 'out of the box' failure)?