When you say drain completely... how completely?
My first guess would be the selonoid or switch that senses the water level in the tub and activates the pump.
If it were the pump, my guess is that it wouldn't drain at all, which is what happened to my Mother's washer just a few months ago. Pump failed and it was loaded with laundry and water.