The usual culprit is trying to drive too much current - what are the pins connected to? (although 600mV implies something approaching a dead short)
Are you measuring this voltage at the pin? What frequency are you trying to switch at? The reason I ask is that if you had a heavily capacitive load and you were trying to switch at a particularly high speed then you might just see the ramp up / ramp down as the capacitor charges/discharges
I dont think PORTA and PORTB support an open drain mode and if this is correct then assuming (a) they are configured as output, and (b) they are not over-loaded, then you should see pretty close to Vdd.
Cheers
Colin