This happens from time to time when you issue shutdown
from the command line as well.
Some of the reasons I've seen on the web are:
- Hardware issue
- Driver issue
- Kernel told to shut down when it didn't want to
From what I've cobbled together (and this is by no means definitive, but seems to be plausible), basically, any program that is waiting for the hardware or OS to reply has a chance of hanging the shutdown if the thing it is waiting on gets killed before it does.
A possible mitigation is to slay
all your apps/servers (especially those touching hardware devices or shared memory queues) prior to issuing a shutdown
, wait for a second or two, then go ahead with your shutdown
.