shutting down hasn't finished (2.1)
A while back I read something that suggested this problem could be caused by a dodgy SD card. The suggested fix that seemed to work for me was to unmount the SD card and then power off. I have since bought a new SD card and the problem has gone away entirely.